Function at 0xc7ff8
Capabilities:
Get session information

Disassembly:
push ebp
mov ebp, esp
push ecx
mov ecx, 0x1c
push 0
push 0
dec ecx
jne 0xc8001
push ecx
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 0xc8758
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp + 8]
call fcn.000142a8
mov byte [ebp - 0x1d], 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 0xc861a
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
push ebp
push 0xc8606
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 7
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 - 0x1d]
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 0xc850a
cmp byte [ebp - 0x1d], 0
je 0xc835a
cmp dword [ebp - 0x1c], 0
jbe 0xc835a
cmp dword [ebp - 0x1c], 0x200
ja 0xc835a
mov edx, dword [ebp - 0x1c]
add edx, 4
lea eax, [ebp - 0x10]
call fcn.000763a0
xor eax, eax
push ebp
push 0xc8353
push dword fs:[eax]
mov dword fs:[eax], esp
push 0
call sub.kernel32.dll_SetLastError
xor eax, eax
mov dword [ebp - 0x24], eax
push 0
call sub.kernel32.dll_SetLastError
lea eax, [ebp - 0x24]
push eax
mov eax, dword [ebp - 0x1c]
push eax
mov eax, dword [ebp - 0x10]
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 - 0x15], al
call sub.kernel32.dll_GetLastError_1
mov edx, dword [ebp - 0xc]
mov dword [edx], eax
xor eax, eax
push ebp
push 0xc8143
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 0xc8181
xor eax, eax
mov dword [ebp - 0x14], eax
cmp byte [ebp - 0x15], 0
je 0xc8299
mov eax, dword [ebp - 0x24]
cmp eax, dword [ebp - 0x1c]
jne 0xc81f6
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 0x10]
call fcn.00014400
lea edx, [ebp - 0x40]
mov eax, 0xc877c
call fcn.0007a2b0
mov ecx, dword [ebp - 0x40]
lea eax, [ebp - 0x3c]
mov edx, dword [ebp - 4]
call fcn.00013f44
mov edx, dword [ebp - 0x3c]
lea eax, [ebp - 0x38]
call fcn.00014458
push dword [ebp - 0x38]
mov eax, dword [ebp + 8]
push dword [eax]
push 0xc878c
lea eax, [ebp - 0x34]
mov edx, 3
call fcn.000145ac
mov eax, dword [ebp - 0x34]
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp - 8]
call fcn.000c7550
jmp 0xc8337
mov eax, dword [ebp - 0xc]
cmp dword [eax], 0
jne 0xc8207
mov eax, dword [ebp - 0xc]
mov dword [eax], 0x1e
push dword [ebp - 4]
lea edx, [ebp - 0x4c]
mov eax, 0xc8790
call fcn.0007a2b0
push dword [ebp - 0x4c]
mov eax, dword [ebp - 0x24]
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x50]
call fcn.00076650
push dword [ebp - 0x50]
lea edx, [ebp - 0x54]
mov eax, 0xc87a0
call fcn.0007a2b0
push dword [ebp - 0x54]
mov eax, dword [ebp - 0x1c]
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x58]
call fcn.00076650
push dword [ebp - 0x58]
lea edx, [ebp - 0x5c]
mov eax, 0xc87a0
call fcn.0007a2b0
push dword [ebp - 0x5c]
lea edx, [ebp - 0x60]
mov eax, dword [ebp - 0xc]
mov eax, dword [eax]
call fcn.000766dc
push dword [ebp - 0x60]
lea eax, [ebp - 0x48]
mov edx, 7
call fcn.00013fb8
mov edx, dword [ebp - 0x48]
lea eax, [ebp - 0x44]
call fcn.00014458
mov eax, dword [ebp - 0x44]
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp - 8]
call fcn.000c7718
jmp 0xc8337
mov eax, dword [ebp - 0xc]
cmp dword [eax], 0
jne 0xc82aa
mov eax, dword [ebp - 0xc]
mov dword [eax], 0xc
push dword [ebp - 4]
lea edx, [ebp - 0x6c]
mov eax, 0xc87a4
call fcn.0007a2b0
push dword [ebp - 0x6c]
mov eax, dword [ebp - 0x24]
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x70]
call fcn.00076650
push dword [ebp - 0x70]
lea edx, [ebp - 0x74]
mov eax, 0xc87a0
call fcn.0007a2b0
push dword [ebp - 0x74]
mov eax, dword [ebp - 0x1c]
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x78]
call fcn.00076650
push dword [ebp - 0x78]
lea edx, [ebp - 0x7c]
mov eax, 0xc87a0
call fcn.0007a2b0
push dword [ebp - 0x7c]
lea edx, [ebp - 0x80]
mov eax, dword [ebp - 0xc]
mov eax, dword [eax]
call fcn.000766dc
push dword [ebp - 0x80]
lea eax, [ebp - 0x68]
mov edx, 7
call fcn.00013fb8
mov edx, dword [ebp - 0x68]
lea eax, [ebp - 0x64]
call fcn.00014458
mov eax, dword [ebp - 0x64]
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 0xc857c
mov edx, dword [ebp - 0x1c]
add edx, 4
lea eax, [ebp - 0x10]
call fcn.000763dc
ret
cmp byte [ebp - 0x1d], 0
je 0xc843e
cmp dword [ebp - 0x1c], 0
jne 0xc843e
cmp dword [ebp - 0x1c], 2
je 0xc8431
push dword [ebp - 4]
lea edx, [ebp - 0x8c]
mov eax, 0xc87b4
call fcn.0007a2b0
push dword [ebp - 0x8c]
lea edx, [ebp - 0x90]
mov al, byte [ebp - 0x1d]
call fcn.000779d8
push dword [ebp - 0x90]
lea edx, [ebp - 0x94]
mov eax, 0xc87a0
call fcn.0007a2b0
push dword [ebp - 0x94]
mov eax, dword [ebp - 0x1c]
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x98]
call fcn.00076650
push dword [ebp - 0x98]
lea edx, [ebp - 0x9c]
mov eax, 0xc87a0
call fcn.0007a2b0
push dword [ebp - 0x9c]
lea edx, [ebp - 0xa0]
mov eax, dword [ebp - 0xc]
mov eax, dword [eax]
call fcn.000766dc
push dword [ebp - 0xa0]
lea eax, [ebp - 0x88]
mov edx, 7
call fcn.00013fb8
mov edx, dword [ebp - 0x88]
lea eax, [ebp - 0x84]
call fcn.00014458
mov eax, dword [ebp - 0x84]
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp - 8]
call fcn.000c7634
mov eax, dword [ebp + 8]
call fcn.000142a8
jmp 0xc857c
mov eax, dword [ebp - 0xc]
cmp dword [eax], 0
jne 0xc844f
mov eax, dword [ebp - 0xc]
mov dword [eax], 0x1f
push dword [ebp - 4]
lea edx, [ebp - 0xac]
mov eax, 0xc87c4
call fcn.0007a2b0
push dword [ebp - 0xac]
lea edx, [ebp - 0xb0]
mov al, byte [ebp - 0x1d]
call fcn.000779d8
push dword [ebp - 0xb0]
lea edx, [ebp - 0xb4]
mov eax, 0xc87a0
call fcn.0007a2b0
push dword [ebp - 0xb4]
mov eax, dword [ebp - 0x1c]
xor edx, edx
push edx
push eax
lea eax, [ebp - 0xb8]
call fcn.00076650
push dword [ebp - 0xb8]
lea edx, [ebp - 0xbc]
mov eax, 0xc87a0
call fcn.0007a2b0
push dword [ebp - 0xbc]
lea edx, [ebp - 0xc0]
mov eax, dword [ebp - 0xc]
mov eax, dword [eax]
call fcn.000766dc
push dword [ebp - 0xc0]
lea eax, [ebp - 0xa8]
mov edx, 7
call fcn.00013fb8
mov edx, dword [ebp - 0xa8]
lea eax, [ebp - 0xa4]
call fcn.00014458
mov eax, dword [ebp - 0xa4]
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp - 8]
call fcn.000c7718
jmp 0xc857c
mov eax, dword [ebp - 0xc]
cmp dword [eax], 0
jne 0xc851b
mov eax, dword [ebp - 0xc]
mov dword [eax], 0x1f
push dword [ebp - 4]
lea edx, [ebp - 0xcc]
mov eax, 0xc87d4
call fcn.0007a2b0
push dword [ebp - 0xcc]
lea edx, [ebp - 0xd0]
mov eax, dword [ebp - 0xc]
mov eax, dword [eax]
call fcn.000766dc
push dword [ebp - 0xd0]
lea eax, [ebp - 0xc8]
mov edx, 3
call fcn.00013fb8
mov edx, dword [ebp - 0xc8]
lea eax, [ebp - 0xc4]
call fcn.00014458
mov eax, dword [ebp - 0xc4]
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 0xc8610
xor eax, eax
push ebp
push 0xc85b0
push dword fs:[eax]
mov dword fs:[eax], esp
cmp dword [ebp - 0x14], 0
je 0xc85a6
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 0xc8600
xor eax, eax
mov dword [ebp - 0x14], eax
ret