Function at 0x1038bbf
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], 0x1002e54
cmp dword [ebp + 0xc], ebx
je 0x1038bee
mov dword [ebp - 0x18], 0x1006394
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 0x1038cb7
lea eax, [ebp - 4]
push eax
push 0x100637c
push 1
push edi
call fcn.01036906
test eax, eax
jne 0x1038cb7
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 0x1038c3f
push esi
push 0x134e0133
jmp 0x1038e69
mov eax, dword [ebp - 0xc]
mov eax, dword [eax]
jmp 0x1038c48
add eax, ebx
cmp word [eax], 0x5c
je 0x1038c46
lea ecx, [ebp - 8]
push ecx
push 0
push eax
call dword [sym.imp.NTDSAPI.dll_DsBindW]
mov esi, eax
test esi, esi
je 0x1038c6c
push esi
push 0x13570133
jmp 0x1038e69
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 0x1038cb5
mov eax, dword [ebp - 0x10]
cmp dword [eax], 0
jbe 0x1038cb5
mov eax, dword [eax + 4]
mov eax, dword [eax + 8]
test eax, eax
je 0x1038cb5
push dword [ebp + 0x10]
push eax
call fcn.01091ad0
mov esi, eax
test esi, esi
je 0x1038cb5
push esi
push 0x13650133
jmp 0x1038e69
xor esi, esi
mov eax, dword [ebp + 0x10]
mov dword [ebp + 8], esi
cmp dword [eax], esi
jne 0x1038e55
lea eax, [ebp - 4]
push eax
push esi
cmp dword [ebp + 0xc], ebx
jne 0x1038d0f
push ebx
push edi
call fcn.01036906
cmp eax, esi
je 0x1038d06
push eax
push 0x13770133
call fcn.0108c503
lea eax, [ebp - 4]
push eax
mov eax, dword [edi + 0xc]
push 0x1006364
add eax, 0x30
push eax
call fcn.0108d5af
cmp eax, esi
je 0x1038d06
push eax
push 0x137f0133
jmp 0x1038d41
mov dword [ebp + 8], 0x1004d50
jmp 0x1038d4f
push 3
push edi
call fcn.01036906
cmp eax, esi
je 0x1038d48
push eax
push 0x138e0133
call fcn.0108c503
lea eax, [ebp - 4]
push eax
mov eax, dword [edi + 0xc]
push esi
add eax, 0x30
push eax
call fcn.0108d6b0
cmp eax, esi
je 0x1038d48
push eax
push 0x13960133
call fcn.0108c503
jmp 0x1038d4f
mov dword [ebp + 8], 0x1005048
cmp dword [ebp - 4], esi
je 0x1038e55
push esi
push esi
lea eax, [ebp - 0x14]
push eax
push 0xa
push esi
call fcn.01034629
mov esi, eax
test esi, esi
je 0x1038d77
push esi
push 0x13a80133
jmp 0x1038e69
cmp dword [ebp + 0xc], ebx
jne 0x1038e33
mov eax, 0x1006328
lea edx, [eax + 2]
mov cx, word [eax]
add eax, ebx
test cx, cx
jne 0x1038d88
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 0x1038d9e
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 0x1038db4
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 0x1038dca
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 0x1038e02
mov eax, 0x8007000e
push eax
push 0x13b70133
jmp 0x1038e67
push dword [ebp - 4]
push dword [ebp + 8]
push dword [ebp - 0x18]
push 0x1006328
push esi
push edi
call fcn.0102e3ff
add esp, 0x18
push dword [ebp + 0x10]
push edi
push dword [ebp - 0x14]
call fcn.010a7969
test eax, eax
je 0x1038e53
push eax
push 0x13c00133
push edi
jmp 0x1038e4e
push dword [ebp + 0x10]
push dword [ebp - 4]
push dword [ebp - 0x14]
call fcn.010a7a37
test eax, eax
je 0x1038e53
push eax
push 0x13c80133
push dword [ebp - 4]
call fcn.0108c53e
xor esi, esi
mov eax, dword [ebp + 0x10]
cmp dword [eax], esi
jne 0x1038e6e
mov eax, 0x80092004
push eax
push 0x13d00133
mov esi, eax
call fcn.0108c503
xor edi, edi
cmp dword [ebp - 8], edi
je 0x1038e7f
lea eax, [ebp - 8]
push eax
call dword [sym.imp.NTDSAPI.dll_DsUnBindW]
cmp dword [ebp - 0xc], edi
je 0x1038e8c
push dword [ebp - 0xc]
call sub.NETAPI32.dll_NetApiBufferFree
cmp dword [ebp - 0x10], edi
je 0x1038e9a
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 0x1038eaa
push dword [ebp - 4]
call edi
xor ebx, ebx
push ebx
push ebx
push dword [ebp - 0x14]
call fcn.010a740a
cmp dword [ebp - 0x1c], ebx
je 0x1038ec0
push dword [ebp - 0x1c]
call edi
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret 0xc