Function at 0x1038cc1
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], 0x1002e6c
cmp dword [ebp + 0xc], ebx
je 0x1038cf0
mov dword [ebp - 0x18], 0x10063ac
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 0x1038db9
lea eax, [ebp - 4]
push eax
push 0x1006394
push 1
push edi
call fcn.010369f0
test eax, eax
jne 0x1038db9
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 0x1038d41
push esi
push 0x134e0133
jmp 0x1038f6b
mov eax, dword [ebp - 0xc]
mov eax, dword [eax]
jmp 0x1038d4a
add eax, ebx
cmp word [eax], 0x5c
je 0x1038d48
lea ecx, [ebp - 8]
push ecx
push 0
push eax
call dword [sym.imp.NTDSAPI.dll_DsBindW]
mov esi, eax
test esi, esi
je 0x1038d6e
push esi
push 0x13570133
jmp 0x1038f6b
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 0x1038db7
mov eax, dword [ebp - 0x10]
cmp dword [eax], 0
jbe 0x1038db7
mov eax, dword [eax + 4]
mov eax, dword [eax + 8]
test eax, eax
je 0x1038db7
push dword [ebp + 0x10]
push eax
call fcn.01091af5
mov esi, eax
test esi, esi
je 0x1038db7
push esi
push 0x13650133
jmp 0x1038f6b
xor esi, esi
mov eax, dword [ebp + 0x10]
mov dword [ebp + 8], esi
cmp dword [eax], esi
jne 0x1038f57
lea eax, [ebp - 4]
push eax
push esi
cmp dword [ebp + 0xc], ebx
jne 0x1038e11
push ebx
push edi
call fcn.010369f0
cmp eax, esi
je 0x1038e08
push eax
push 0x13770133
call fcn.0108c55a
lea eax, [ebp - 4]
push eax
mov eax, dword [edi + 0xc]
push 0x100637c
add eax, 0x30
push eax
call fcn.0108d5d4
cmp eax, esi
je 0x1038e08
push eax
push 0x137f0133
jmp 0x1038e43
mov dword [ebp + 8], 0x1004d68
jmp 0x1038e51
push 3
push edi
call fcn.010369f0
cmp eax, esi
je 0x1038e4a
push eax
push 0x138e0133
call fcn.0108c55a
lea eax, [ebp - 4]
push eax
mov eax, dword [edi + 0xc]
push esi
add eax, 0x30
push eax
call fcn.0108d6d5
cmp eax, esi
je 0x1038e4a
push eax
push 0x13960133
call fcn.0108c55a
jmp 0x1038e51
mov dword [ebp + 8], 0x1005060
cmp dword [ebp - 4], esi
je 0x1038f57
push esi
push esi
lea eax, [ebp - 0x14]
push eax
push 0xa
push esi
call fcn.01034711
mov esi, eax
test esi, esi
je 0x1038e79
push esi
push 0x13a80133
jmp 0x1038f6b
cmp dword [ebp + 0xc], ebx
jne 0x1038f35
mov eax, 0x1006340
lea edx, [eax + 2]
mov cx, word [eax]
add eax, ebx
test cx, cx
jne 0x1038e8a
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 0x1038ea0
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 0x1038eb6
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 0x1038ecc
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 0x1038f04
mov eax, 0x8007000e
push eax
push 0x13b70133
jmp 0x1038f69
push dword [ebp - 4]
push dword [ebp + 8]
push dword [ebp - 0x18]
push 0x1006340
push esi
push edi
call fcn.0102e48f
add esp, 0x18
push dword [ebp + 0x10]
push edi
push dword [ebp - 0x14]
call fcn.010a78fb
test eax, eax
je 0x1038f55
push eax
push 0x13c00133
push edi
jmp 0x1038f50
push dword [ebp + 0x10]
push dword [ebp - 4]
push dword [ebp - 0x14]
call fcn.010a79c9
test eax, eax
je 0x1038f55
push eax
push 0x13c80133
push dword [ebp - 4]
call fcn.0108c595
xor esi, esi
mov eax, dword [ebp + 0x10]
cmp dword [eax], esi
jne 0x1038f70
mov eax, 0x80092004
push eax
push 0x13d00133
mov esi, eax
call fcn.0108c55a
xor edi, edi
cmp dword [ebp - 8], edi
je 0x1038f81
lea eax, [ebp - 8]
push eax
call dword [sym.imp.NTDSAPI.dll_DsUnBindW]
cmp dword [ebp - 0xc], edi
je 0x1038f8e
push dword [ebp - 0xc]
call sub.NETAPI32.dll_NetApiBufferFree
cmp dword [ebp - 0x10], edi
je 0x1038f9c
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 0x1038fac
push dword [ebp - 4]
call edi
xor ebx, ebx
push ebx
push ebx
push dword [ebp - 0x14]
call fcn.010a73b4
cmp dword [ebp - 0x1c], ebx
je 0x1038fc2
push dword [ebp - 0x1c]
call edi
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret 0xc