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

Disassembly:
mov eax, 0x1414
call fcn.004095c0
mov eax, dword [0x41c690]
xor eax, esp
mov dword [esp + 0x1410], eax
mov eax, dword [0x41c04c]
mov ecx, dword [eax + 8]
mov eax, dword [esp + 0x1418]
push esi
mov dword [ecx + 4], eax
mov ecx, dword [esp + 0x1420]
xor esi, esi
cmp ecx, esi
je 0x4054fa
mov eax, ecx
mov edx, dword [0x41c04c]
mov ecx, dword [edx + 8]
mov dword [ecx + 8], eax
mov edx, dword [0x41c04c]
mov eax, dword [edx + 8]
mov dword [eax + 0xc], esi
mov ecx, dword [0x41c04c]
mov edx, dword [ecx + 8]
mov dword [edx + 0x10], esi
mov eax, dword [0x41c04c]
mov ecx, dword [eax + 8]
mov dword [ecx + 0x14], esi
mov edx, dword [0x41c04c]
mov eax, dword [edx + 8]
mov dword [eax + 0x34], esi
mov ecx, dword [0x41c04c]
mov edx, dword [ecx + 8]
mov eax, 1
mov dword [edx + 0x38], eax
mov ecx, dword [0x41c04c]
mov edx, dword [ecx + 8]
mov dword [edx + 0x3c], esi
mov ecx, dword [0x41c04c]
mov edx, dword [ecx + 8]
mov dword [edx + 0x40], esi
mov ecx, dword [0x41c04c]
mov edx, dword [ecx + 8]
mov dword [edx + 0x44], 0xf01ff
mov ecx, dword [0x41c04c]
mov edx, dword [ecx + 8]
mov dword [edx + 0x48], 0x110
mov ecx, dword [0x41c04c]
mov edx, dword [ecx + 8]
mov dword [edx + 0x4c], 2
mov ecx, dword [0x41c04c]
mov edx, dword [ecx + 8]
mov dword [edx + 0x50], eax
mov ecx, dword [0x41c04c]
mov edx, dword [ecx + 8]
mov dword [edx + 0x54], esi
mov ecx, dword [0x41c04c]
mov edx, dword [ecx + 8]
mov dword [edx + 0x58], esi
mov ecx, dword [0x41c04c]
mov edx, dword [ecx + 8]
mov dword [edx + 0x5c], esi
mov ecx, dword [0x41c04c]
mov edx, dword [ecx + 8]
mov dword [edx + 0x60], esi
mov ecx, dword [0x41c04c]
mov edx, dword [ecx + 8]
mov dword [edx + 0x64], esi
mov ecx, dword [0x41c04c]
mov edx, dword [ecx + 8]
mov dword [edx], eax
mov eax, dword [0x41c04c]
mov ecx, dword [eax + 8]
mov dword [ecx + 0x18], 0x10
mov edx, dword [0x41c04c]
mov eax, dword [edx + 8]
mov dword [eax + 0x28], esi
mov eax, dword [0x41dd40]
cmp eax, esi
jne 0x40560f
call fcn.00403940
mov dword [0x41dd40], eax
dec eax
cmp eax, 6
ja case.0x40561c.5
movzx ecx, byte [eax + 0x405724]
jmp dword [ecx*4 + 0x40571c]
push 0x200
mov eax, 0xff
lea edx, [esp + 0x18]
push esi
push edx
mov dword [esp + 0x18], 0x1000
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], eax
call fcn.00409190
push 0x200
lea eax, [esp + 0x224]
push esi
push eax
call fcn.00409190
push 0x1000
lea ecx, [esp + 0x430]
push esi
push ecx
call fcn.00409190
add esp, 0x24
lea edx, [esp + 8]
push edx
lea eax, [esp + 0x18]
push eax
call dword [sym.imp.ADVAPI32.dll_GetUserNameW]
lea ecx, [esp + 0x10]
push ecx
lea edx, [esp + 8]
push edx
lea eax, [esp + 0x21c]
push eax
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x424]
push edx
lea eax, [esp + 0x28]
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
test eax, eax
je case.0x40561c.1
lea ecx, [esp + 0x414]
push ecx
call dword [sym.imp.ADVAPI32.dll_IsValidSid]
test eax, eax
je case.0x40561c.1
lea edx, [esp + 0x414]
push edx
call dword [sym.imp.ADVAPI32.dll_GetLengthSid]
mov esi, eax
push esi
call fcn.0040911d
mov ecx, dword [0x41c04c]
mov edx, dword [ecx + 8]
mov dword [edx + 0x3c], eax
mov ecx, dword [0x41c04c]
mov edx, dword [ecx + 8]
add esp, 4
lea eax, [esp + 0x414]
push eax
mov eax, dword [edx + 0x3c]
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_CopySid]
mov ecx, dword [esp + 0x1414]
pop esi
xor ecx, esp
call fcn.00408f97
add esp, 0x1414
ret