Function at 0x4ffc00
Capabilities:
Get session information
Get session user name
Get user security identifier

Disassembly:
push 0xffffffffffffffff
push 0x601be7
mov eax, dword fs:[0]
push eax
mov eax, 0x22c0
call fcn.005ef960
mov eax, dword [0x6687b8]
xor eax, esp
mov dword [esp + 0x22bc], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x6687b8]
xor eax, esp
push eax
lea eax, [esp + 0x22d4]
mov dword fs:[0], eax
xor ebp, ebp
mov edi, ecx
mov dword [esp + 0x20], ebp
test byte [0x680a44], 1
mov dword [esp + 0x2c], edi
lea ebx, [ebp + 7]
jne 0x4ffc7e
or dword [0x680a44], 1
push 0x613af0
mov dword [0x680a40], ebx
mov dword [0x680a3c], ebp
mov word [0x680a2c], bp
call fcn.005d268a
add esp, 4
cmp dword [0x680a3c], ebp
jne 0x4fff61
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
lea ecx, [esp + 0x18]
push ecx
push eax
mov dword [esp + 0x20], ebp
call dword [sym.imp.KERNEL32.dll_ProcessIdToSessionId]
test eax, eax
je 0x4fff61
mov dword [esp + 0x14], ebp
mov dword [esp + 0xa0], ebx
mov dword [esp + 0x9c], ebp
mov word [esp + 0x8c], bp
mov dword [esp + 0x22dc], ebp
mov dword [esp + 0x84], ebx
mov dword [esp + 0x80], ebp
mov word [esp + 0x70], bp
lea edx, [esp + 0x24]
push edx
lea eax, [esp + 0x18]
push eax
mov byte [esp + 0x22e4], 1
mov ecx, dword [esp + 0x20]
push 5
push ecx
push ebp
call sub.WTSAPI32.dll_WTSQuerySessionInformationW
cmp eax, ebp
je 0x4ffef9
mov edx, dword [esp + 0x14]
cmp edx, ebp
je 0x4ffef9
lea eax, [esp + 0x88]
push eax
call fcn.0040a330
mov ecx, dword [esp + 0x14]
push ecx
call sub.WTSAPI32.dll_WTSFreeMemory
mov ecx, dword [esp + 0x18]
lea edx, [esp + 0x24]
push edx
lea eax, [esp + 0x18]
push eax
push ebx
push ecx
push ebp
mov dword [esp + 0x28], ebp
call sub.WTSAPI32.dll_WTSQuerySessionInformationW
cmp eax, ebp
je 0x4ffed7
mov edx, dword [esp + 0x14]
cmp edx, ebp
je 0x4ffed7
lea eax, [esp + 0x6c]
push eax
call fcn.0040a330
mov ecx, dword [esp + 0x14]
push ecx
call sub.WTSAPI32.dll_WTSFreeMemory
mov dword [esp + 0xbc], ebx
mov dword [esp + 0xb8], ebp
mov word [esp + 0xa8], bp
lea edx, [esp + 0x6c]
push edx
mov ebx, 0x62454c
lea esi, [esp + 0x54]
mov byte [esp + 0x22e0], 2
call fcn.0040a280
lea ecx, [esp + 0x8c]
push ecx
push eax
lea edi, [esp + 0x40]
mov byte [esp + 0x22e8], 3
call fcn.00405710
add esp, 0xc
push 0xffffffffffffffff
push ebp
lea ecx, [esp + 0xac]
mov byte [esp + 0x22e4], 4
call fcn.00404ae0
mov esi, edi
call fcn.00404670
lea esi, [esp + 0x50]
mov byte [esp + 0x22dc], 2
call fcn.00404670
push 0x2002
lea edx, [esp + 0x2d2]
push ebp
push edx
mov word [esp + 0x2d8], bp
call fcn.005da970
push 0x20a
lea eax, [esp + 0xd2]
push ebp
push eax
mov word [esp + 0xd8], bp
call fcn.005da970
mov eax, dword [esp + 0xc0]
add esp, 0x18
cmp dword [esp + 0xbc], 8
mov dword [esp + 0x20], 0x1000
mov dword [esp + 0x28], 0x105
jae 0x4ffe46
lea eax, [esp + 0xa8]
lea ecx, [esp + 0x30]
push ecx
lea edx, [esp + 0x2c]
push edx
lea ecx, [esp + 0xc8]
push ecx
lea edx, [esp + 0x2c]
push edx
lea ecx, [esp + 0x2dc]
push ecx
push eax
push ebp
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
cmp eax, ebp
je 0x4ffe9d
lea edx, [esp + 0x1c]
push edx
lea eax, [esp + 0x2d0]
push eax
call dword [sym.imp.ADVAPI32.dll_ConvertSidToStringSidW]
mov edx, dword [esp + 0x1c]
push 0x680a28
call fcn.0040a330
mov ecx, dword [esp + 0x1c]
push ecx
call dword [sym.imp.KERNEL32.dll_LocalFree]
lea esi, [esp + 0xa4]
call fcn.00404670
lea esi, [esp + 0x6c]
call fcn.00404670
lea esi, [esp + 0x88]
mov dword [esp + 0x22dc], 0xffffffff
call fcn.00404670
mov edi, dword [esp + 0x2c]
mov ebx, 7
jmp 0x4fff61
lea esi, [esp + 0x6c]
call fcn.00404670
lea esi, [esp + 0x88]
mov dword [esp + 0x22dc], 0xffffffff
call fcn.00404670
jmp 0x4fff61
mov esi, 8
cmp dword [esp + 0x84], esi
jb 0x4fff14
mov edx, dword [esp + 0x70]
push edx
call fcn.005d2367
add esp, 4
mov dword [esp + 0x22dc], 0xffffffff
cmp dword [esp + 0xa0], esi
mov dword [esp + 0x84], ebx
mov dword [esp + 0x80], ebp
mov word [esp + 0x70], bp
jb 0x4fff4b
mov eax, dword [esp + 0x8c]
push eax
call fcn.005d2367
add esp, 4
mov dword [esp + 0xa0], ebx
mov dword [esp + 0x9c], ebp
mov word [esp + 0x8c], bp
push 0xffffffffffffffff
mov dword [edi + 0x18], ebx
mov dword [edi + 0x14], ebp
push ebp
mov eax, 0x680a28
mov ecx, edi
mov word [edi + 4], bp
call fcn.00404ae0
mov eax, edi
mov ecx, dword [esp + 0x22d4]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x22bc]
xor ecx, esp
call fcn.005d28b3
add esp, 0x22cc
ret