Function at 0x10094cf
Capabilities:
Get domain controller name

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x30
push ebx
mov ebx, dword [ebp + 0x14]
push edi
push dword [ebp + 8]
lea eax, [ebp - 0x10]
xor edi, edi
push eax
mov dword [ebp - 8], edi
mov dword [ebx], 5
call dword [sym.imp.ntdll.dll_RtlInitUnicodeString]
lea eax, [ebp - 4]
push eax
push 0x20001
lea eax, [ebp - 0x10]
push eax
mov eax, dword [ebp + 0xc]
push dword [eax + 0x10]
call sub.ADVAPI32.dll_LsaOpenTrustedDomainByName
cmp eax, edi
jl 0x1009522
lea eax, [ebp - 8]
push eax
push 6
push dword [ebp - 4]
call sub.ADVAPI32.dll_LsaQueryInfoTrustedDomain
cmp eax, edi
jge 0x100952f
push eax
call sub.ADVAPI32.dll_LsaNtStatusToWinError
mov dword [ebx], eax
jmp 0x100969e
mov eax, dword [ebp - 4]
push esi
mov esi, dword [ebp + 0x10]
mov dword [esi + 0x14], eax
mov eax, dword [ebp - 8]
lea ecx, [eax + 8]
mov dword [esi + 4], eax
mov dword [esi + 8], ecx
mov ecx, dword [eax + 0x10]
mov dword [esi + 0xc], ecx
mov dword [esi + 0x24], eax
cmp dword [eax + 0x18], 3
jb 0x1009565
mov dword [esi + 0x1c], edi
mov dword [esi + 0x18], 0xa
mov dword [ebx], edi
jmp 0x100969b
lea eax, [ebp + 0x14]
push eax
push 0x20
push edi
push edi
push dword [ebp + 8]
mov dword [ebp + 0x14], edi
push edi
mov dword [ebp + 0xc], edi
call dword [sym.imp.NETAPI32.dll_DsGetDcNameW]
cmp eax, edi
je 0x100958f
mov dword [esi + 0x18], 1
mov dword [ebx], eax
jmp 0x100969b
mov eax, dword [ebp + 0x14]
push esi
push dword [eax]
call dword [sym.imp.msvcrt.dll_wcslen]
pop ecx
lea eax, [eax + eax + 2]
push eax
call sub.NETAPI32.dll_NetApiBufferAllocate
cmp eax, edi
mov dword [ebp + 8], eax
je 0x10095bd
push dword [ebp + 0x14]
call sub.NETAPI32.dll_NetApiBufferFree
mov eax, dword [ebp + 8]
jmp 0x100969d
mov eax, dword [ebp + 0x14]
push dword [eax]
push dword [esi]
call dword [sym.imp.msvcrt.dll_wcscpy]
pop ecx
pop ecx
push dword [ebp + 0x14]
call sub.NETAPI32.dll_NetApiBufferFree
push 0x10
mov eax, 0x1001510
push eax
push eax
push dword [esi]
call fcn.0100d0d6
test eax, eax
jne 0x10095ef
mov dword [esi + 0x20], 1
push dword [esi]
lea eax, [ebp - 0x18]
push eax
call dword [sym.imp.ntdll.dll_RtlInitUnicodeString]
lea eax, [esi + 0x10]
push eax
push 0x801
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x18]
push eax
mov dword [ebp - 0x30], 0x18
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x1c], edi
call sub.ADVAPI32.dll_LsaOpenPolicy
cmp eax, edi
mov dword [ebp + 8], eax
jl 0x1009664
lea eax, [ebp + 0xc]
push eax
push 0xc
push dword [esi + 0x10]
call sub.ADVAPI32.dll_LsaQueryInformationPolicy
cmp eax, edi
mov dword [ebp + 8], eax
jl 0x1009654
push dword [ebp + 0xc]
call sub.ADVAPI32.dll_LsaFreeMemory
mov dword [esi + 0x1c], 1
jmp 0x1009661
cmp eax, 0xc002002e
jne 0x1009664
mov dword [esi + 0x1c], edi
mov dword [ebp + 8], edi
mov dword [esi + 0x28], edi
push dword [ebp + 8]
call dword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
cmp eax, 0x54b
mov dword [ebx], eax
je 0x100967d
cmp eax, 0x6ba
jne 0x1009684
mov dword [esi + 0x18], 1
cmp dword [ebx], edi
je 0x100969b
cmp dword [esi + 0x20], edi
je 0x100969b
push 2
push edi
push edi
push dword [esi]
call fcn.0100d0d6
mov dword [esi + 0x20], edi
xor eax, eax
pop esi
pop edi
pop ebx
leave
ret 0x10