Function at 0x4047d3
Capabilities:
Get domain controller name
Get domain information
Get user security identifier

Disassembly:
push 0x30
mov eax, 0x42e3c0
call fcn.00419920
mov ebx, ecx
lea esi, [ebx + 4]
mov eax, dword [esi]
mov eax, dword [eax - 0xc]
test eax, eax
jne 0x4047f5
xor eax, eax
call fcn.00419989
ret
lea edi, [ebx + 0xc]
mov eax, dword [edi]
test eax, eax
mov dword [ebp - 0x2c], edi
je 0x40480b
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
and dword [edi], 0
cmp dword [ebx + 8], 0
je 0x404826
mov esi, dword [esi]
push edi
push esi
call dword [sym.imp.ADVAPI32.dll_ConvertStringSidToSidW]
test eax, eax
jne 0x4047ed
and dword [edi], eax
push 6
pop eax
jmp 0x4047ef
call fcn.0040fd01
push eax
lea ecx, [ebp - 0x10]
call fcn.00401cfd
xor ebx, ebx
mov dword [ebp - 4], ebx
call fcn.0040fd01
push eax
lea ecx, [ebp - 0x18]
call fcn.00401cfd
mov byte [ebp - 4], 1
call fcn.0040fd01
push eax
lea ecx, [ebp - 0x20]
call fcn.00401cfd
mov byte [ebp - 4], 2
call fcn.0040fd01
push eax
lea ecx, [ebp - 0x1c]
call fcn.00401cfd
mov edi, 0x1000
push edi
push 0x40
mov byte [ebp - 4], 3
mov dword [ebp - 0x34], edi
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
push ebx
push 0x4318ac
mov ecx, esi
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x30], edi
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x24], ebx
call fcn.00401ee0
mov ebx, eax
cmp ebx, 0xffffffff
je 0x404906
push ebx
lea eax, [ebp - 0x28]
push eax
mov ecx, esi
call fcn.0040240b
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 4
call fcn.00402d1a
mov ecx, dword [ebp - 0x28]
add ecx, 0xfffffff0
mov byte [ebp - 4], 3
call fcn.00401128
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp - 0x18]
call fcn.00402d1a
mov eax, dword [esi]
mov eax, dword [eax - 0xc]
sub eax, ebx
dec eax
push eax
lea eax, [ebp - 0x28]
push eax
mov ecx, esi
call fcn.004023c4
push eax
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 5
call fcn.00402d1a
mov ecx, dword [ebp - 0x28]
add ecx, 0xfffffff0
mov byte [ebp - 4], 3
call fcn.00401128
jmp 0x40490f
push esi
lea ecx, [ebp - 0x20]
call fcn.00402d1a
mov esi, dword [ebp - 0x10]
mov eax, dword [esi - 0xc]
xor ecx, ecx
cmp eax, ecx
je 0x4049d8
lea eax, [ebp - 0x14]
push eax
push 0x80000000
push ecx
push ecx
push esi
push ecx
call dword [sym.imp.NETAPI32.dll_DsGetDcNameW]
test eax, eax
jne 0x4049e3
mov eax, dword [ebp - 0x14]
push dword [eax]
lea ecx, [ebp - 0x10]
call fcn.00402d8c
mov eax, dword [ebp - 0x14]
push dword [eax + 0x1c]
lea ecx, [ebp - 0x18]
call fcn.00402d8c
push 2
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp - 0x10]
mov dword [ebp - 0x24], 1
call fcn.0040240b
push 0x43167c
mov ecx, eax
mov byte [ebp - 4], 6
call fcn.00401842
mov ecx, dword [ebp - 0x28]
mov ebx, eax
neg ebx
sbb bl, bl
add ecx, 0xfffffff0
inc bl
mov byte [ebp - 4], 3
call fcn.00401128
test bl, bl
je 0x4049c7
mov eax, dword [ebp - 0x10]
mov eax, dword [eax - 0xc]
add eax, 0xfffffffe
push eax
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp - 0x10]
call fcn.004023c4
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 7
call fcn.00402d1a
mov ecx, dword [ebp - 0x28]
add ecx, 0xfffffff0
mov byte [ebp - 4], 3
call fcn.00401128
cmp dword [ebp - 0x14], 0
je 0x4049d5
push dword [ebp - 0x14]
call sub.NETAPI32.dll_NetApiBufferFree
mov esi, dword [ebp - 0x10]
mov eax, dword [esi - 0xc]
test eax, eax
jne 0x404a1d
xor ebx, ebx
jmp 0x404a2b
lea eax, [ebp - 0x28]
push eax
xor ebx, ebx
inc ebx
push ebx
push esi
call sub.NETAPI32.dll_DsRoleGetPrimaryDomainInformation
test eax, eax
jne 0x4049d8
mov eax, dword [ebp - 0x28]
mov ecx, dword [eax]
cmp ecx, 4
je 0x404a04
cmp ecx, 5
jne 0x404a15
push dword [eax + 8]
lea ecx, [ebp - 0x18]
call fcn.00402d8c
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x24], ebx
push eax
call sub.NETAPI32.dll_DsRoleFreeMemory
jmp 0x4049d8
push eax
lea ecx, [ebp - 0x10]
call fcn.00401f72
mov esi, dword [ebp - 0x10]
mov ebx, eax
push edi
lea ecx, [ebp - 0x1c]
call fcn.00401f72
mov edi, dword [ebp - 0x38]
lea ecx, [ebp - 0x3c]
push ecx
lea ecx, [ebp - 0x30]
push ecx
push eax
lea eax, [ebp - 0x34]
push eax
push edi
push dword [ebp - 0x20]
push ebx
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
test eax, eax
push 0xffffffffffffffff
lea ecx, [ebp - 0x10]
je 0x404add
call fcn.00401c6d
push 0xffffffffffffffff
lea ecx, [ebp - 0x1c]
call fcn.00401c6d
xor ebx, ebx
cmp dword [esi - 0xc], ebx
je 0x404a88
cmp dword [ebp - 0x24], ebx
je 0x404a88
push dword [ebp - 0x18]
push dword [ebp - 0x1c]
call fcn.00418daf
test eax, eax
pop ecx
pop ecx
jne 0x404a94
push edi
call fcn.004017fa
pop ecx
mov ecx, dword [ebp - 0x2c]
mov dword [ecx], eax
cmp edi, ebx
je 0x404a9f
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [ebp - 0x2c]
cmp dword [eax], ebx
jne 0x404ad9
push 6
pop edi
mov ecx, dword [ebp - 0x1c]
add ecx, 0xfffffff0
call fcn.00401128
mov ecx, dword [ebp - 0x20]
add ecx, 0xfffffff0
call fcn.00401128
mov ecx, dword [ebp - 0x18]
add ecx, 0xfffffff0
call fcn.00401128
lea ecx, [esi - 0x10]
call fcn.00401128
mov eax, edi
jmp 0x4047ef
xor edi, edi
jmp 0x404aa9
call fcn.00401c6d
push 0xffffffffffffffff
lea ecx, [ebp - 0x1c]
call fcn.00401c6d
test edi, edi
je 0x404aa6
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x404aa6