Function at 0x100a987
Capabilities:
Get domain controller name

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x44
push ebx
push esi
xor esi, esi
push edi
mov edi, dword [ebp + 8]
mov ebx, dword [edi + 0x18]
cmp ebx, esi
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0xc], esi
mov dword [ebp - 4], esi
mov dword [ebp - 0x10], esi
mov dword [ebp - 0x14], esi
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x24], ebx
jne 0x100a9bb
push 0x57
pop esi
jmp 0x100a9d3
push 0x29
push 0x11
push 0x14
push 0xe
push esi
push edi
call fcn.0100426a
add esp, 0x18
cmp eax, esi
je 0x100a9e1
mov esi, eax
push 8
call fcn.0100386e
mov eax, esi
jmp 0x100abc7
lea eax, [ebp - 0x18]
push eax
push 1
push ebx
push edi
call fcn.0100440e
cmp eax, esi
mov dword [ebp - 8], eax
jne 0x100ab75
lea eax, [ebp - 0x1c]
push eax
push 0x80
push esi
push esi
push dword [ebp - 0x18]
push esi
call dword [sym.imp.NETAPI32.dll_DsGetDcNameW]
cmp eax, esi
mov dword [ebp - 8], eax
jne 0x100ab75
mov eax, dword [ebp - 0x1c]
mov edi, dword [sym.imp.ntdll.dll_RtlInitUnicodeString]
mov dword [ebp - 0x44], 0x18
mov dword [ebp - 0x40], esi
mov dword [ebp - 0x38], esi
mov dword [ebp - 0x3c], esi
mov dword [ebp - 0x34], esi
mov dword [ebp - 0x30], esi
push dword [eax]
lea eax, [ebp - 0x2c]
push eax
call edi
lea eax, [ebp - 0xc]
push eax
push 1
lea eax, [ebp - 0x44]
push eax
lea eax, [ebp - 0x2c]
push eax
call sub.ADVAPI32.dll_LsaOpenPolicy
cmp eax, esi
jl 0x100aaab
lea eax, [ebp - 0x10]
push eax
push 3
push dword [ebp - 0xc]
call sub.ADVAPI32.dll_LsaQueryInformationPolicy
cmp eax, esi
jl 0x100aaab
lea eax, [ebp - 0x20]
push eax
push 5
push dword [ebp - 0xc]
call sub.ADVAPI32.dll_LsaQueryInformationPolicy
cmp eax, esi
jl 0x100aaab
push ebx
lea eax, [ebp - 0x2c]
push eax
call edi
lea eax, [ebp - 4]
push eax
push 1
lea eax, [ebp - 0x44]
push eax
lea eax, [ebp - 0x2c]
push eax
call sub.ADVAPI32.dll_LsaOpenPolicy
cmp eax, esi
jl 0x100aaab
lea eax, [ebp - 0x14]
push eax
push 3
push dword [ebp - 4]
call sub.ADVAPI32.dll_LsaQueryInformationPolicy
cmp eax, esi
jge 0x100aaba
push eax
call dword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
mov dword [ebp - 8], eax
jmp 0x100ab75
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 8]
cmp ecx, esi
je 0x100ab6e
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 8]
cmp eax, esi
je 0x100ab6e
push ecx
push eax
call dword [sym.imp.ntdll.dll_RtlEqualSid]
test al, al
je 0x100ab6e
push 1
push dword [ebp - 0x14]
push dword [ebp - 0x10]
call dword [sym.imp.ntdll.dll_RtlCompareUnicodeString]
test eax, eax
jne 0x100ab75
push dword [ebp - 0x10]
push 3
push dword [ebp - 4]
call sub.ADVAPI32.dll_LsaSetInformationPolicy
mov edi, dword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
mov ebx, eax
cmp ebx, esi
jl 0x100ab52
push dword [ebp - 0x20]
push 5
push dword [ebp - 4]
call sub.ADVAPI32.dll_LsaSetInformationPolicy
mov ebx, eax
cmp ebx, esi
jge 0x100ab5a
push dword [ebp - 0x14]
push 3
push dword [ebp - 4]
call sub.ADVAPI32.dll_LsaSetInformationPolicy
cmp eax, esi
mov dword [ebp + 8], eax
jge 0x100ab52
push dword [ebp - 0x24]
push 0x1f84
call fcn.0100371a
pop ecx
pop ecx
push dword [ebp + 8]
call edi
push eax
call fcn.010037c9
push ebx
call edi
jmp 0x100aab2
push 0x1f58
push esi
push esi
push dword [ebp - 0x24]
push dword [ebp + 8]
call fcn.0100475f
jmp 0x100ab75
mov dword [ebp - 8], 0x549
push dword [ebp - 0x18]
call sub.NETAPI32.dll_NetApiBufferFree
push dword [ebp - 0x1c]
call sub.NETAPI32.dll_NetApiBufferFree
cmp dword [ebp - 0xc], esi
je 0x100ab92
push dword [ebp - 0xc]
call sub.ADVAPI32.dll_LsaClose
cmp dword [ebp - 4], esi
je 0x100ab9f
push dword [ebp - 4]
call sub.ADVAPI32.dll_LsaClose
push dword [ebp - 0x10]
call sub.ADVAPI32.dll_LsaFreeMemory
push dword [ebp - 0x20]
call sub.ADVAPI32.dll_LsaFreeMemory
push dword [ebp - 0x14]
call sub.ADVAPI32.dll_LsaFreeMemory
cmp dword [ebp - 8], esi
je 0x100abc4
push dword [ebp - 8]
call fcn.010037c9
mov eax, dword [ebp - 8]
pop edi
pop esi
pop ebx
leave
ret 4