Function at 0x1001c2c0
Capabilities:
Get domain controller name

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1003aad5
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
push ebx
push esi
push edi
mov eax, dword [0x10059024]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x1c], edx
mov esi, ecx
call fcn.10009700
or edi, 0xffffffff
cmp byte [eax + 0x1c], 0
je 0x1001c3b3
call fcn.10009700
mov ebx, eax
call fcn.100050e0
test eax, eax
je 0x1001c7fe
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [ebp - 0x18], eax
mov dword [ebp - 4], 2
lea ecx, [ebp - 0x18]
push str.GetDomainControllerName_start.
call fcn.10009ad0
mov dword [ebp - 0x20], eax
call fcn.100050e0
test eax, eax
je 0x1001c7fe
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [ebp - 0x10], eax
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x10]
push 0
push 0x100469b0
call fcn.10005de0
cmp dword [ebx + 0x38], 0
je 0x1001c374
push dword [ebp - 0x20]
mov ecx, ebx
call fcn.100098a0
mov byte [ebp - 4], 2
mov eax, edi
mov edx, dword [ebp - 0x10]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x1001c392
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 - 0x18]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x1001c3b3
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
call fcn.10009700
cmp byte [eax + 0x1c], 0
je 0x1001c498
call fcn.10009700
mov ebx, eax
call fcn.100050e0
test eax, eax
je 0x1001c7fe
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.10005de0
test esi, esi
je 0x1001c41b
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x1001c402
sub ecx, edx
sar ecx, 1
push ecx
push esi
lea ecx, [ebp - 0x10]
call fcn.10005de0
call fcn.100050e0
test eax, eax
je 0x1001c7fe
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 0x100469b0
call fcn.10005de0
cmp dword [ebx + 0x38], 0
je 0x1001c459
lea eax, [ebp - 0x10]
mov ecx, ebx
push eax
call fcn.100098a0
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 0x1001c477
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 0x1001c498
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
test esi, esi
je 0x1001c7ea
xor ecx, ecx
mov eax, esi
cmp word [esi], cx
je 0x1001c7ea
nop dword [eax]
add eax, 2
inc ecx
cmp word [eax], 0
jne 0x1001c4b0
test ecx, ecx
je 0x1001c7ea
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
mov dword [ebp - 0x24], ebx
test ebx, ebx
jne 0x1001c54d
mov ecx, dword [ebp - 0x14]
xor esi, esi
cmp word [ecx], si
je 0x1001c4fa
nop dword [eax]
lea ecx, [ecx + 2]
inc esi
cmp word [ecx], 0
jne 0x1001c4f0
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 0x1001c543
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 0x1001c530
xor eax, eax
mov word [ecx], ax
jmp 0x1001c618
call fcn.10009700
cmp byte [eax + 0x1c], 0
je 0x1001c618
call fcn.10009700
mov esi, eax
call fcn.100050e0
test eax, eax
je 0x1001c7fe
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.10005de0
push ebx
lea ecx, [ebp - 0x10]
call fcn.10009d30
mov ebx, eax
call fcn.100050e0
test eax, eax
je 0x1001c7fe
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 0x100469b0
call fcn.10005de0
cmp dword [esi + 0x38], 0
je 0x1001c5d9
push ebx
mov ecx, esi
call fcn.100098a0
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 0x1001c5f7
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 0x1001c618
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x1001c626
push eax
call dword [sym.imp.NETAPI32.dll_NetApiBufferFree]
call fcn.10009700
cmp byte [eax + 0x1c], 0
je 0x1001c713
call fcn.10009700
mov esi, eax
call fcn.100050e0
test eax, eax
je 0x1001c7fe
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [ebp - 0x18], eax
mov dword [ebp - 4], 0x20
lea ecx, [ebp - 0x18]
push str.Domain_controller_name:
call fcn.10009ad0
mov edx, dword [ebp - 0x1c]
mov ebx, eax
mov edx, dword [edx + 4]
test edx, edx
je 0x1001c699
mov ecx, edx
lea eax, [ecx + 2]
mov dword [ebp - 0x20], eax
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x1001c680
sub ecx, dword [ebp - 0x20]
sar ecx, 1
push ecx
push edx
mov ecx, ebx
call fcn.10005de0
call fcn.100050e0
test eax, eax
je 0x1001c7fe
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 0x100469b0
call fcn.10005de0
cmp dword [esi + 0x38], 0
je 0x1001c6d4
push ebx
mov ecx, esi
call fcn.100098a0
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 0x1001c6f2
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 - 0x18]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x1001c713
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
call fcn.10009700
cmp byte [eax + 0x1c], 0
je 0x1001c7d1
call fcn.10009700
mov esi, eax
call fcn.100050e0
test eax, eax
je 0x1001c7fe
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [ebp - 0x18], eax
mov dword [ebp - 4], 0x2a
lea ecx, [ebp - 0x18]
push str.GetDomainControllerName_end.
call fcn.10009ad0
mov ebx, eax
call fcn.100050e0
test eax, eax
je 0x1001c7fe
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 0x100469b0
call fcn.10005de0
cmp dword [esi + 0x38], 0
je 0x1001c794
push ebx
mov ecx, esi
call fcn.100098a0
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 0x1001c7b2
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x18]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], edi
dec edi
test edi, edi
jg 0x1001c7d1
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
cmp dword [ebp - 0x24], 0
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
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.10003760
int3