Function at 0xae5f8
Capabilities:
Get session information

Disassembly:
push ebp
mov ebp, esp
push ecx
mov ecx, 0x22
push 0
push 0
dec ecx
jne 0xae601
xchg dword [ebp - 4], ecx
push ebx
push esi
push edi
mov esi, ecx
mov dword [ebp - 4], edx
mov ebx, eax
xor eax, eax
push ebp
push 0xaee5e
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp + 8]
call fcn.00014314
lea eax, [ebp - 0x24]
call fcn.0002dd44
push dword [ebp - 0x24]
lea edx, [ebp - 0x28]
mov eax, 0xaee74
call fcn.00031d88
push dword [ebp - 0x28]
mov eax, ebx
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x2c]
call fcn.0002b0cc
push dword [ebp - 0x2c]
lea eax, [ebp - 0x20]
mov edx, 3
call fcn.00013f8c
mov edx, dword [ebp - 0x20]
lea eax, [ebp - 0x1c]
call fcn.000144c4
mov eax, dword [ebp - 0x1c]
mov edx, dword [ebp + 0xc]
call fcn.000adc50
mov byte [ebp - 0xe], 0
xor eax, eax
mov dword [ebp - 8], eax
xor eax, eax
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 4]
xor edx, edx
mov dword [eax], edx
xor eax, eax
push ebp
push 0xaec45
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
push ebp
push 0xaec31
push dword fs:[eax]
mov dword fs:[eax], esp
push 0
call sub.kernel32.dll_SetLastError
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 8]
push eax
push 7
push ebx
push 0
call sub.wtsapi32.dll_WTSQuerySessionInformationW
neg eax
sbb eax, eax
neg eax
mov byte [esi], al
cmp dword [ebp - 8], 0
setne byte [ebp - 0xe]
call sub.kernel32.dll_GetLastError_1
mov edx, dword [ebp - 4]
mov dword [edx], eax
cmp byte [esi], 0
je 0xaeb23
cmp byte [ebp - 0xe], 0
je 0xae95d
cmp dword [ebp - 0x14], 0
jbe 0xae95d
cmp dword [ebp - 0x14], 0x200
ja 0xae95d
mov edx, dword [ebp - 0x14]
add edx, 4
lea eax, [ebp - 0x18]
call fcn.0002aea4
xor eax, eax
push ebp
push 0xae956
push dword fs:[eax]
mov dword fs:[eax], esp
push 0
call sub.kernel32.dll_SetLastError
xor eax, eax
mov dword [ebp - 0xc], eax
push 0
call sub.kernel32.dll_SetLastError
lea eax, [ebp - 0xc]
push eax
mov eax, dword [ebp - 0x14]
push eax
mov eax, dword [ebp - 0x18]
push eax
mov eax, dword [ebp - 8]
push eax
call sub.kernel32.dll_GetCurrentProcess
push eax
call sub.kernel32.dll_ReadProcessMemory
neg eax
sbb eax, eax
neg eax
mov byte [ebp - 0xd], al
call sub.kernel32.dll_GetLastError_1
mov edx, dword [ebp - 4]
mov dword [edx], eax
xor eax, eax
push ebp
push 0xae786
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 8]
push eax
call sub.wtsapi32.dll_WTSFreeMemory
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0xae7c8
xor eax, eax
mov dword [ebp - 8], eax
cmp byte [ebp - 0xd], 0
je 0xae897
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp - 0x14]
jne 0xae7ef
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 0x18]
call fcn.0001446c
jmp 0xae93a
mov eax, dword [ebp - 4]
cmp dword [eax], 0
jne 0xae800
mov eax, dword [ebp - 4]
mov dword [eax], 0x1e
lea eax, [ebp - 0x44]
call fcn.0002de44
push dword [ebp - 0x44]
lea edx, [ebp - 0x48]
mov eax, 0xaee94
call fcn.00031d88
push dword [ebp - 0x48]
mov eax, dword [ebp - 0xc]
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x4c]
call fcn.0002b0cc
push dword [ebp - 0x4c]
lea edx, [ebp - 0x50]
mov eax, 0xaeea4
call fcn.00031d88
push dword [ebp - 0x50]
mov eax, dword [ebp - 0x14]
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x54]
call fcn.0002b0cc
push dword [ebp - 0x54]
lea edx, [ebp - 0x58]
mov eax, 0xaeea4
call fcn.00031d88
push dword [ebp - 0x58]
lea edx, [ebp - 0x5c]
mov eax, dword [ebp - 4]
mov eax, dword [eax]
call fcn.0002b100
push dword [ebp - 0x5c]
lea eax, [ebp - 0x40]
mov edx, 7
call fcn.00013f8c
mov edx, dword [ebp - 0x40]
lea eax, [ebp - 0x3c]
call fcn.000144c4
mov eax, dword [ebp - 0x3c]
mov edx, dword [ebp + 0xc]
call fcn.000adc50
jmp 0xae93a
mov eax, dword [ebp - 4]
cmp dword [eax], 0
jne 0xae8a8
mov eax, dword [ebp - 4]
mov dword [eax], 0xc
lea eax, [ebp - 0x68]
call fcn.0002de44
push dword [ebp - 0x68]
lea edx, [ebp - 0x6c]
mov eax, 0xaeea8
call fcn.00031d88
push dword [ebp - 0x6c]
mov eax, dword [ebp - 0xc]
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x70]
call fcn.0002b0cc
push dword [ebp - 0x70]
lea edx, [ebp - 0x74]
mov eax, 0xaeea4
call fcn.00031d88
push dword [ebp - 0x74]
mov eax, dword [ebp - 0x14]
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x78]
call fcn.0002b0cc
push dword [ebp - 0x78]
lea edx, [ebp - 0x7c]
mov eax, 0xaeea4
call fcn.00031d88
push dword [ebp - 0x7c]
lea edx, [ebp - 0x80]
mov eax, dword [ebp - 4]
mov eax, dword [eax]
call fcn.0002b100
push dword [ebp - 0x80]
lea eax, [ebp - 0x64]
mov edx, 7
call fcn.00013f8c
mov edx, dword [ebp - 0x64]
lea eax, [ebp - 0x60]
call fcn.000144c4
mov eax, dword [ebp - 0x60]
mov edx, dword [ebp + 0xc]
call fcn.000adc50
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0xaeba0
mov edx, dword [ebp - 0x14]
add edx, 4
lea eax, [ebp - 0x18]
call fcn.0002aecc
ret
cmp byte [ebp - 0xe], 0
je 0xaea4c
cmp dword [ebp - 0x14], 0
jne 0xaea4c
cmp dword [ebp - 0x14], 2
je 0xaea3f
lea eax, [ebp - 0x8c]
call fcn.0002ddc4
push dword [ebp - 0x8c]
lea edx, [ebp - 0x90]
mov eax, 0xaeeb8
call fcn.00031d88
push dword [ebp - 0x90]
lea edx, [ebp - 0x94]
mov al, byte [ebp - 0xe]
call fcn.0002d050
push dword [ebp - 0x94]
lea edx, [ebp - 0x98]
mov eax, 0xaeea4
call fcn.00031d88
push dword [ebp - 0x98]
mov eax, dword [ebp - 0x14]
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x9c]
call fcn.0002b0cc
push dword [ebp - 0x9c]
lea edx, [ebp - 0xa0]
mov eax, 0xaeea4
call fcn.00031d88
push dword [ebp - 0xa0]
lea edx, [ebp - 0xa4]
mov eax, dword [ebp - 4]
mov eax, dword [eax]
call fcn.0002b100
push dword [ebp - 0xa4]
lea eax, [ebp - 0x88]
mov edx, 7
call fcn.00013f8c
mov edx, dword [ebp - 0x88]
lea eax, [ebp - 0x84]
call fcn.000144c4
mov eax, dword [ebp - 0x84]
mov edx, dword [ebp + 0xc]
call fcn.000adc50
mov eax, dword [ebp + 8]
call fcn.00014314
jmp 0xaeba0
mov eax, dword [ebp - 4]
cmp dword [eax], 0
jne 0xaea5d
mov eax, dword [ebp - 4]
mov dword [eax], 0x1f
lea eax, [ebp - 0xb0]
call fcn.0002de44
push dword [ebp - 0xb0]
lea edx, [ebp - 0xb4]
mov eax, 0xaeec8
call fcn.00031d88
push dword [ebp - 0xb4]
lea edx, [ebp - 0xb8]
mov al, byte [ebp - 0xe]
call fcn.0002d050
push dword [ebp - 0xb8]
lea edx, [ebp - 0xbc]
mov eax, 0xaeea4
call fcn.00031d88
push dword [ebp - 0xbc]
mov eax, dword [ebp - 0x14]
xor edx, edx
push edx
push eax
lea eax, [ebp - 0xc0]
call fcn.0002b0cc
push dword [ebp - 0xc0]
lea edx, [ebp - 0xc4]
mov eax, 0xaeea4
call fcn.00031d88
push dword [ebp - 0xc4]
lea edx, [ebp - 0xc8]
mov eax, dword [ebp - 4]
mov eax, dword [eax]
call fcn.0002b100
push dword [ebp - 0xc8]
lea eax, [ebp - 0xac]
mov edx, 7
call fcn.00013f8c
mov edx, dword [ebp - 0xac]
lea eax, [ebp - 0xa8]
call fcn.000144c4
mov eax, dword [ebp - 0xa8]
mov edx, dword [ebp + 0xc]
call fcn.000adc50
jmp 0xaeba0
mov eax, dword [ebp - 4]
cmp dword [eax], 0
jne 0xaeb34
mov eax, dword [ebp - 4]
mov dword [eax], 0x1f
lea eax, [ebp - 0xd4]
call fcn.0002de44
push dword [ebp - 0xd4]
lea edx, [ebp - 0xd8]
mov eax, 0xaeed8
call fcn.00031d88
push dword [ebp - 0xd8]
lea edx, [ebp - 0xdc]
mov eax, dword [ebp - 4]
mov eax, dword [eax]
call fcn.0002b100
push dword [ebp - 0xdc]
lea eax, [ebp - 0xd0]
mov edx, 3
call fcn.00013f8c
mov edx, dword [ebp - 0xd0]
lea eax, [ebp - 0xcc]
call fcn.000144c4
mov eax, dword [ebp - 0xcc]
mov edx, dword [ebp + 0xc]
call fcn.000adc50
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0xaec3b
xor eax, eax
push ebp
push 0xaebd4
push dword fs:[eax]
mov dword fs:[eax], esp
cmp dword [ebp - 8], 0
je 0xaebca
mov eax, dword [ebp - 8]
push eax
call sub.wtsapi32.dll_WTSFreeMemory
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0xaec2b
xor eax, eax
mov dword [ebp - 8], eax
ret