Function at 0x1002e32f
Capabilities:
Get domain controller name
Get hostname
Get user security identifier

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x114
mov eax, dword [0x1003b164]
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0xd0], eax
mov eax, dword [ebp + 0x18]
push ebx
mov ebx, dword [ebp + 0x1c]
and dword [ebx], 0
mov dword [ebp - 0xc4], eax
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
lea eax, [ebp - 0xa4]
mov dword [ebp - 0xb0], eax
lea eax, [ebp - 0xec]
push eax
lea eax, [ebp - 0xc0]
push eax
lea eax, [ebp - 0x64]
push eax
lea eax, [ebp - 0xac]
push eax
lea eax, [ebp - 0xa4]
mov dword [ebp - 0xd4], ecx
mov dword [ebp - 0xe8], ebx
mov dword [ebp - 0xbc], 1
mov dword [ebp - 0xc0], 0x10
mov dword [ebp - 0xac], 0x40
push eax
push esi
push 0
call edi
test eax, eax
je 0x1002e436
xor esi, esi
cmp dword [0x1003f3e0], esi
je 0x1002e3d2
mov dword [ebp + 0x10], esi
mov edi, dword [ebp - 0xb0]
push edi
call dword [sym.imp.ADVAPI32.dll_GetSidSubAuthorityCount]
movzx eax, byte [eax]
push eax
call dword [sym.imp.ADVAPI32.dll_GetSidLengthRequired]
cmp dword [ebp + 0x10], esi
mov dword [ebp - 0xac], eax
je 0x1002e7bb
cmp eax, dword [ebp + 0x14]
je 0x1002e76f
mov dword [ebp - 0xbc], esi
lea eax, [ebp - 0xa4]
cmp dword [ebp - 0xb0], eax
je 0x1002e421
push dword [ebp - 0xb0]
call fcn.1000bbb1
pop ecx
mov eax, dword [ebp - 0xbc]
mov ecx, dword [ebp - 4]
pop edi
pop esi
pop ebx
call fcn.10023cf0
leave
ret 0x18
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x1002e492
cmp dword [ebp - 0xc0], 0x10
ja 0x1002e48d
cmp dword [ebp - 0xac], 0x40
jbe 0x1002e48d
push dword [ebp - 0xac]
call fcn.1000bb9c
test eax, eax
pop ecx
mov dword [ebp - 0xb0], eax
je 0x1002e407
lea eax, [ebp - 0xec]
push eax
lea eax, [ebp - 0xc0]
push eax
lea eax, [ebp - 0x64]
push eax
lea eax, [ebp - 0xac]
push eax
push dword [ebp - 0xb0]
jmp 0x1002e3bc
xor eax, eax
inc eax
jmp 0x1002e427
cmp eax, 0x534
jne 0x1002e407
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenW]
push esi
call ebx
inc eax
mov dword [ebp - 0xa8], 0
je 0x1002e4ed
lea edi, [ebp - 0x24]
mov ecx, esi
sub edi, esi
cmp dword [ebp - 0xa8], 0xf
ja 0x1002e407
mov dx, word [ecx]
test dx, dx
je 0x1002e407
cmp dx, 0x5c
je 0x1002e52a
inc dword [ebp - 0xa8]
mov word [edi + ecx], dx
inc ecx
inc ecx
cmp dword [ebp - 0xa8], eax
jb 0x1002e4ba
lea eax, [ebp - 0xf0]
push eax
lea eax, [ebp - 0x44]
push eax
mov dword [ebp - 0xf0], 0x10
call dword [sym.imp.KERNEL32.dll_GetComputerNameW]
test eax, eax
je 0x1002e538
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x44]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x1002e538
and dword [ebp - 0xbc], 0
jmp 0x1002e407
mov eax, dword [ebp - 0xa8]
and word [ebp + eax*2 - 0x24], 0
jmp 0x1002e4ed
lea eax, [ebp - 0xc8]
push eax
push 0x10000
xor eax, eax
push eax
push eax
lea ecx, [ebp - 0x24]
push ecx
push eax
call dword [sym.imp.NETAPI32.dll_DsGetDcNameW]
test eax, eax
jne 0x1002e407
lea edi, [ebp - 0x110]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
lea eax, [ebp - 0xfc]
mov dword [ebp - 0x100], eax
mov eax, dword [ebp - 0xc8]
mov dword [ebp - 0xfc], 0xc
mov dword [ebp - 0xf8], 2
mov byte [ebp - 0xf4], 1
mov byte [ebp - 0xf3], 0
mov dword [ebp - 0x114], 0x18
mov eax, dword [eax]
push eax
mov dword [ebp - 0xe0], eax
call ebx
shl eax, 1
mov word [ebp - 0xe4], ax
mov eax, dword [ebp - 0xe4]
add eax, 2
mov word [ebp - 0xe2], ax
lea eax, [ebp - 0xcc]
push eax
push 0x800
lea eax, [ebp - 0x114]
push eax
lea eax, [ebp - 0xe4]
push eax
call sub.ADVAPI32.dll_LsaOpenPolicy
push dword [ebp - 0xc8]
mov edi, eax
call sub.NETAPI32.dll_NetApiBufferFree
test edi, edi
jne 0x1002e407
and dword [ebp - 0xb8], edi
and dword [ebp - 0xb4], edi
push esi
mov dword [ebp - 0xd8], esi
call ebx
shl eax, 1
mov word [ebp - 0xdc], ax
mov eax, dword [ebp - 0xdc]
add eax, 2
mov word [ebp - 0xda], ax
lea eax, [ebp - 0xb4]
push eax
lea eax, [ebp - 0xb8]
push eax
lea eax, [ebp - 0xdc]
push eax
push 1
push dword [ebp - 0xcc]
call sub.ADVAPI32.dll_LsaLookupNames
push dword [ebp - 0xcc]
mov esi, eax
call sub.ADVAPI32.dll_LsaClose
cmp esi, edi
je 0x1002e68e
cmp dword [ebp - 0xb8], edi
je 0x1002e670
push dword [ebp - 0xb8]
call sub.ADVAPI32.dll_LsaFreeMemory
cmp dword [ebp - 0xb4], edi
je 0x1002e683
push dword [ebp - 0xb4]
call sub.ADVAPI32.dll_LsaFreeMemory
mov dword [ebp - 0xbc], edi
jmp 0x1002e407
mov eax, dword [ebp - 0xb4]
mov eax, dword [eax + 8]
mov ecx, dword [ebp - 0xb8]
mov ecx, dword [ecx + 4]
mov edi, dword [sym.imp.ADVAPI32.dll_GetSidSubAuthorityCount]
lea eax, [eax + eax*2]
mov esi, dword [ecx + eax*4 + 8]
push esi
call edi
mov bl, byte [eax]
mov eax, dword [ebp - 0xb4]
cmp dword [eax], 3
mov byte [ebp - 0xa8], bl
je 0x1002e6cb
inc bl
mov byte [ebp - 0xa8], bl
push dword [ebp - 0xa8]
call dword [sym.imp.ADVAPI32.dll_GetSidLengthRequired]
cmp eax, 0x40
mov dword [ebp - 0xac], eax
jbe 0x1002e70e
push eax
call fcn.1000bb9c
test eax, eax
pop ecx
mov dword [ebp - 0xb0], eax
jne 0x1002e70e
push dword [ebp - 0xb8]
call sub.ADVAPI32.dll_LsaFreeMemory
push dword [ebp - 0xb4]
call sub.ADVAPI32.dll_LsaFreeMemory
jmp 0x1002e407
push esi
push dword [ebp - 0xb0]
push dword [ebp - 0xac]
call dword [sym.imp.ADVAPI32.dll_CopySid]
push dword [ebp - 0xb0]
call edi
mov byte [eax], bl
mov eax, dword [ebp - 0xb4]
cmp dword [eax], 3
je 0x1002e74e
lea esi, [eax + 4]
movzx eax, bl
dec eax
push eax
push dword [ebp - 0xb0]
call dword [sym.imp.ADVAPI32.dll_GetSidSubAuthority]
mov ecx, dword [esi]
mov dword [eax], ecx
push dword [ebp - 0xb8]
call sub.ADVAPI32.dll_LsaFreeMemory
push dword [ebp - 0xb4]
call sub.ADVAPI32.dll_LsaFreeMemory
mov ebx, dword [ebp - 0xe8]
jmp 0x1002e3c5
mov edi, dword [ebp + 0x10]
mov esi, dword [ebp - 0xb0]
mov ecx, eax
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
jne 0x1002e51e
push dword [ebp - 0xac]
call fcn.1000bb9c
test eax, eax
pop ecx
mov dword [ebx], eax
je 0x1002e407
mov ecx, dword [ebp - 0xac]
mov esi, dword [ebp - 0xb0]
mov edi, eax
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x1002e407
mov ecx, dword [ebp - 0xd4]
push edi
call fcn.1002e22d
test eax, eax
je 0x1002e860
lea eax, [ebp - 0xa8]
push eax
push edi
mov dword [ebp - 0xa8], esi
call dword [sym.imp.ADVAPI32.dll_ConvertSidToStringSidW]
test eax, eax
je 0x1002e860
push dword [ebp - 0xa8]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [eax + eax + 2]
push eax
call dword [sym.imp.ole32.dll_CoTaskMemAlloc]
push dword [ebp - 0xa8]
mov esi, eax
test esi, esi
jne 0x1002e81b
and dword [ebp - 0xbc], eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x1002e407
push esi
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push dword [ebp - 0xa8]
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov ecx, dword [ebp - 0xd4]
push edi
push dword [ebp - 0xac]
push esi
push dword [ebp - 0xd0]
call fcn.1002e258
test eax, eax
jl 0x1002e407
mov eax, dword [ebp - 0xc4]
mov dword [eax], 1
jmp 0x1002e784
mov esi, dword [ebp - 0xd0]
mov eax, dword [esi]
push esi
call dword [eax + 0x40]
test eax, eax
jl 0x1002e407
mov eax, dword [esi]
push edi
push dword [ebp - 0xac]
push 3
push esi
call dword [eax + 0x50]
test eax, eax
jl 0x1002e407
mov eax, dword [esi]
push esi
call dword [eax + 0x48]
test eax, eax
jge 0x1002e84f
jmp 0x1002e784