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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x65c
mov eax, dword [0x41a060]
xor eax, ebp
mov dword [ebp - 0xc], eax
mov dword [ebp - 4], 0
xor eax, eax
mov word [ebp - 0x648], ax
push 0x206
push 0
lea ecx, [ebp - 0x646]
push ecx
call fcn.00409d70
add esp, 0xc
mov dword [ebp - 0x438], 0x104
lea edx, [ebp - 0x438]
push edx
lea eax, [ebp - 0x648]
push eax
call dword [sym.imp.ADVAPI32.dll_GetUserNameW]
test eax, eax
jne 0x405f20
jmp 0x4061c0
xor ecx, ecx
mov word [ebp - 0x218], cx
push 0x206
push 0
lea edx, [ebp - 0x216]
push edx
call fcn.00409d70
add esp, 0xc
xor eax, eax
mov word [ebp - 0x430], ax
push 0x206
push 0
lea ecx, [ebp - 0x42e]
push ecx
call fcn.00409d70
add esp, 0xc
mov dword [ebp - 8], 0x208
mov dword [ebp - 0x220], 0x104
mov dword [ebp - 0x440], 7
lea edx, [ebp - 0x440]
push edx
lea eax, [ebp - 0x220]
push eax
lea ecx, [ebp - 0x430]
push ecx
lea edx, [ebp - 8]
push edx
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x648]
push ecx
push 0
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
test eax, eax
jne 0x405fb1
jmp 0x4061c0
lea edx, [ebp - 0x218]
push edx
call dword [sym.imp.ADVAPI32.dll_IsValidSid]
test eax, eax
jne 0x405fc7
jmp 0x4061c0
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.ADVAPI32.dll_GetSidIdentifierAuthority]
mov dword [ebp - 0x434], eax
cmp dword [ebp - 0x434], 0
jne 0x405fe8
jmp 0x4061c0
mov dword [ebp - 8], 0
push 1
push str.S__lu_
push 0x104
mov ecx, dword [ebp + 8]
push ecx
call fcn.004095f1
add esp, 0x10
mov dword [ebp - 0x228], eax
cmp dword [ebp - 0x228], 0xffffffff
jne 0x40601b
jmp 0x4061c0
mov edx, dword [ebp - 8]
add edx, dword [ebp - 0x228]
mov dword [ebp - 8], edx
mov eax, dword [ebp + 8]
mov dword [ebp - 0x650], eax
mov ecx, dword [ebp - 0x650]
add ecx, 2
mov dword [ebp - 0x654], ecx
mov edx, dword [ebp - 0x650]
mov ax, word [edx]
mov word [ebp - 0x656], ax
add dword [ebp - 0x650], 2
cmp word [ebp - 0x656], 0
jne 0x40603f
mov ecx, dword [ebp - 0x650]
sub ecx, dword [ebp - 0x654]
sar ecx, 1
mov dword [ebp - 0x65c], ecx
mov edx, dword [ebp - 0x434]
movzx eax, byte [edx + 5]
push eax
push 0x417074
mov ecx, 0x104
sub ecx, dword [ebp - 8]
push ecx
mov edx, dword [ebp - 0x65c]
mov eax, dword [ebp + 8]
lea ecx, [eax + edx*2]
push ecx
call fcn.004095f1
add esp, 0x10
mov dword [ebp - 0x228], eax
cmp dword [ebp - 0x228], 0xffffffff
jne 0x4060b6
jmp 0x4061c0
mov edx, dword [ebp - 8]
add edx, dword [ebp - 0x228]
mov dword [ebp - 8], edx
mov dword [ebp - 0x224], 0
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.ADVAPI32.dll_GetSidSubAuthorityCount]
mov dword [ebp - 0x43c], eax
cmp dword [ebp - 0x43c], 0
jne 0x4060ed
jmp 0x4061c0
mov ecx, dword [ebp - 0x43c]
movzx edx, byte [ecx]
mov dword [ebp - 0x21c], edx
cmp dword [ebp - 0x21c], 0xf
jbe 0x40610a
jmp 0x4061c0
mov dword [ebp - 4], 1
mov dword [ebp - 0x224], 0
jmp 0x40612c
mov eax, dword [ebp - 0x224]
add eax, 1
mov dword [ebp - 0x224], eax
mov ecx, dword [ebp - 0x224]
cmp ecx, dword [ebp - 0x21c]
jae 0x4061b8
mov edx, dword [ebp - 0x224]
push edx
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.ADVAPI32.dll_GetSidSubAuthority]
mov dword [ebp - 0x64c], eax
cmp dword [ebp - 0x64c], 0
jne 0x406166
mov dword [ebp - 4], 0
jmp 0x4061b8
mov ecx, dword [ebp - 0x64c]
mov edx, dword [ecx]
push edx
push str.__lu
mov eax, 0x104
sub eax, dword [ebp - 8]
push eax
mov ecx, dword [ebp - 8]
mov edx, dword [ebp + 8]
lea eax, [edx + ecx*2]
push eax
call fcn.004095f1
add esp, 0x10
mov dword [ebp - 0x228], eax
cmp dword [ebp - 0x228], 0xffffffff
jne 0x4061a7
mov dword [ebp - 4], 0
jmp 0x4061b8
mov ecx, dword [ebp - 8]
add ecx, dword [ebp - 0x228]
mov dword [ebp - 8], ecx
jmp 0x40611d
xor edx, edx
jne 0x405eda
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 0xc]
xor ecx, ebp
call fcn.004088e2
mov esp, ebp
pop ebp
ret