Function at 0x1008b01
Capabilities:
Get domain controller name

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [ebp + 0xc]
push ebx
push esi
push edi
xor edi, edi
mov dword [eax], edi
mov eax, dword [ebp + 0x10]
mov dword [eax], edi
lea eax, [ebp - 0xc]
push eax
push 0x20
push edi
push edi
push dword [ebp + 8]
mov dword [ebp - 0xc], edi
push edi
mov dword [ebp - 0x10], edi
mov dword [ebp - 8], edi
mov dword [ebp - 4], edi
mov dword [ebp - 0x20], edi
call dword [sym.imp.NETAPI32.dll_DsGetDcNameW]
cmp eax, edi
je 0x1008b52
jle 0x1008cd8
and eax, 0xffff
or eax, 0x80070000
jmp 0x1008cd8
mov eax, dword [ebp - 0xc]
test dword [eax + 0x24], 0x10
jne 0x1008b68
mov ebx, 0x80072130
jmp 0x1008d0e
lea ecx, [ebp - 0x10]
push ecx
push edi
push dword [eax]
call dword [sym.imp.NTDSAPI.dll_DsBindW]
cmp eax, edi
jne 0x1008b3d
mov esi, dword [sym.imp.NTDSAPI.dll_DsGetDomainControllerInfoW]
lea eax, [ebp - 4]
push eax
lea eax, [ebp + 8]
push eax
mov eax, dword [ebp - 0xc]
push 3
push dword [eax + 0x1c]
push dword [ebp - 0x10]
call esi
cmp eax, 0x57
je 0x1008b9e
cmp eax, 0x32
jne 0x1008bb6
lea eax, [ebp - 8]
push eax
lea eax, [ebp + 8]
push eax
mov eax, dword [ebp - 0xc]
push 1
mov dword [ebp - 4], edi
push dword [eax + 0x1c]
push dword [ebp - 0x10]
call esi
cmp eax, edi
jne 0x1008cd6
mov edx, dword [ebp - 8]
cmp edx, edi
jne 0x1008bce
cmp dword [ebp - 4], edi
je 0x1008cd8
mov esi, dword [ebp + 8]
xor ebx, ebx
cmp esi, edi
mov dword [ebp - 0x1c], ebx
jbe 0x1008c03
mov ecx, dword [ebp - 4]
add ecx, 4
lea eax, [edx + 4]
cmp dword [ebp - 8], edi
je 0x1008bec
mov edx, dword [eax]
jmp 0x1008bee
mov edx, dword [ecx]
cmp edx, edi
je 0x1008bf3
inc ebx
add eax, 0x1c
add ecx, 0x6c
dec esi
jne 0x1008be3
cmp ebx, edi
mov dword [ebp - 0x1c], ebx
jne 0x1008c0d
mov ebx, 0x80070774
jmp 0x1008d0e
lea eax, [ebx + ebx*4]
mov ebx, dword [sym.imp.KERNEL32.dll_LocalAlloc]
shl eax, 2
push eax
push 0x40
call ebx
cmp eax, edi
mov dword [ebp - 0x20], eax
jne 0x1008c2f
mov ebx, 0x8007000e
jmp 0x1008ce8
cmp dword [ebp + 8], edi
mov dword [ebp - 0x24], edi
jbe 0x1008cbc
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x14], edi
lea esi, [eax + 0x10]
mov ecx, dword [ebp - 8]
cmp ecx, edi
je 0x1008c50
mov edx, dword [ebp - 0x14]
jmp 0x1008c56
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 0x18]
mov edi, dword [edx + ecx + 4]
test edi, edi
je 0x1008ca7
push edi
call dword [sym.imp.msvcrt.dll_wcslen]
pop ecx
lea eax, [eax + eax + 2]
push eax
push 0x40
call ebx
test eax, eax
mov dword [esi - 0x10], eax
je 0x1008ccd
push edi
push eax
call dword [sym.imp.msvcrt.dll_wcscpy]
mov eax, dword [ebp - 8]
test eax, eax
pop ecx
pop ecx
je 0x1008c91
mov ecx, dword [ebp - 0x14]
cmp dword [ecx + eax + 0x14], 0
jmp 0x1008c9c
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 0x18]
cmp dword [ecx + eax + 0x1c], 0
setne al
mov byte [esi], al
mov eax, dword [ebp - 0x20]
add esi, 0x14
inc dword [ebp - 0x24]
mov ecx, dword [ebp - 0x24]
add dword [ebp - 0x14], 0x1c
add dword [ebp - 0x18], 0x6c
xor edi, edi
cmp ecx, dword [ebp + 8]
jb 0x1008c44
mov ecx, dword [ebp + 0xc]
mov dword [ecx], eax
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp + 0x10]
mov dword [ecx], eax
xor ebx, ebx
jmp 0x1008d0e
mov ebx, 0x8007000e
xor edi, edi
jmp 0x1008ce8
jg 0x1008cdc
mov ebx, eax
jmp 0x1008d0e
and eax, 0xffff
or eax, 0x80070000
mov ebx, eax
mov esi, dword [ebp - 0x20]
cmp esi, edi
je 0x1008d0e
cmp dword [ebp - 0x1c], edi
jbe 0x1008d05
mov edi, dword [ebp - 0x1c]
push esi
call fcn.01008ac9
add esi, 0x14
dec edi
jne 0x1008cf7
xor edi, edi
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [ebp - 8], edi
mov esi, dword [sym.imp.NTDSAPI.dll_DsFreeDomainControllerInfoW]
je 0x1008d23
push dword [ebp - 8]
push dword [ebp + 8]
push 1
call esi
cmp dword [ebp - 4], edi
je 0x1008d32
push dword [ebp - 4]
push dword [ebp + 8]
push 3
call esi
cmp dword [ebp - 0x10], edi
je 0x1008d41
lea eax, [ebp - 0x10]
push eax
call dword [sym.imp.NTDSAPI.dll_DsUnBindW]
cmp dword [ebp - 0xc], edi
je 0x1008d4e
push dword [ebp - 0xc]
call sub.NETAPI32.dll_NetApiBufferFree
pop edi
pop esi
mov eax, ebx
pop ebx
leave
ret 0xc