Function at 0x40c4c0
Capabilities:
Get domain information
Get hostname

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa10
mov eax, dword [0x42f024]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [ebp + 8], 1
mov edx, dword [ebp + 0xc]
push esi
mov dword [ebp - 0xa0c], 0
mov dword [0x4306a0], 1
je 0x40c542
mov edx, dword [edx + 4]
mov ecx, edx
lea esi, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40c500
sub ecx, esi
sar ecx, 1
cmp ecx, 2
jne 0x40c534
cmp word [edx], 0x2d
jne 0x40c542
movzx eax, word [edx + 2]
cmp eax, 0x77
je 0x40c528
cmp eax, 0x57
jne 0x40c542
mov dword [ebp - 0xa0c], 1
jmp 0x40c542
push edx
push str.Unknown_argument:__s_n
call fcn.0040c950
add esp, 8
push ebx
push edi
lea eax, [ebp - 0xa08]
xor edi, edi
push eax
push 1
push edi
mov dword [ebp - 0xa08], edi
call dword [sym.imp.NETAPI32.dll_DsRoleGetPrimaryDomainInformation]
push 0x42c2e4
mov esi, eax
call fcn.0040c950
add esp, 4
test esi, esi
jne 0x40c622
mov eax, dword [ebp - 0xa08]
test eax, eax
je 0x40c622
cmp dword [eax + 0xc], edi
je 0x40c5ab
push str.Domain_Name_s_:_n
call fcn.0040c950
mov eax, dword [ebp - 0xa08]
push dword [eax + 0xc]
push str.FQDN:__s_n
call fcn.0040c950
add esp, 0xc
lea edi, [esi + 1]
jmp 0x40c5b8
push str.Workgroup_Name:_n
call fcn.0040c950
add esp, 4
mov eax, dword [ebp - 0xa08]
mov eax, dword [eax + 8]
test eax, eax
je 0x40c616
push eax
push str.NETBIOS:__s_n
call fcn.0040c950
mov eax, dword [ebp - 0xa08]
add esp, 8
cmp dword [eax + 0xc], 0
je 0x40c616
push str._nForest_Name:_n
call fcn.0040c950
mov eax, dword [ebp - 0xa08]
add esp, 4
mov eax, dword [eax + 0x10]
test eax, eax
je 0x40c609
push eax
push 0x42c3d8
call fcn.0040c950
add esp, 8
jmp 0x40c616
push str.There_is_no_Forest_Name._n
call fcn.0040c950
add esp, 4
push dword [ebp - 0xa08]
call dword [sym.imp.NETAPI32.dll_DsRoleFreeMemory]
movups xmm0, xmmword [str.NetBIOS]
push 0x30
lea eax, [ebp - 0x1f4]
push 0
push eax
movups xmmword [ebp - 0x204], xmm0
call fcn.0040ebe0
movups xmm0, xmmword [str.DNS_hostname]
movzx eax, word [0x429fbc]
mov word [ebp - 0x1ac], ax
mov eax, dword [0x429fd0]
movups xmmword [ebp - 0x1c4], xmm0
mov dword [ebp - 0x174], eax
movq xmm0, qword [0x429fb4]
movzx eax, word [0x429fd4]
movq qword [ebp - 0x1b4], xmm0
xorps xmm0, xmm0
movups xmmword [ebp - 0x1aa], xmm0
push 0x2a
movups xmmword [ebp - 0x19a], xmm0
mov word [ebp - 0x170], ax
lea eax, [ebp - 0x16e]
movups xmm0, xmmword [str.DNS_domain]
push 0
push eax
mov dword [ebp - 0x18a], 0
mov word [ebp - 0x186], 0
movups xmmword [ebp - 0x184], xmm0
call fcn.0040ebe0
movups xmm0, xmmword [str.DNS_fully_qualified]
movzx eax, word [0x42a020]
mov word [ebp - 0xe4], ax
movups xmmword [ebp - 0x144], xmm0
mov eax, dword [0x42a04c]
movups xmm0, xmmword [0x429fe8]
mov dword [ebp - 0x9c], eax
movzx eax, word [0x42a0b0]
movups xmmword [ebp - 0x134], xmm0
mov word [ebp - 0xc], ax
xor eax, eax
movq xmm0, qword [0x429ff8]
movq qword [ebp - 0x124], xmm0
xorps xmm0, xmm0
movups xmmword [ebp - 0x11c], xmm0
mov dword [ebp - 0xca], 0
movq qword [ebp - 0x10c], xmm0
movups xmm0, xmmword [str.Physical_NetBIOS]
mov word [ebp - 0xc6], 0
mov dword [ebp - 0x88], 0
movups xmmword [ebp - 0x104], xmm0
mov dword [ebp - 0xa], eax
movups xmm0, xmmword [0x42a010]
movups xmmword [ebp - 0xf4], xmm0
xorps xmm0, xmm0
movups xmmword [ebp - 0xe2], xmm0
movq qword [ebp - 0xd2], xmm0
movups xmm0, xmmword [str.Physical_DNS_hostname]
movups xmmword [ebp - 0xc4], xmm0
movups xmm0, xmmword [0x42a034]
movups xmmword [ebp - 0xb4], xmm0
movq xmm0, qword [0x42a044]
movq qword [ebp - 0xa4], xmm0
xorps xmm0, xmm0
movups xmmword [ebp - 0x98], xmm0
movups xmm0, xmmword [str.Physical_DNS_domain]
movups xmmword [ebp - 0x84], xmm0
movups xmm0, xmmword [0x42a060]
movups xmmword [ebp - 0x74], xmm0
movq xmm0, qword [0x42a070]
movq qword [ebp - 0x64], xmm0
xorps xmm0, xmm0
movups xmmword [ebp - 0x5c], xmm0
movq qword [ebp - 0x4c], xmm0
movups xmm0, xmmword [str.Physical_DNS_fully_qualified]
movups xmmword [ebp - 0x44], xmm0
movups xmm0, xmmword [0x42a088]
movups xmmword [ebp - 0x34], xmm0
movups xmm0, xmmword [0x42a098]
movups xmmword [ebp - 0x24], xmm0
movq xmm0, qword [0x42a0a8]
movq qword [ebp - 0x14], xmm0
push 0x800
push eax
mov word [ebp - 6], ax
lea eax, [ebp - 0xa04]
push eax
call fcn.0040ebe0
push 0x42c2e4
mov dword [ebp - 0xa08], 0x800
lea ebx, [edi*8]
call fcn.0040c950
mov ecx, 0x42c2e8
cmp edi, 1
mov eax, str.Computer_Name:_n
cmove eax, ecx
push eax
call fcn.0040c950
add esp, 0x2c
lea edi, [ebp - 0x204]
xor esi, esi
cmp esi, 2
je 0x40c8d8
cmp esi, 3
je 0x40c8d8
cmp esi, 6
je 0x40c8d8
lea eax, [ebp - 0xa08]
push eax
lea eax, [ebp - 0xa04]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetComputerNameExW]
test eax, eax
je 0x40c8b8
lea eax, [ebp - 0xa04]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40c892
sub eax, edx
sar eax, 1
je 0x40c8b8
lea eax, [ebp - 0xa04]
push eax
push edi
push str._s:__s_n
call fcn.0040c950
add esp, 0xc
push 0x800
lea eax, [ebp - 0xa04]
mov dword [ebp - 0xa08], 0x800
push 0
push eax
call fcn.0040ebe0
add esp, 0xc
inc esi
add edi, 0x40
cmp esi, ebx
jle 0x40c861
push 0
push 0
call dword [sym.imp.ole32.dll_CoInitializeEx]
push 0
push 0
push 0
push 3
push 0
push 0
push 0
push 0xffffffffffffffff
push 0
call dword [sym.imp.ole32.dll_CoInitializeSecurity]
mov esi, dword [ebp - 0xa0c]
pop edi
pop ebx
test esi, esi
jne 0x40c91b
push 0x42cba8
call fcn.0040c950
add esp, 4
mov ecx, str._n
test esi, esi
mov eax, 0x42c2e4
cmove eax, ecx
push eax
call fcn.0040c950
add esp, 4
call fcn.0040bf70
call dword [sym.imp.ole32.dll_CoUninitialize]
mov ecx, dword [ebp - 4]
xor eax, eax
xor ecx, ebp
pop esi
call fcn.0040cc4a
mov esp, ebp
pop ebp
ret