Function at 0x1400028f8
Capabilities:
Get session information

Disassembly:
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0x5a0
mov qword [rsp + 0xd0], 0xfffffffffffffffe
mov rax, qword [0x140022008]
xor rax, rsp
mov qword [rsp + 0x590], rax
lea rcx, [rsp + 0x160]
call fcn.140003780
nop
mov edx, 0x3e8
lea rcx, [rsp + 0x160]
call fcn.140003474
mov dword [rsp + 0x78], 0
mov dword [rsp + 0x64], 0xffffffff
mov dword [rsp + 0x70], 0
mov qword [rsp + 0xb0], 0
lea rax, [rsp + 0x70]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0xb0]
mov r8d, 1
xor edx, edx
xor ecx, ecx
call qword [sym.imp.WTSAPI32.dll_WTSEnumerateSessionsW]
test eax, eax
jne 0x1400029ab
mov dword [rsp + 0x7c], 1
lea rcx, [rsp + 0x160]
call fcn.140003640
mov eax, dword [rsp + 0x7c]
jmp 0x140002ccb
mov dword [rsp + 0x60], 0
jmp 0x1400029bf
mov eax, dword [rsp + 0x60]
inc eax
mov dword [rsp + 0x60], eax
mov eax, dword [rsp + 0x70]
cmp dword [rsp + 0x60], eax
jae 0x140002c9e
mov eax, dword [rsp + 0x60]
imul rax, rax, 0x18
mov rcx, qword [rsp + 0xb0]
mov eax, dword [rcx + rax]
mov dword [rsp + 0x64], eax
mov dword [rsp + 0x74], 4
mov qword [rsp + 0x98], 0
mov dword [rsp + 0x80], 0
lea rax, [rsp + 0x80]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x98]
mov r8d, 8
mov edx, dword [rsp + 0x64]
xor ecx, ecx
call qword [sym.imp.WTSAPI32.dll_WTSQuerySessionInformationW]
test eax, eax
je 0x140002a58
mov rax, qword [rsp + 0x98]
mov eax, dword [rax]
mov dword [rsp + 0x74], eax
mov rcx, qword [rsp + 0x98]
call qword [sym.imp.WTSAPI32.dll_WTSFreeMemory]
cmp dword [rsp + 0x74], 0
je 0x140002a56
jmp 0x1400029b5
jmp 0x140002a5d
jmp 0x1400029b5
mov qword [rsp + 0x68], 0
lea rdx, [rsp + 0x68]
mov ecx, dword [rsp + 0x64]
call qword [sym.imp.WTSAPI32.dll_WTSQueryUserToken]
test eax, eax
jne 0x140002a7e
jmp 0x1400029b5
mov dword [rsp + 0x84], 0
lea rax, [rsp + 0x84]
mov qword [rsp + 0x20], rax
mov r9d, 8
lea r8, [rsp + 0xc0]
mov edx, 0x13
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
je 0x140002ad2
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [rsp + 0xc0]
mov qword [rsp + 0x68], rax
jmp 0x140002ad7
jmp 0x1400029b5
lea rax, [rsp + 0xa8]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 1
mov r9d, 2
xor r8d, r8d
mov edx, 0x20f01ff
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
jne 0x140002b0e
jmp 0x1400029b5
lea rcx, [rsp + 0xf0]
call qword [sym.imp.KERNEL32.dll_GetStartupInfoW]
mov dword [rsp + 0xf0], 0x68
mov qword [rsp + 0xa0], 0
xor r8d, r8d
mov rdx, qword [rsp + 0xa8]
lea rcx, [rsp + 0xa0]
call fcn.140002880
mov dword [rsp + 0x88], eax
cmp dword [rsp + 0x88], 0
jne 0x140002b61
jmp 0x1400029b5
lea rdx, [rsp + 0x160]
lea rcx, [0x14001e408]
call fcn.140001220
lea rcx, [rsp + 0x160]
call fcn.1400034bc
mov r9, qword [rsp + 0x5b0]
mov r8, rax
mov edx, 0x208
lea rcx, [rsp + 0x180]
call fcn.140002054
mov dword [rsp + 0xb8], eax
lea rcx, [rsp + 0x160]
call fcn.1400021d4
call fcn.1400020a8
lea rcx, [rsp + 0xd8]
mov qword [rsp + 0x50], rcx
lea rcx, [rsp + 0xf0]
mov qword [rsp + 0x48], rcx
mov qword [rsp + 0x40], 0
mov rcx, qword [rsp + 0xa0]
mov qword [rsp + 0x38], rcx
mov dword [rsp + 0x30], 0x8000428
mov dword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
xor r9d, r9d
lea r8, [rsp + 0x180]
xor edx, edx
mov rcx, qword [rsp + 0xa8]
call qword [rax + 0x18]
mov dword [rsp + 0x8c], eax
lea rax, [rsp + 0x180]
mov qword [rsp + 0xc8], rax
mov rdi, qword [rsp + 0xc8]
xor eax, eax
mov ecx, 0x208
rep stosb byte [rdi], al
cmp dword [rsp + 0x8c], 0
jne 0x140002c55
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x78], eax
mov rcx, qword [rsp + 0xe0]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0xd8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0xa0]
call fcn.1400028b0
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0xa8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x140002c9e
mov rcx, qword [rsp + 0xb0]
call qword [sym.imp.WTSAPI32.dll_WTSFreeMemory]
mov eax, dword [rsp + 0x78]
mov dword [rsp + 0x90], eax
lea rcx, [rsp + 0x160]
call fcn.140003640
mov eax, dword [rsp + 0x90]
mov rcx, qword [rsp + 0x590]
xor rcx, rsp
call fcn.140003e10
add rsp, 0x5a0
pop rdi
ret