Function at 0x1038532
Capabilities:
Get domain controller name

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
push esi
push edi
xor esi, esi
push 2
pop ebx
mov dword [ebp - 8], esi
mov dword [ebp - 0xc], esi
mov dword [ebp - 0x10], esi
mov dword [ebp - 4], esi
mov dword [ebp - 0x18], 0x1002e24
cmp dword [ebp + 0xc], ebx
je 0x1038561
mov dword [ebp - 0x18], 0x10062a4
mov eax, dword [ebp + 0x10]
mov edi, dword [ebp + 8]
mov dword [ebp - 0x14], esi
mov dword [ebp - 0x1c], esi
mov dword [eax], esi
cmp dword [ebp + 0xc], ebx
jne 0x103862a
lea eax, [ebp - 4]
push eax
push 0x100628c
push 1
push edi
call fcn.0103624b
test eax, eax
jne 0x103862a
lea eax, [ebp - 0xc]
push eax
push 0x40
push esi
push esi
push esi
push esi
call dword [sym.imp.NETAPI32.dll_DsGetDcNameW]
mov esi, eax
test esi, esi
je 0x10385b2
push esi
push 0x134e0133
jmp 0x10387dc
mov eax, dword [ebp - 0xc]
mov eax, dword [eax]
jmp 0x10385bb
add eax, ebx
cmp word [eax], 0x5c
je 0x10385b9
lea ecx, [ebp - 8]
push ecx
push 0
push eax
call dword [sym.imp.NTDSAPI.dll_DsBindW]
mov esi, eax
test esi, esi
je 0x10385df
push esi
push 0x13570133
jmp 0x10387dc
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 4]
push eax
push 1
push 1
push 8
push 0
push dword [ebp - 8]
call dword [sym.imp.NTDSAPI.dll_DsCrackNamesW]
test eax, eax
jne 0x1038628
mov eax, dword [ebp - 0x10]
cmp dword [eax], 0
jbe 0x1038628
mov eax, dword [eax + 4]
mov eax, dword [eax + 8]
test eax, eax
je 0x1038628
push dword [ebp + 0x10]
push eax
call fcn.0108e981
mov esi, eax
test esi, esi
je 0x1038628
push esi
push 0x13650133
jmp 0x10387dc
xor esi, esi
mov eax, dword [ebp + 0x10]
mov dword [ebp + 8], esi
cmp dword [eax], esi
jne 0x10387c8
lea eax, [ebp - 4]
push eax
push esi
cmp dword [ebp + 0xc], ebx
jne 0x1038682
push ebx
push edi
call fcn.0103624b
cmp eax, esi
je 0x1038679
push eax
push 0x13770133
call fcn.010893e6
lea eax, [ebp - 4]
push eax
mov eax, dword [edi + 0xc]
push 0x1006274
add eax, 0x30
push eax
call fcn.0108a460
cmp eax, esi
je 0x1038679
push eax
push 0x137f0133
jmp 0x10386b4
mov dword [ebp + 8], 0x1004c60
jmp 0x10386c2
push 3
push edi
call fcn.0103624b
cmp eax, esi
je 0x10386bb
push eax
push 0x138e0133
call fcn.010893e6
lea eax, [ebp - 4]
push eax
mov eax, dword [edi + 0xc]
push esi
add eax, 0x30
push eax
call fcn.0108a561
cmp eax, esi
je 0x10386bb
push eax
push 0x13960133
call fcn.010893e6
jmp 0x10386c2
mov dword [ebp + 8], 0x1004f58
cmp dword [ebp - 4], esi
je 0x10387c8
push esi
push esi
lea eax, [ebp - 0x14]
push eax
push 0xa
push esi
call fcn.01033f6e
mov esi, eax
test esi, esi
je 0x10386ea
push esi
push 0x13a80133
jmp 0x10387dc
cmp dword [ebp + 0xc], ebx
jne 0x10387a6
mov eax, 0x1006238
lea edx, [eax + 2]
mov cx, word [eax]
add eax, ebx
test cx, cx
jne 0x10386fb
sub eax, edx
sar eax, 1
mov edi, eax
mov eax, dword [ebp - 0x18]
lea ecx, [eax + 2]
mov dx, word [eax]
add eax, ebx
test dx, dx
jne 0x1038711
sub eax, ecx
sar eax, 1
mov ebx, eax
mov eax, dword [ebp + 8]
lea ecx, [eax + 2]
mov dx, word [eax]
inc eax
inc eax
test dx, dx
jne 0x1038727
sub eax, ecx
sar eax, 1
mov ecx, eax
mov eax, dword [ebp - 4]
lea edx, [eax + 2]
mov si, word [eax]
inc eax
inc eax
test si, si
jne 0x103873d
sub eax, edx
sar eax, 1
add eax, ecx
add eax, ebx
lea esi, [eax + edi + 1]
lea eax, [esi + esi]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edi, eax
mov dword [ebp - 0x1c], edi
test edi, edi
jne 0x1038775
mov eax, 0x8007000e
push eax
push 0x13b70133
jmp 0x10387da
push dword [ebp - 4]
push dword [ebp + 8]
push dword [ebp - 0x18]
push 0x1006238
push esi
push edi
call fcn.0102dd8f
add esp, 0x18
push dword [ebp + 0x10]
push edi
push dword [ebp - 0x14]
call fcn.010a4766
test eax, eax
je 0x10387c6
push eax
push 0x13c00133
push edi
jmp 0x10387c1
push dword [ebp + 0x10]
push dword [ebp - 4]
push dword [ebp - 0x14]
call fcn.010a4834
test eax, eax
je 0x10387c6
push eax
push 0x13c80133
push dword [ebp - 4]
call fcn.01089421
xor esi, esi
mov eax, dword [ebp + 0x10]
cmp dword [eax], esi
jne 0x10387e1
mov eax, 0x80092004
push eax
push 0x13d00133
mov esi, eax
call fcn.010893e6
xor edi, edi
cmp dword [ebp - 8], edi
je 0x10387f2
lea eax, [ebp - 8]
push eax
call dword [sym.imp.NTDSAPI.dll_DsUnBindW]
cmp dword [ebp - 0xc], edi
je 0x10387ff
push dword [ebp - 0xc]
call sub.NETAPI32.dll_NetApiBufferFree
cmp dword [ebp - 0x10], edi
je 0x103880d
push dword [ebp - 0x10]
call dword [sym.imp.NTDSAPI.dll_DsFreeNameResultW]
cmp dword [ebp - 4], edi
mov edi, dword [sym.imp.KERNEL32.dll_LocalFree]
je 0x103881d
push dword [ebp - 4]
call edi
xor ebx, ebx
push ebx
push ebx
push dword [ebp - 0x14]
call fcn.010a4207
cmp dword [ebp - 0x1c], ebx
je 0x1038833
push dword [ebp - 0x1c]
call edi
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret 0xc