Function at 0x1003aac0
Capabilities:
Get domain controller name

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100626c5
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push esi
push edi
mov eax, dword [0x10088020]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x1c], edx
mov esi, ecx
call fcn.1001af00
or edi, 0xffffffff
cmp byte [eax + 0x1c], 0
je 0x1003abaf
call fcn.1001af00
mov ebx, eax
call fcn.10009f40
test eax, eax
je 0x1003b004
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [ebp - 0x10], eax
mov dword [ebp - 4], 2
lea ecx, [ebp - 0x10]
push str.GetDomainControllerName_start.
call fcn.100123a0
call fcn.10009f40
test eax, eax
je 0x1003b004
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [ebp - 0x18], eax
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x18]
push 0
push 0x100707ac
call fcn.10010b90
push ecx
lea eax, [ebp - 0x10]
mov ecx, ebx
push eax
sub esp, 8
call fcn.1001b0f0
mov byte [ebp - 4], 2
mov eax, edi
mov edx, dword [ebp - 0x18]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x1003ab8e
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov eax, edi
mov edx, dword [ebp - 0x10]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x1003abaf
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
call fcn.1001af00
cmp byte [eax + 0x1c], 0
je 0x1003ac94
call fcn.1001af00
mov ebx, eax
call fcn.10009f40
test eax, eax
je 0x1003b004
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [ebp - 0x10], eax
mov dword [ebp - 4], 0xc
lea ecx, [ebp - 0x10]
push 8
push str.Domain:
call fcn.10010b90
test esi, esi
je 0x1003ac19
mov ecx, esi
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x1003ac00
sub ecx, edx
sar ecx, 1
push ecx
push esi
lea ecx, [ebp - 0x10]
call fcn.10010b90
call fcn.10009f40
test eax, eax
je 0x1003b004
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [ebp - 0x18], eax
mov byte [ebp - 4], 0xf
lea ecx, [ebp - 0x18]
push 0
push 0x100707ac
call fcn.10010b90
push ecx
lea eax, [ebp - 0x10]
mov ecx, ebx
push eax
sub esp, 8
call fcn.1001b0f0
mov byte [ebp - 4], 0xc
mov eax, edi
mov edx, dword [ebp - 0x18]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x1003ac73
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov eax, edi
mov edx, dword [ebp - 0x10]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x1003ac94
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
test esi, esi
je 0x1003aff0
xor ecx, ecx
mov eax, esi
cmp word [esi], cx
je 0x1003aff0
nop dword [eax]
add eax, 2
inc ecx
cmp word [eax], 0
jne 0x1003acb0
test ecx, ecx
je 0x1003aff0
lea eax, [ebp - 0x14]
mov dword [ebp - 0x14], 0
push eax
push esi
push 0
call dword [sym.imp.NETAPI32.dll_NetGetDCName]
mov ebx, eax
test ebx, ebx
jne 0x1003af1b
mov ecx, dword [ebp - 0x14]
xor esi, esi
cmp word [ecx], si
je 0x1003acfa
nop word [eax + eax]
lea ecx, [ecx + 2]
inc esi
cmp word [ecx], 0
jne 0x1003acf0
xor ecx, ecx
mov eax, esi
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edx, dword [ebp - 0x14]
mov ecx, eax
mov eax, dword [ebp - 0x1c]
mov dword [eax + 4], ecx
mov dword [eax], esi
movzx eax, word [edx]
test ax, ax
je 0x1003ad43
mov esi, eax
nop dword [eax]
mov word [ecx], si
lea edx, [edx + 2]
movzx eax, word [edx]
add ecx, 2
mov esi, eax
test ax, ax
jne 0x1003ad30
xor eax, eax
mov word [ecx], ax
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x1003ad56
push eax
call dword [sym.imp.NETAPI32.dll_NetApiBufferFree]
call fcn.1001af00
cmp byte [eax + 0x1c], 0
je 0x1003ae47
call fcn.1001af00
mov esi, eax
mov dword [ebp - 0x20], esi
call fcn.10009f40
test eax, eax
je 0x1003b004
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [ebp - 0x10], eax
mov dword [ebp - 4], 0x20
lea ecx, [ebp - 0x10]
push str.Domain_controller_name:
call fcn.100123a0
mov eax, dword [ebp - 0x1c]
mov edx, dword [eax + 4]
test edx, edx
je 0x1003adcc
mov ecx, edx
lea esi, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x1003adb0
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x10]
call fcn.10010b90
mov esi, dword [ebp - 0x20]
call fcn.10009f40
test eax, eax
je 0x1003b004
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [ebp - 0x1c], eax
mov byte [ebp - 4], 0x23
lea ecx, [ebp - 0x1c]
push 0
push 0x100707ac
call fcn.10010b90
push ecx
lea eax, [ebp - 0x10]
mov ecx, esi
push eax
sub esp, 8
call fcn.1001b0f0
mov byte [ebp - 4], 0x20
mov eax, edi
mov edx, dword [ebp - 0x1c]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x1003ae26
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov eax, edi
mov edx, dword [ebp - 0x10]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x1003ae47
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
call fcn.1001af00
cmp byte [eax + 0x1c], 0
je 0x1003af04
call fcn.1001af00
mov esi, eax
call fcn.10009f40
test eax, eax
je 0x1003b004
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [ebp - 0x10], eax
mov dword [ebp - 4], 0x2a
lea ecx, [ebp - 0x10]
push str.GetDomainControllerName_end.
call fcn.100123a0
call fcn.10009f40
test eax, eax
je 0x1003b004
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [ebp - 0x1c], eax
mov byte [ebp - 4], 0x2d
lea ecx, [ebp - 0x1c]
push 0
push 0x100707ac
call fcn.10010b90
push ecx
lea eax, [ebp - 0x10]
mov ecx, esi
push eax
sub esp, 8
call fcn.1001b0f0
mov byte [ebp - 4], 0x2a
mov eax, edi
mov edx, dword [ebp - 0x1c]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x1003aee5
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x10]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], edi
dec edi
test edi, edi
jg 0x1003af04
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
test ebx, ebx
sete al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call fcn.1001af00
cmp byte [eax + 0x1c], 0
je 0x1003ad48
call fcn.1001af00
mov esi, eax
call fcn.10009f40
test eax, eax
je 0x1003b004
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [ebp - 0x10], eax
mov dword [ebp - 4], 0x16
lea ecx, [ebp - 0x10]
push 0x1e
push str.::NetGetDCName_failed._Error:
call fcn.10010b90
push ebx
lea ecx, [ebp - 0x10]
call fcn.1001b3b0
mov dword [ebp - 0x20], eax
call fcn.10009f40
test eax, eax
je 0x1003b004
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [ebp - 0x18], eax
mov byte [ebp - 4], 0x19
lea ecx, [ebp - 0x18]
push 0
push 0x100707ac
call fcn.10010b90
push ecx
push dword [ebp - 0x20]
mov ecx, esi
sub esp, 8
call fcn.1001b0f0
mov byte [ebp - 4], 0x16
mov eax, edi
mov edx, dword [ebp - 0x18]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x1003afc6
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov eax, edi
mov edx, dword [ebp - 0x10]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x1003ad48
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x1003ad48
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.10005390
int3