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

Disassembly:
push 0x30
mov eax, 0x42ede6
call fcn.0041ae41
mov ebx, ecx
lea esi, [ebx + 4]
mov eax, dword [esi]
mov eax, dword [eax - 0xc]
test eax, eax
jne 0x4077d0
xor eax, eax
call fcn.0041aee0
ret
lea edi, [ebx + 0xc]
mov eax, dword [edi]
test eax, eax
mov dword [ebp - 0x30], edi
je 0x4077e6
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
and dword [edi], 0
cmp dword [ebx + 8], 0
je 0x407801
mov esi, dword [esi]
push edi
push esi
call dword [sym.imp.ADVAPI32.dll_ConvertStringSidToSidW]
test eax, eax
jne 0x4077c8
and dword [edi], eax
push 6
pop eax
jmp 0x4077ca
call fcn.0040f4a1
push eax
lea ecx, [ebp - 0x10]
call fcn.00408f01
xor ebx, ebx
mov dword [ebp - 4], ebx
call fcn.0040f4a1
push eax
lea ecx, [ebp - 0x1c]
call fcn.00408f01
mov byte [ebp - 4], 1
call fcn.0040f4a1
push eax
lea ecx, [ebp - 0x24]
call fcn.00408f01
mov byte [ebp - 4], 2
call fcn.0040f4a1
push eax
lea ecx, [ebp - 0x20]
call fcn.00408f01
mov edi, 0x1000
push edi
mov byte [ebp - 4], 3
push 0x40
mov dword [ebp - 0x38], edi
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
push 0x4341bc
xor ecx, ecx
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x34], edi
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x28], ebx
call fcn.00408a59
mov ebx, eax
cmp ebx, 0xffffffff
je 0x4078e0
push ebx
lea eax, [ebp - 0x2c]
push eax
mov ecx, esi
call fcn.00408c35
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 4
call fcn.00408f44
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x2c]
add ecx, 0xfffffff0
call fcn.00401128
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp - 0x1c]
call fcn.00408f44
mov eax, dword [esi]
mov eax, dword [eax - 0xc]
sub eax, ebx
dec eax
push eax
lea eax, [ebp - 0x2c]
push eax
mov ecx, esi
call fcn.00408bee
push eax
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 5
call fcn.00408f44
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x2c]
add ecx, 0xfffffff0
call fcn.00401128
jmp 0x4078e9
push esi
lea ecx, [ebp - 0x24]
call fcn.00408f44
mov esi, dword [ebp - 0x10]
mov eax, dword [esi - 0xc]
xor ecx, ecx
cmp eax, ecx
je 0x4079b2
lea eax, [ebp - 0x18]
push eax
push 0x80000000
push ecx
push ecx
push esi
push ecx
call dword [sym.imp.NETAPI32.dll_DsGetDcNameW]
test eax, eax
jne 0x4079bd
mov eax, dword [ebp - 0x18]
push dword [eax]
lea ecx, [ebp - 0x10]
call fcn.0040910e
mov eax, dword [ebp - 0x18]
push dword [eax + 0x1c]
lea ecx, [ebp - 0x1c]
call fcn.0040910e
push 2
lea eax, [ebp - 0x2c]
push eax
lea ecx, [ebp - 0x10]
mov dword [ebp - 0x28], 1
call fcn.00408c35
push 0x4341b4
mov ecx, eax
mov byte [ebp - 4], 6
call fcn.00408e77
mov ebx, eax
neg ebx
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x2c]
sbb bl, bl
add ecx, 0xfffffff0
inc bl
call fcn.00401128
test bl, bl
je 0x4079a1
mov eax, dword [ebp - 0x10]
mov eax, dword [eax - 0xc]
add eax, 0xfffffffe
push eax
lea eax, [ebp - 0x2c]
push eax
lea ecx, [ebp - 0x10]
call fcn.00408bee
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 7
call fcn.00408f44
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x2c]
add ecx, 0xfffffff0
call fcn.00401128
cmp dword [ebp - 0x18], 0
je 0x4079af
push dword [ebp - 0x18]
call sub.NETAPI32.dll_NetApiBufferFree
mov esi, dword [ebp - 0x10]
mov eax, dword [esi - 0xc]
test eax, eax
jne 0x4079f7
xor ebx, ebx
jmp 0x407a05
lea eax, [ebp - 0x2c]
push eax
xor ebx, ebx
inc ebx
push ebx
push esi
call sub.NETAPI32.dll_DsRoleGetPrimaryDomainInformation
test eax, eax
jne 0x4079b2
mov eax, dword [ebp - 0x2c]
mov ecx, dword [eax]
cmp ecx, 4
je 0x4079de
cmp ecx, 5
jne 0x4079ef
push dword [eax + 8]
lea ecx, [ebp - 0x1c]
call fcn.0040910e
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x28], ebx
push eax
call sub.NETAPI32.dll_DsRoleFreeMemory
jmp 0x4079b2
push eax
lea ecx, [ebp - 0x10]
call fcn.00408ff1
mov esi, dword [ebp - 0x10]
mov ebx, eax
push edi
lea ecx, [ebp - 0x20]
call fcn.00408ff1
mov edi, dword [ebp - 0x24]
lea ecx, [ebp - 0x3c]
push ecx
lea ecx, [ebp - 0x34]
push ecx
push eax
lea eax, [ebp - 0x38]
push eax
push dword [ebp - 0x14]
push edi
push ebx
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
test eax, eax
push 0xffffffffffffffff
lea ecx, [ebp - 0x10]
je 0x407ab6
call fcn.00408daf
push 0xffffffffffffffff
lea ecx, [ebp - 0x20]
call fcn.00408daf
cmp dword [esi - 0xc], 0
je 0x407a62
cmp dword [ebp - 0x28], 0
je 0x407a62
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
call fcn.00418f4c
test eax, eax
pop ecx
pop ecx
jne 0x407a6f
mov ebx, dword [ebp - 0x14]
call fcn.00408634
mov ecx, dword [ebp - 0x30]
mov dword [ecx], eax
xor ebx, ebx
cmp dword [ebp - 0x14], ebx
je 0x407a7f
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [ebp - 0x30]
cmp dword [eax], ebx
jne 0x407a89
push 6
pop ebx
mov ecx, dword [ebp - 0x20]
add ecx, 0xfffffff0
call fcn.00401128
lea ecx, [edi - 0x10]
call fcn.00401128
mov ecx, dword [ebp - 0x1c]
add ecx, 0xfffffff0
call fcn.00401128
lea ecx, [esi - 0x10]
call fcn.00401128
mov eax, ebx
jmp 0x4077ca
call fcn.00408daf
push 0xffffffffffffffff
lea ecx, [ebp - 0x20]
call fcn.00408daf
cmp dword [ebp - 0x14], 0
je 0x407a86
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x407a86