Function at 0x10023960
Capabilities:
Get domain controller name

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100460b5
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
push ebx
push esi
push edi
mov eax, dword [0x10067024]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x1c], edx
mov esi, ecx
call fcn.1000f4f0
or edi, 0xffffffff
cmp byte [eax + 0x1c], 0
je 0x10023a51
call fcn.1000f4f0
mov ebx, eax
call fcn.10008f70
test eax, eax
je 0x10023e9c
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.1000f7d0
mov dword [ebp - 0x20], eax
call fcn.10008f70
test eax, eax
je 0x10023e9c
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 0x10053794
call fcn.1000b130
push ecx
push dword [ebp - 0x20]
mov ecx, ebx
sub esp, 8
call fcn.1000f690
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 0x10023a30
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 0x10023a51
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
call fcn.1000f4f0
cmp byte [eax + 0x1c], 0
je 0x10023b34
call fcn.1000f4f0
mov ebx, eax
call fcn.10008f70
test eax, eax
je 0x10023e9c
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.1000b130
test esi, esi
je 0x10023ab9
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10023aa0
sub ecx, edx
sar ecx, 1
push ecx
push esi
lea ecx, [ebp - 0x10]
call fcn.1000b130
call fcn.10008f70
test eax, eax
je 0x10023e9c
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 0x10053794
call fcn.1000b130
push ecx
lea eax, [ebp - 0x10]
mov ecx, ebx
push eax
sub esp, 8
call fcn.1000f690
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 0x10023b13
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 0x10023b34
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
test esi, esi
je 0x10023e88
xor ecx, ecx
mov eax, esi
cmp word [esi], cx
je 0x10023e88
nop dword [eax]
add eax, 2
inc ecx
cmp word [eax], 0
jne 0x10023b50
test ecx, ecx
je 0x10023e88
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 0x10023bed
mov ecx, dword [ebp - 0x14]
xor esi, esi
cmp word [ecx], si
je 0x10023b9a
nop dword [eax]
lea ecx, [ecx + 2]
inc esi
cmp word [ecx], 0
jne 0x10023b90
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 0x10023be3
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 0x10023bd0
xor eax, eax
mov word [ecx], ax
jmp 0x10023cb6
call fcn.1000f4f0
cmp byte [eax + 0x1c], 0
je 0x10023cb6
call fcn.1000f4f0
mov esi, eax
call fcn.10008f70
test eax, eax
je 0x10023e9c
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.1000b130
push ebx
lea ecx, [ebp - 0x10]
call fcn.1000fa30
mov ebx, eax
call fcn.10008f70
test eax, eax
je 0x10023e9c
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 0x10053794
call fcn.1000b130
push ecx
push ebx
sub esp, 8
mov ecx, esi
call fcn.1000f690
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 0x10023c95
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 0x10023cb6
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x10023cc4
push eax
call dword [sym.imp.NETAPI32.dll_NetApiBufferFree]
call fcn.1000f4f0
cmp byte [eax + 0x1c], 0
je 0x10023db3
call fcn.1000f4f0
mov esi, eax
mov dword [ebp - 0x20], esi
call fcn.10008f70
test eax, eax
je 0x10023e9c
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.1000f7d0
mov edx, dword [ebp - 0x1c]
mov ebx, eax
mov edx, dword [edx + 4]
test edx, edx
je 0x10023d3b
mov ecx, edx
lea esi, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10023d20
sub ecx, esi
sar ecx, 1
push ecx
push edx
mov ecx, ebx
call fcn.1000b130
mov esi, dword [ebp - 0x20]
call fcn.10008f70
test eax, eax
je 0x10023e9c
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 0x10053794
call fcn.1000b130
push ecx
push ebx
sub esp, 8
mov ecx, esi
call fcn.1000f690
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 0x10023d92
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 0x10023db3
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
call fcn.1000f4f0
cmp byte [eax + 0x1c], 0
je 0x10023e6f
call fcn.1000f4f0
mov esi, eax
call fcn.10008f70
test eax, eax
je 0x10023e9c
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.1000f7d0
mov ebx, eax
call fcn.10008f70
test eax, eax
je 0x10023e9c
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 0x10053794
call fcn.1000b130
push ecx
push ebx
sub esp, 8
mov ecx, esi
call fcn.1000f690
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 0x10023e50
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 0x10023e6f
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.10008190
int3