Function at 0x402cc0
Capabilities:
Get session user name
Get user security identifier

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
mov eax, dword [0x43100c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_GetUserNameW]
lea eax, [ebp - 0xc]
push edi
xor ebx, ebx
mov dword [ebp - 0x24], ecx
push eax
push ebx
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0xc], ebx
call esi
mov eax, dword [ebp - 0xc]
mov edi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
lea eax, [eax*2 + 2]
push eax
push 8
call edi
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
lea ecx, [ebp - 0xc]
mov dword [ebp - 0x18], eax
push ecx
push eax
call esi
mov esi, dword [ebp - 0x18]
test eax, eax
je 0x402e9a
lea eax, [ebp - 8]
mov dword [ebp - 0xc], ebx
push eax
lea eax, [ebp - 0x10]
mov dword [ebp - 0x10], ebx
push eax
push ebx
lea eax, [ebp - 0xc]
push eax
push ebx
push esi
push ebx
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
push dword [ebp - 0xc]
push 8
call edi
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
mov eax, dword [ebp - 0x10]
add eax, eax
push eax
push 8
call edi
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 0x1c], eax
test ebx, ebx
je 0x402e9a
test eax, eax
je 0x402e9a
lea ecx, [ebp - 8]
push ecx
lea ecx, [ebp - 0x10]
push ecx
push eax
lea eax, [ebp - 0xc]
push eax
push ebx
push esi
push 0
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
test eax, eax
je 0x402e9a
lea eax, [ebp - 0x14]
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_ConvertSidToStringSidW]
test eax, eax
je 0x402e9a
mov edi, dword [ebp - 0x14]
mov esi, edi
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x402db1
sub esi, ecx
sar esi, 1
push esi
call fcn.004152bc
add esp, 4
xorps xmm0, xmm0
movlpd qword [ebp - 0x20], xmm0
mov ebx, eax
test esi, esi
je 0x402df8
mov edx, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x20]
nop dword [eax]
mov al, byte [edi + ecx*2]
mov byte [ecx + ebx], al
add ecx, 1
adc edx, 0
xor eax, eax
cmp edx, eax
jl 0x402de0
jg 0x402df8
cmp ecx, esi
jb 0x402de0
mov ecx, ebx
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x28], 0xf
mov byte [ebp - 0x3c], 0
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x402e10
sub ecx, edx
push ecx
push ebx
lea ecx, [ebp - 0x3c]
call fcn.00413cf0
mov ebx, dword [ebp - 0x24]
lea eax, [ebp - 0x3c]
mov ecx, 0x28
cmp dword [ebp - 0x2c], ecx
cmovb ecx, dword [ebp - 0x2c]
cmp dword [ebp - 0x28], 0x10
push ecx
cmovae eax, dword [ebp - 0x3c]
mov ecx, ebx
push eax
mov dword [ebx + 0x10], 0
mov dword [ebx + 0x14], 0xf
mov byte [ebx], 0
call fcn.00413cf0
mov edx, dword [ebp - 0x28]
cmp edx, 0x10
jb 0x402e87
mov ecx, dword [ebp - 0x3c]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x402e7d
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402ed4
push edx
push ecx
call fcn.004152ae
add esp, 8
mov eax, ebx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00414c3c
mov esp, ebp
pop ebp
ret
push esi
push 0
call edi
mov esi, dword [sym.imp.KERNEL32.dll_HeapFree]
push eax
call esi
push ebx
push 0
call edi
push eax
call esi
push dword [ebp - 0x1c]
push 0
call edi
push eax
call esi
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00414c3c
mov esp, ebp
pop ebp
ret
call fcn.004186fc
int3