Function at 0xc77fc
Capabilities:
Get session information
Get session user name

Disassembly:
push ebp
mov ebp, esp
push ecx
mov ecx, 0x1c
push 0
push 0
dec ecx
jne 0xc7805
xchg dword [ebp - 4], ecx
push ebx
push esi
push edi
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0xc7f4b
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp + 8]
call fcn.000142a8
mov byte [ebp - 0x15], 0
xor eax, eax
mov dword [ebp - 0x14], eax
xor eax, eax
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0xc]
xor edx, edx
mov dword [eax], edx
xor eax, eax
push ebp
push 0xc7e10
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
push ebp
push 0xc7dfc
push dword fs:[eax]
mov dword fs:[eax], esp
push 0
call sub.kernel32.dll_SetLastError
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x14]
push eax
push 5
mov eax, dword [ebp - 8]
push eax
push 0
call sub.wtsapi32.dll_WTSQuerySessionInformationW
neg eax
sbb eax, eax
neg eax
mov edx, dword [ebp + 0x10]
mov byte [edx], al
cmp dword [ebp - 0x14], 0
setne byte [ebp - 0x15]
call sub.kernel32.dll_GetLastError_1
mov edx, dword [ebp - 0xc]
mov dword [edx], eax
mov eax, dword [ebp + 0x10]
cmp byte [eax], 0
je 0xc7d00
cmp byte [ebp - 0x15], 0
je 0xc7b56
cmp dword [ebp - 0x1c], 0
jbe 0xc7b56
cmp dword [ebp - 0x1c], 0x200
ja 0xc7b56
mov edx, dword [ebp - 0x1c]
add edx, 4
lea eax, [ebp - 0x20]
call fcn.000763a0
xor eax, eax
push ebp
push 0xc7b4f
push dword fs:[eax]
mov dword fs:[eax], esp
push 0
call sub.kernel32.dll_SetLastError
xor eax, eax
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x10]
push eax
mov eax, dword [ebp - 0x1c]
push eax
mov eax, dword [ebp - 0x20]
push eax
mov eax, dword [ebp - 0x14]
push eax
call sub.kernel32.dll_GetCurrentProcess
push eax
call sub.kernel32.dll_ReadProcessMemory
neg eax
sbb eax, eax
neg eax
mov byte [ebp - 0x16], al
call sub.kernel32.dll_GetLastError_1
mov edx, dword [ebp - 0xc]
mov dword [edx], eax
xor eax, eax
push ebp
push 0xc793f
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 0x14]
push eax
call sub.wtsapi32.dll_WTSFreeMemory
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0xc797d
xor eax, eax
mov dword [ebp - 0x14], eax
cmp byte [ebp - 0x16], 0
je 0xc7a95
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 0x1c]
jne 0xc79f2
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 0x20]
call fcn.00014400
lea edx, [ebp - 0x3c]
mov eax, 0xc7f70
call fcn.0007a2b0
mov ecx, dword [ebp - 0x3c]
lea eax, [ebp - 0x38]
mov edx, dword [ebp - 4]
call fcn.00013f44
mov edx, dword [ebp - 0x38]
lea eax, [ebp - 0x34]
call fcn.00014458
push dword [ebp - 0x34]
mov eax, dword [ebp + 8]
push dword [eax]
push 0xc7f80
lea eax, [ebp - 0x30]
mov edx, 3
call fcn.000145ac
mov eax, dword [ebp - 0x30]
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp - 8]
call fcn.000c7550
jmp 0xc7b33
mov eax, dword [ebp - 0xc]
cmp dword [eax], 0
jne 0xc7a03
mov eax, dword [ebp - 0xc]
mov dword [eax], 0x1e
push dword [ebp - 4]
lea edx, [ebp - 0x48]
mov eax, 0xc7f84
call fcn.0007a2b0
push dword [ebp - 0x48]
mov eax, dword [ebp - 0x10]
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x4c]
call fcn.00076650
push dword [ebp - 0x4c]
lea edx, [ebp - 0x50]
mov eax, 0xc7f94
call fcn.0007a2b0
push dword [ebp - 0x50]
mov eax, dword [ebp - 0x1c]
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x54]
call fcn.00076650
push dword [ebp - 0x54]
lea edx, [ebp - 0x58]
mov eax, 0xc7f94
call fcn.0007a2b0
push dword [ebp - 0x58]
lea edx, [ebp - 0x5c]
mov eax, dword [ebp - 0xc]
mov eax, dword [eax]
call fcn.000766dc
push dword [ebp - 0x5c]
lea eax, [ebp - 0x44]
mov edx, 7
call fcn.00013fb8
mov edx, dword [ebp - 0x44]
lea eax, [ebp - 0x40]
call fcn.00014458
mov eax, dword [ebp - 0x40]
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp - 8]
call fcn.000c7718
jmp 0xc7b33
mov eax, dword [ebp - 0xc]
cmp dword [eax], 0
jne 0xc7aa6
mov eax, dword [ebp - 0xc]
mov dword [eax], 0xc
push dword [ebp - 4]
lea edx, [ebp - 0x68]
mov eax, 0xc7f98
call fcn.0007a2b0
push dword [ebp - 0x68]
mov eax, dword [ebp - 0x10]
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x6c]
call fcn.00076650
push dword [ebp - 0x6c]
lea edx, [ebp - 0x70]
mov eax, 0xc7f94
call fcn.0007a2b0
push dword [ebp - 0x70]
mov eax, dword [ebp - 0x1c]
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x74]
call fcn.00076650
push dword [ebp - 0x74]
lea edx, [ebp - 0x78]
mov eax, 0xc7f94
call fcn.0007a2b0
push dword [ebp - 0x78]
lea edx, [ebp - 0x7c]
mov eax, dword [ebp - 0xc]
mov eax, dword [eax]
call fcn.000766dc
push dword [ebp - 0x7c]
lea eax, [ebp - 0x64]
mov edx, 7
call fcn.00013fb8
mov edx, dword [ebp - 0x64]
lea eax, [ebp - 0x60]
call fcn.00014458
mov eax, dword [ebp - 0x60]
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp - 8]
call fcn.000c7718
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0xc7d72
mov edx, dword [ebp - 0x1c]
add edx, 4
lea eax, [ebp - 0x20]
call fcn.000763dc
ret
cmp byte [ebp - 0x15], 0
je 0xc7c34
cmp dword [ebp - 0x1c], 0
jne 0xc7c34
cmp dword [ebp - 0x1c], 2
je 0xc7c27
push dword [ebp - 4]
lea edx, [ebp - 0x88]
mov eax, 0xc7fa8
call fcn.0007a2b0
push dword [ebp - 0x88]
lea edx, [ebp - 0x8c]
mov al, byte [ebp - 0x15]
call fcn.000779d8
push dword [ebp - 0x8c]
lea edx, [ebp - 0x90]
mov eax, 0xc7f94
call fcn.0007a2b0
push dword [ebp - 0x90]
mov eax, dword [ebp - 0x1c]
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x94]
call fcn.00076650
push dword [ebp - 0x94]
lea edx, [ebp - 0x98]
mov eax, 0xc7f94
call fcn.0007a2b0
push dword [ebp - 0x98]
lea edx, [ebp - 0x9c]
mov eax, dword [ebp - 0xc]
mov eax, dword [eax]
call fcn.000766dc
push dword [ebp - 0x9c]
lea eax, [ebp - 0x84]
mov edx, 7
call fcn.00013fb8
mov edx, dword [ebp - 0x84]
lea eax, [ebp - 0x80]
call fcn.00014458
mov eax, dword [ebp - 0x80]
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp - 8]
call fcn.000c7634
mov eax, dword [ebp + 8]
call fcn.000142a8
jmp 0xc7d72
mov eax, dword [ebp - 0xc]
cmp dword [eax], 0
jne 0xc7c45
mov eax, dword [ebp - 0xc]
mov dword [eax], 0x1f
push dword [ebp - 4]
lea edx, [ebp - 0xa8]
mov eax, 0xc7fb8
call fcn.0007a2b0
push dword [ebp - 0xa8]
lea edx, [ebp - 0xac]
mov al, byte [ebp - 0x15]
call fcn.000779d8
push dword [ebp - 0xac]
lea edx, [ebp - 0xb0]
mov eax, 0xc7f94
call fcn.0007a2b0
push dword [ebp - 0xb0]
mov eax, dword [ebp - 0x1c]
xor edx, edx
push edx
push eax
lea eax, [ebp - 0xb4]
call fcn.00076650
push dword [ebp - 0xb4]
lea edx, [ebp - 0xb8]
mov eax, 0xc7f94
call fcn.0007a2b0
push dword [ebp - 0xb8]
lea edx, [ebp - 0xbc]
mov eax, dword [ebp - 0xc]
mov eax, dword [eax]
call fcn.000766dc
push dword [ebp - 0xbc]
lea eax, [ebp - 0xa4]
mov edx, 7
call fcn.00013fb8
mov edx, dword [ebp - 0xa4]
lea eax, [ebp - 0xa0]
call fcn.00014458
mov eax, dword [ebp - 0xa0]
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp - 8]
call fcn.000c7718
jmp 0xc7d72
mov eax, dword [ebp - 0xc]
cmp dword [eax], 0
jne 0xc7d11
mov eax, dword [ebp - 0xc]
mov dword [eax], 0x1f
push dword [ebp - 4]
lea edx, [ebp - 0xc8]
mov eax, 0xc7fc8
call fcn.0007a2b0
push dword [ebp - 0xc8]
lea edx, [ebp - 0xcc]
mov eax, dword [ebp - 0xc]
mov eax, dword [eax]
call fcn.000766dc
push dword [ebp - 0xcc]
lea eax, [ebp - 0xc4]
mov edx, 3
call fcn.00013fb8
mov edx, dword [ebp - 0xc4]
lea eax, [ebp - 0xc0]
call fcn.00014458
mov eax, dword [ebp - 0xc0]
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp - 8]
call fcn.000c7718
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0xc7e06
xor eax, eax
push ebp
push 0xc7da6
push dword fs:[eax]
mov dword fs:[eax], esp
cmp dword [ebp - 0x14], 0
je 0xc7d9c
mov eax, dword [ebp - 0x14]
push eax
call sub.wtsapi32.dll_WTSFreeMemory
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0xc7df6
xor eax, eax
mov dword [ebp - 0x14], eax
ret