Function at 0x10042150
Capabilities:
Get domain controller name

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1006b3c5
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
push ebx
push esi
push edi
mov eax, dword [0x100ad040]
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.1001cd60
or ebx, 0xffffffff
cmp byte [eax + 0x1c], 0
je 0x10042288
call fcn.1001cd60
mov dword [ebp - 0x24], eax
call fcn.1000a220
mov edi, eax
test edi, edi
je 0x100427f6
mov ecx, dword [edi]
mov esi, dword [ecx + 0xc]
mov ecx, esi
call dword [0x1006e578]
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.10012f10
call fcn.1000a220
mov edi, eax
test edi, edi
je 0x100427f6
mov ecx, dword [edi]
mov esi, dword [ecx + 0xc]
mov ecx, esi
call dword [0x1006e578]
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 0x10093cf4
call fcn.100117e0
mov esi, dword [ebp - 0x24]
mov eax, dword [esi + 0x38]
test eax, eax
je 0x10042231
push str.AiEmbeddedDirectCall
push eax
call dword [sym.imp.msi.dll_MsiGetComponentStateW]
cmp eax, 1
je 0x10042231
lea eax, [ebp - 0x10]
mov ecx, esi
push eax
call fcn.1001cf80
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 0x1004225b
mov edi, dword [ecx]
push ecx
mov eax, dword [edi]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x1006e578]
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 0x10042288
mov edi, dword [ecx]
push ecx
mov eax, dword [edi]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x1006e578]
mov ecx, edi
call esi
call fcn.1001cd60
cmp byte [eax + 0x1c], 0
je 0x100423b6
call fcn.1001cd60
mov dword [ebp - 0x24], eax
call fcn.1000a220
mov edi, eax
test edi, edi
je 0x100427f6
mov ecx, dword [edi]
mov esi, dword [ecx + 0xc]
mov ecx, esi
call dword [0x1006e578]
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.100117e0
mov edx, dword [ebp - 0x1c]
test edx, edx
je 0x10042300
mov ecx, edx
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x100422e7
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x10]
call fcn.100117e0
call fcn.1000a220
mov edi, eax
test edi, edi
je 0x100427f6
mov ecx, dword [edi]
mov esi, dword [ecx + 0xc]
mov ecx, esi
call dword [0x1006e578]
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 0x10093cf4
call fcn.100117e0
mov esi, dword [ebp - 0x24]
mov eax, dword [esi + 0x38]
test eax, eax
je 0x1004235f
push str.AiEmbeddedDirectCall
push eax
call dword [sym.imp.msi.dll_MsiGetComponentStateW]
cmp eax, 1
je 0x1004235f
lea eax, [ebp - 0x10]
mov ecx, esi
push eax
call fcn.1001cf80
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 0x10042389
mov edi, dword [ecx]
push ecx
mov eax, dword [edi]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x1006e578]
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 0x100423b6
mov edi, dword [ecx]
push ecx
mov eax, dword [edi]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x1006e578]
mov ecx, edi
call esi
mov edx, dword [ebp - 0x1c]
test edx, edx
je 0x100427e2
xor ecx, ecx
mov eax, edx
cmp word [edx], cx
je 0x100427e2
nop
add eax, 2
inc ecx
cmp word [eax], 0
jne 0x100423d0
test ecx, ecx
je 0x100427e2
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 0x100426c3
mov ecx, dword [ebp - 0x14]
xor esi, esi
cmp word [ecx], si
je 0x1004241a
nop dword [eax + eax]
lea ecx, [ecx + 2]
inc esi
cmp word [ecx], 0
jne 0x10042410
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 0x10042463
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 0x10042450
xor eax, eax
mov word [ecx], ax
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x10042476
push eax
call dword [sym.imp.NETAPI32.dll_NetApiBufferFree]
call fcn.1001cd60
cmp byte [eax + 0x1c], 0
je 0x100425a5
call fcn.1001cd60
mov dword [ebp - 0x28], eax
call fcn.1000a220
mov edi, eax
test edi, edi
je 0x100427f6
mov ecx, dword [edi]
mov esi, dword [ecx + 0xc]
mov ecx, esi
call dword [0x1006e578]
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.10012f10
mov eax, dword [ebp - 0x20]
mov edx, dword [eax + 4]
test edx, edx
je 0x100424ef
mov ecx, edx
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x100424d6
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x10]
call fcn.100117e0
call fcn.1000a220
mov edi, eax
test edi, edi
je 0x100427f6
mov ecx, dword [edi]
mov esi, dword [ecx + 0xc]
mov ecx, esi
call dword [0x1006e578]
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 0x10093cf4
call fcn.100117e0
mov esi, dword [ebp - 0x28]
mov eax, dword [esi + 0x38]
test eax, eax
je 0x1004254e
push str.AiEmbeddedDirectCall
push eax
call dword [sym.imp.msi.dll_MsiGetComponentStateW]
cmp eax, 1
je 0x1004254e
lea eax, [ebp - 0x10]
mov ecx, esi
push eax
call fcn.1001cf80
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 0x10042578
mov edi, dword [ecx]
push ecx
mov eax, dword [edi]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x1006e578]
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 0x100425a5
mov edi, dword [ecx]
push ecx
mov eax, dword [edi]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x1006e578]
mov ecx, edi
call esi
call fcn.1001cd60
cmp byte [eax + 0x1c], 0
je 0x100426aa
call fcn.1001cd60
mov dword [ebp - 0x28], eax
call fcn.1000a220
mov edi, eax
test edi, edi
je 0x100427f6
mov ecx, dword [edi]
mov esi, dword [ecx + 0xc]
mov ecx, esi
call dword [0x1006e578]
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.10012f10
call fcn.1000a220
mov edi, eax
test edi, edi
je 0x100427f6
mov ecx, dword [edi]
mov esi, dword [ecx + 0xc]
mov ecx, esi
call dword [0x1006e578]
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 0x10093cf4
call fcn.100117e0
mov esi, dword [ebp - 0x28]
mov eax, dword [esi + 0x38]
test eax, eax
je 0x10042655
push str.AiEmbeddedDirectCall
push eax
call dword [sym.imp.msi.dll_MsiGetComponentStateW]
cmp eax, 1
je 0x10042655
lea eax, [ebp - 0x10]
mov ecx, esi
push eax
call fcn.1001cf80
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 0x1004267f
mov edi, dword [ecx]
push ecx
mov eax, dword [edi]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x1006e578]
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 0x100426aa
mov edi, dword [ecx]
push ecx
mov eax, dword [edi]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x1006e578]
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.1001cd60
cmp byte [eax + 0x1c], 0
je 0x10042468
call fcn.1001cd60
mov dword [ebp - 0x24], eax
call fcn.1000a220
mov edi, eax
test edi, edi
je 0x100427f6
mov ecx, dword [edi]
mov esi, dword [ecx + 0xc]
mov ecx, esi
call dword [0x1006e578]
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.100117e0
push dword [ebp - 0x18]
lea ecx, [ebp - 0x10]
call fcn.1001d2a0
mov dword [ebp - 0x28], eax
call fcn.1000a220
mov edi, eax
test edi, edi
je 0x100427f6
mov ecx, dword [edi]
mov esi, dword [ecx + 0xc]
mov ecx, esi
call dword [0x1006e578]
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 0x10093cf4
call fcn.100117e0
mov esi, dword [ebp - 0x24]
mov eax, dword [esi + 0x38]
test eax, eax
je 0x10042782
push str.AiEmbeddedDirectCall
push eax
call dword [sym.imp.msi.dll_MsiGetComponentStateW]
cmp eax, 1
je 0x10042782
push dword [ebp - 0x28]
mov ecx, esi
call fcn.1001cf80
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 0x100427ac
mov edi, dword [ecx]
push ecx
mov eax, dword [edi]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x1006e578]
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 0x10042468
mov edi, dword [ecx]
push ecx
mov eax, dword [edi]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x1006e578]
mov ecx, edi
call esi
jmp 0x10042468
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