Function at 0xb7ca0
Capabilities:
Get session information

Disassembly:
push ebp
mov ebp, esp
push ecx
mov ecx, 0x1c
push 0
push 0
dec ecx
jne 0xb7ca9
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 0xb83f6
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp + 8]
call fcn.00014294
mov byte [ebp - 0x15], 0
xor eax, eax
mov dword [ebp - 0x14], eax
xor eax, eax
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0xc]
xor edx, edx
mov dword [eax], edx
xor eax, eax
push ebp
push 0xb82bb
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
push ebp
push 0xb82a7
push dword fs:[eax]
mov dword fs:[eax], esp
push 0
call sub.kernel32.dll_SetLastError
lea eax, [ebp - 0x20]
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 - 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 0xb81ab
cmp byte [ebp - 0x15], 0
je 0xb8001
cmp dword [ebp - 0x20], 0
jbe 0xb8001
cmp dword [ebp - 0x20], 0x200
ja 0xb8001
mov edx, dword [ebp - 0x20]
add edx, 4
lea eax, [ebp - 0x1c]
call fcn.000744bc
xor eax, eax
push ebp
push 0xb7ffa
push dword fs:[eax]
mov dword fs:[eax], esp
push 0
call sub.kernel32.dll_SetLastError
xor eax, eax
mov dword [ebp - 0x10], eax
push 0
call sub.kernel32.dll_SetLastError
lea eax, [ebp - 0x10]
push eax
mov eax, dword [ebp - 0x20]
push eax
mov eax, dword [ebp - 0x1c]
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 0xb7dea
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 0xb7e28
xor eax, eax
mov dword [ebp - 0x14], eax
cmp byte [ebp - 0x16], 0
je 0xb7f40
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 0x20]
jne 0xb7e9d
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 0x1c]
call fcn.000143ec
lea edx, [ebp - 0x3c]
mov eax, 0xb841c
call fcn.00078120
mov ecx, dword [ebp - 0x3c]
lea eax, [ebp - 0x38]
mov edx, dword [ebp - 4]
call fcn.00013f30
mov edx, dword [ebp - 0x38]
lea eax, [ebp - 0x34]
call fcn.00014444
push dword [ebp - 0x34]
mov eax, dword [ebp + 8]
push dword [eax]
push 0xb842c
lea eax, [ebp - 0x30]
mov edx, 3
call fcn.00014598
mov eax, dword [ebp - 0x30]
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp - 8]
call fcn.000b71f0
jmp 0xb7fde
mov eax, dword [ebp - 0xc]
cmp dword [eax], 0
jne 0xb7eae
mov eax, dword [ebp - 0xc]
mov dword [eax], 0x1e
push dword [ebp - 4]
lea edx, [ebp - 0x48]
mov eax, 0xb8430
call fcn.00078120
push dword [ebp - 0x48]
mov eax, dword [ebp - 0x10]
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x4c]
call fcn.0007476c
push dword [ebp - 0x4c]
lea edx, [ebp - 0x50]
mov eax, 0xb8440
call fcn.00078120
push dword [ebp - 0x50]
mov eax, dword [ebp - 0x20]
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x54]
call fcn.0007476c
push dword [ebp - 0x54]
lea edx, [ebp - 0x58]
mov eax, 0xb8440
call fcn.00078120
push dword [ebp - 0x58]
lea edx, [ebp - 0x5c]
mov eax, dword [ebp - 0xc]
mov eax, dword [eax]
call fcn.000747a0
push dword [ebp - 0x5c]
lea eax, [ebp - 0x44]
mov edx, 7
call fcn.00013fa4
mov edx, dword [ebp - 0x44]
lea eax, [ebp - 0x40]
call fcn.00014444
mov eax, dword [ebp - 0x40]
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp - 8]
call fcn.000b73b8
jmp 0xb7fde
mov eax, dword [ebp - 0xc]
cmp dword [eax], 0
jne 0xb7f51
mov eax, dword [ebp - 0xc]
mov dword [eax], 0xc
push dword [ebp - 4]
lea edx, [ebp - 0x68]
mov eax, 0xb8444
call fcn.00078120
push dword [ebp - 0x68]
mov eax, dword [ebp - 0x10]
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x6c]
call fcn.0007476c
push dword [ebp - 0x6c]
lea edx, [ebp - 0x70]
mov eax, 0xb8440
call fcn.00078120
push dword [ebp - 0x70]
mov eax, dword [ebp - 0x20]
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x74]
call fcn.0007476c
push dword [ebp - 0x74]
lea edx, [ebp - 0x78]
mov eax, 0xb8440
call fcn.00078120
push dword [ebp - 0x78]
lea edx, [ebp - 0x7c]
mov eax, dword [ebp - 0xc]
mov eax, dword [eax]
call fcn.000747a0
push dword [ebp - 0x7c]
lea eax, [ebp - 0x64]
mov edx, 7
call fcn.00013fa4
mov edx, dword [ebp - 0x64]
lea eax, [ebp - 0x60]
call fcn.00014444
mov eax, dword [ebp - 0x60]
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp - 8]
call fcn.000b73b8
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0xb821d
mov edx, dword [ebp - 0x20]
add edx, 4
lea eax, [ebp - 0x1c]
call fcn.000744f8
ret
cmp byte [ebp - 0x15], 0
je 0xb80df
cmp dword [ebp - 0x20], 0
jne 0xb80df
cmp dword [ebp - 0x20], 2
je 0xb80d2
push dword [ebp - 4]
lea edx, [ebp - 0x88]
mov eax, 0xb8454
call fcn.00078120
push dword [ebp - 0x88]
lea edx, [ebp - 0x8c]
mov al, byte [ebp - 0x15]
call fcn.000759c8
push dword [ebp - 0x8c]
lea edx, [ebp - 0x90]
mov eax, 0xb8440
call fcn.00078120
push dword [ebp - 0x90]
mov eax, dword [ebp - 0x20]
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x94]
call fcn.0007476c
push dword [ebp - 0x94]
lea edx, [ebp - 0x98]
mov eax, 0xb8440
call fcn.00078120
push dword [ebp - 0x98]
lea edx, [ebp - 0x9c]
mov eax, dword [ebp - 0xc]
mov eax, dword [eax]
call fcn.000747a0
push dword [ebp - 0x9c]
lea eax, [ebp - 0x84]
mov edx, 7
call fcn.00013fa4
mov edx, dword [ebp - 0x84]
lea eax, [ebp - 0x80]
call fcn.00014444
mov eax, dword [ebp - 0x80]
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp - 8]
call fcn.000b72d4
mov eax, dword [ebp + 8]
call fcn.00014294
jmp 0xb821d
mov eax, dword [ebp - 0xc]
cmp dword [eax], 0
jne 0xb80f0
mov eax, dword [ebp - 0xc]
mov dword [eax], 0x1f
push dword [ebp - 4]
lea edx, [ebp - 0xa8]
mov eax, 0xb8464
call fcn.00078120
push dword [ebp - 0xa8]
lea edx, [ebp - 0xac]
mov al, byte [ebp - 0x15]
call fcn.000759c8
push dword [ebp - 0xac]
lea edx, [ebp - 0xb0]
mov eax, 0xb8440
call fcn.00078120
push dword [ebp - 0xb0]
mov eax, dword [ebp - 0x20]
xor edx, edx
push edx
push eax
lea eax, [ebp - 0xb4]
call fcn.0007476c
push dword [ebp - 0xb4]
lea edx, [ebp - 0xb8]
mov eax, 0xb8440
call fcn.00078120
push dword [ebp - 0xb8]
lea edx, [ebp - 0xbc]
mov eax, dword [ebp - 0xc]
mov eax, dword [eax]
call fcn.000747a0
push dword [ebp - 0xbc]
lea eax, [ebp - 0xa4]
mov edx, 7
call fcn.00013fa4
mov edx, dword [ebp - 0xa4]
lea eax, [ebp - 0xa0]
call fcn.00014444
mov eax, dword [ebp - 0xa0]
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp - 8]
call fcn.000b73b8
jmp 0xb821d
mov eax, dword [ebp - 0xc]
cmp dword [eax], 0
jne 0xb81bc
mov eax, dword [ebp - 0xc]
mov dword [eax], 0x1f
push dword [ebp - 4]
lea edx, [ebp - 0xc8]
mov eax, 0xb8474
call fcn.00078120
push dword [ebp - 0xc8]
lea edx, [ebp - 0xcc]
mov eax, dword [ebp - 0xc]
mov eax, dword [eax]
call fcn.000747a0
push dword [ebp - 0xcc]
lea eax, [ebp - 0xc4]
mov edx, 3
call fcn.00013fa4
mov edx, dword [ebp - 0xc4]
lea eax, [ebp - 0xc0]
call fcn.00014444
mov eax, dword [ebp - 0xc0]
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp - 8]
call fcn.000b73b8
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0xb82b1
xor eax, eax
push ebp
push 0xb8251
push dword fs:[eax]
mov dword fs:[eax], esp
cmp dword [ebp - 0x14], 0
je 0xb8247
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 0xb82a1
xor eax, eax
mov dword [ebp - 0x14], eax
ret