Function at 0x10048320
Capabilities:
Get domain controller name

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1007a5b5
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
push ebx
push esi
push edi
mov eax, dword [0x100c0040]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x20], edx
mov dword [ebp - 0x1c], ecx
call fcn.100218f0
or ebx, 0xffffffff
cmp byte [eax + 0x1c], 0
je 0x10048458
call fcn.100218f0
mov dword [ebp - 0x24], eax
call fcn.1000a960
mov edi, eax
test edi, edi
je 0x100489c6
mov ecx, dword [edi]
mov esi, dword [ecx + 0xc]
mov ecx, esi
call dword [0x1007d584]
mov ecx, edi
call esi
add eax, 0x10
mov dword [ebp - 0x10], eax
mov dword [ebp - 4], 2
lea ecx, [ebp - 0x10]
push str.GetDomainControllerName_start.
call fcn.10016170
call fcn.1000a960
mov edi, eax
test edi, edi
je 0x100489c6
mov ecx, dword [edi]
mov esi, dword [ecx + 0xc]
mov ecx, esi
call dword [0x1007d584]
mov ecx, edi
call esi
add eax, 0x10
mov dword [ebp - 0x18], eax
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x18]
push 0
push 0x100a416c
call fcn.10014a40
mov esi, dword [ebp - 0x24]
mov eax, dword [esi + 0x38]
test eax, eax
je 0x10048401
push str.AiEmbeddedDirectCall
push eax
call dword [sym.imp.msi.dll_MsiGetComponentStateW]
cmp eax, 1
je 0x10048401
lea eax, [ebp - 0x10]
mov ecx, esi
push eax
call fcn.10021b10
mov byte [ebp - 4], 2
mov eax, ebx
mov ecx, dword [ebp - 0x18]
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x1004842b
mov edi, dword [ecx]
push ecx
mov eax, dword [edi]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x1007d584]
mov ecx, edi
call esi
mov dword [ebp - 4], 0xffffffff
mov eax, ebx
mov ecx, dword [ebp - 0x10]
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x10048458
mov edi, dword [ecx]
push ecx
mov eax, dword [edi]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x1007d584]
mov ecx, edi
call esi
call fcn.100218f0
cmp byte [eax + 0x1c], 0
je 0x10048586
call fcn.100218f0
mov dword [ebp - 0x24], eax
call fcn.1000a960
mov edi, eax
test edi, edi
je 0x100489c6
mov ecx, dword [edi]
mov esi, dword [ecx + 0xc]
mov ecx, esi
call dword [0x1007d584]
mov ecx, edi
call esi
add eax, 0x10
mov dword [ebp - 0x10], eax
mov dword [ebp - 4], 0xc
lea ecx, [ebp - 0x10]
push 8
push str.Domain:
call fcn.10014a40
mov edx, dword [ebp - 0x1c]
test edx, edx
je 0x100484d0
mov ecx, edx
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x100484b7
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x10]
call fcn.10014a40
call fcn.1000a960
mov edi, eax
test edi, edi
je 0x100489c6
mov ecx, dword [edi]
mov esi, dword [ecx + 0xc]
mov ecx, esi
call dword [0x1007d584]
mov ecx, edi
call esi
add eax, 0x10
mov dword [ebp - 0x18], eax
mov byte [ebp - 4], 0xf
lea ecx, [ebp - 0x18]
push 0
push 0x100a416c
call fcn.10014a40
mov esi, dword [ebp - 0x24]
mov eax, dword [esi + 0x38]
test eax, eax
je 0x1004852f
push str.AiEmbeddedDirectCall
push eax
call dword [sym.imp.msi.dll_MsiGetComponentStateW]
cmp eax, 1
je 0x1004852f
lea eax, [ebp - 0x10]
mov ecx, esi
push eax
call fcn.10021b10
mov byte [ebp - 4], 0xc
mov eax, ebx
mov ecx, dword [ebp - 0x18]
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x10048559
mov edi, dword [ecx]
push ecx
mov eax, dword [edi]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x1007d584]
mov ecx, edi
call esi
mov dword [ebp - 4], 0xffffffff
mov eax, ebx
mov ecx, dword [ebp - 0x10]
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x10048586
mov edi, dword [ecx]
push ecx
mov eax, dword [edi]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x1007d584]
mov ecx, edi
call esi
mov edx, dword [ebp - 0x1c]
test edx, edx
je 0x100489b2
xor ecx, ecx
mov eax, edx
cmp word [edx], cx
je 0x100489b2
nop
add eax, 2
inc ecx
cmp word [eax], 0
jne 0x100485a0
test ecx, ecx
je 0x100489b2
lea eax, [ebp - 0x14]
mov dword [ebp - 0x14], 0
push eax
push edx
push 0
call dword [sym.imp.NETAPI32.dll_NetGetDCName]
mov dword [ebp - 0x18], eax
test eax, eax
jne 0x10048893
mov ecx, dword [ebp - 0x14]
xor esi, esi
cmp word [ecx], si
je 0x100485ea
nop dword [eax + eax]
lea ecx, [ecx + 2]
inc esi
cmp word [ecx], 0
jne 0x100485e0
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 - 0x20]
mov dword [eax + 4], ecx
mov dword [eax], esi
movzx eax, word [edx]
test ax, ax
je 0x10048633
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 0x10048620
xor eax, eax
mov word [ecx], ax
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x10048646
push eax
call dword [sym.imp.NETAPI32.dll_NetApiBufferFree]
call fcn.100218f0
cmp byte [eax + 0x1c], 0
je 0x10048775
call fcn.100218f0
mov dword [ebp - 0x28], eax
call fcn.1000a960
mov edi, eax
test edi, edi
je 0x100489c6
mov ecx, dword [edi]
mov esi, dword [ecx + 0xc]
mov ecx, esi
call dword [0x1007d584]
mov ecx, edi
call esi
add eax, 0x10
mov dword [ebp - 0x10], eax
mov dword [ebp - 4], 0x20
lea ecx, [ebp - 0x10]
push str.Domain_controller_name:
call fcn.10016170
mov eax, dword [ebp - 0x20]
mov edx, dword [eax + 4]
test edx, edx
je 0x100486bf
mov ecx, edx
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x100486a6
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x10]
call fcn.10014a40
call fcn.1000a960
mov edi, eax
test edi, edi
je 0x100489c6
mov ecx, dword [edi]
mov esi, dword [ecx + 0xc]
mov ecx, esi
call dword [0x1007d584]
mov ecx, edi
call esi
add eax, 0x10
mov dword [ebp - 0x20], eax
mov byte [ebp - 4], 0x23
lea ecx, [ebp - 0x20]
push 0
push 0x100a416c
call fcn.10014a40
mov esi, dword [ebp - 0x28]
mov eax, dword [esi + 0x38]
test eax, eax
je 0x1004871e
push str.AiEmbeddedDirectCall
push eax
call dword [sym.imp.msi.dll_MsiGetComponentStateW]
cmp eax, 1
je 0x1004871e
lea eax, [ebp - 0x10]
mov ecx, esi
push eax
call fcn.10021b10
mov byte [ebp - 4], 0x20
mov eax, ebx
mov ecx, dword [ebp - 0x20]
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x10048748
mov edi, dword [ecx]
push ecx
mov eax, dword [edi]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x1007d584]
mov ecx, edi
call esi
mov dword [ebp - 4], 0xffffffff
mov eax, ebx
mov ecx, dword [ebp - 0x10]
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x10048775
mov edi, dword [ecx]
push ecx
mov eax, dword [edi]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x1007d584]
mov ecx, edi
call esi
call fcn.100218f0
cmp byte [eax + 0x1c], 0
je 0x1004887a
call fcn.100218f0
mov dword [ebp - 0x28], eax
call fcn.1000a960
mov edi, eax
test edi, edi
je 0x100489c6
mov ecx, dword [edi]
mov esi, dword [ecx + 0xc]
mov ecx, esi
call dword [0x1007d584]
mov ecx, edi
call esi
add eax, 0x10
mov dword [ebp - 0x10], eax
mov dword [ebp - 4], 0x2a
lea ecx, [ebp - 0x10]
push str.GetDomainControllerName_end.
call fcn.10016170
call fcn.1000a960
mov edi, eax
test edi, edi
je 0x100489c6
mov ecx, dword [edi]
mov esi, dword [ecx + 0xc]
mov ecx, esi
call dword [0x1007d584]
mov ecx, edi
call esi
add eax, 0x10
mov dword [ebp - 0x20], eax
mov byte [ebp - 4], 0x2d
lea ecx, [ebp - 0x20]
push 0
push 0x100a416c
call fcn.10014a40
mov esi, dword [ebp - 0x28]
mov eax, dword [esi + 0x38]
test eax, eax
je 0x10048825
push str.AiEmbeddedDirectCall
push eax
call dword [sym.imp.msi.dll_MsiGetComponentStateW]
cmp eax, 1
je 0x10048825
lea eax, [ebp - 0x10]
mov ecx, esi
push eax
call fcn.10021b10
mov byte [ebp - 4], 0x2a
mov eax, ebx
mov ecx, dword [ebp - 0x20]
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x1004884f
mov edi, dword [ecx]
push ecx
mov eax, dword [edi]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x1007d584]
mov ecx, edi
call esi
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x10]
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x1004887a
mov edi, dword [ecx]
push ecx
mov eax, dword [edi]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x1007d584]
mov ecx, edi
call esi
cmp dword [ebp - 0x18], 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
call fcn.100218f0
cmp byte [eax + 0x1c], 0
je 0x10048638
call fcn.100218f0
mov dword [ebp - 0x24], eax
call fcn.1000a960
mov edi, eax
test edi, edi
je 0x100489c6
mov ecx, dword [edi]
mov esi, dword [ecx + 0xc]
mov ecx, esi
call dword [0x1007d584]
mov ecx, edi
call esi
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.10014a40
push dword [ebp - 0x18]
lea ecx, [ebp - 0x10]
call fcn.10021e30
mov dword [ebp - 0x28], eax
call fcn.1000a960
mov edi, eax
test edi, edi
je 0x100489c6
mov ecx, dword [edi]
mov esi, dword [ecx + 0xc]
mov ecx, esi
call dword [0x1007d584]
mov ecx, edi
call esi
add eax, 0x10
mov dword [ebp - 0x1c], eax
mov byte [ebp - 4], 0x19
lea ecx, [ebp - 0x1c]
push 0
push 0x100a416c
call fcn.10014a40
mov esi, dword [ebp - 0x24]
mov eax, dword [esi + 0x38]
test eax, eax
je 0x10048952
push str.AiEmbeddedDirectCall
push eax
call dword [sym.imp.msi.dll_MsiGetComponentStateW]
cmp eax, 1
je 0x10048952
push dword [ebp - 0x28]
mov ecx, esi
call fcn.10021b10
mov byte [ebp - 4], 0x16
mov eax, ebx
mov ecx, dword [ebp - 0x1c]
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x1004897c
mov edi, dword [ecx]
push ecx
mov eax, dword [edi]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x1007d584]
mov ecx, edi
call esi
mov dword [ebp - 4], 0xffffffff
mov eax, ebx
mov ecx, dword [ebp - 0x10]
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x10048638
mov edi, dword [ecx]
push ecx
mov eax, dword [edi]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x1007d584]
mov ecx, edi
call esi
jmp 0x10048638
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