Function at 0x4c164f
Capabilities:
Get domain information

Disassembly:
push 0x38
mov eax, 0x507b11
call fcn.00503d95
mov dword [ebp - 0x40], edx
xor ebx, ebx
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 4], ebx
lea eax, [ebp - 0x20]
push eax
push 1
mov edi, ebx
mov dword [ebp - 0x18], ebx
push ebx
mov word [ebp - 0x14], 0x500
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x38], ebx
call dword [sym.imp.NETAPI32.dll_DsRoleGetPrimaryDomainInformation]
mov esi, eax
test esi, esi
je 0x4c16b5
jle 0x4c16aa
movzx esi, si
or esi, 0x80070000
push esi
push 0xbf600ca
jmp 0x4c181c
mov ecx, dword [ebp - 0x20]
cmp dword [ecx], edi
je 0x4c1811
cmp dword [ecx], 2
je 0x4c1811
mov ecx, dword [ecx + 0x10]
lea eax, [ebp - 0x38]
push eax
push ebx
lea eax, [ebp - 0x1c]
push eax
push 0x48
pop edx
call fcn.004e6cb7
mov esi, eax
test esi, esi
je 0x4c16f7
push esi
push 0xc0900ca
call dword [sym.imp.certcli.dll_Ordinal_357]
mov edi, dword [ebp - 0x1c]
jmp 0x4c1822
push 0x427d24
lea ecx, [ebp - 0x2c]
call fcn.004f6453
push dword [ebp - 0x38]
lea ecx, [ebp - 0x2c]
call fcn.004f64c3
lea eax, [ebp - 0x30]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 0x220
push 0x20
push 2
lea eax, [ebp - 0x18]
push eax
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
jne 0x4c173f
call fcn.004c73cc
mov esi, eax
push esi
push 0xc1900ca
jmp 0x4c16e9
lea eax, [ebp - 0x34]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 0x12
push 1
lea eax, [ebp - 0x18]
push eax
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
jne 0x4c176e
call fcn.004c73cc
mov esi, eax
push esi
push 0xc2500ca
jmp 0x4c16e9
xor edx, edx
push 9
inc edx
pop ecx
call fcn.004e6904
mov esi, eax
test esi, esi
je 0x4c178a
push esi
push 0xc2900ca
jmp 0x4c16e9
push dword [ebp - 0x30]
mov edi, dword [ebp - 0x1c]
lea edx, [ebp - 0x2c]
xor ebx, ebx
mov ecx, edi
inc ebx
call fcn.004c124c
mov esi, eax
test esi, esi
je 0x4c17ab
push esi
push 0xc2f00ca
jmp 0x4c181c
lea eax, [ebp - 0x24]
mov dword [ebp - 0x44], 1
push eax
lea edx, [ebp - 0x2c]
mov ecx, edi
call fcn.004c0f07
mov esi, eax
test esi, esi
je 0x4c17ce
push esi
push 0xc3400ca
jmp 0x4c181c
mov edx, dword [ebp - 0x40]
lea eax, [ebp - 0x3c]
mov ecx, dword [ebp - 0x24]
push eax
call fcn.004c1546
mov esi, eax
test esi, esi
je 0x4c17eb
push esi
push 0xc3a00ca
jmp 0x4c181c
cmp dword [ebp - 0x3c], 0
jne 0x4c1822
push 1
push dword [ebp - 0x24]
lea edx, [ebp - 0x2c]
mov ecx, edi
push dword [ebp - 0x40]
call fcn.004c13c6
mov esi, eax
test esi, esi
je 0x4c1822
push esi
push 0xc4200ca
jmp 0x4c181c
mov esi, 0x8000ffff
push esi
push 0xbfd00ca
call dword [sym.imp.certcli.dll_Ordinal_357]
cmp dword [ebp - 0x20], 0
je 0x4c1831
push dword [ebp - 0x20]
call dword [sym.imp.NETAPI32.dll_DsRoleFreeMemory]
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x4c183f
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [ebp - 0x44], 0
je 0x4c185e
push dword [ebp - 0x34]
lea edx, [ebp - 0x2c]
mov ecx, edi
call fcn.004c124c
push eax
push 0xc5b00ca
call dword [sym.imp.certcli.dll_Ordinal_357]
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_LocalFree]
push dword [ebp - 0x34]
call dword [sym.imp.KERNEL32.dll_LocalFree]
test ebx, ebx
je 0x4c187e
push 9
xor edx, edx
pop ecx
call fcn.004e6904
push dword [ebp - 0x38]
xor edx, edx
mov ecx, edi
call fcn.004e6d5b
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2c]
call fcn.004f6341
mov eax, esi
call fcn.00503d32
ret