Function at 0x14002d8d0
Capabilities:
Get session information

Disassembly:
mov rax, rsp
push rbp
lea rbp, [rsp - 0x80]
sub rsp, 0x180
mov qword [rsp + 0x50], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
mov qword [rax + 0x20], r14
mov rax, qword [0x1403ad830]
xor rax, rsp
mov qword [rbp + 0x78], rax
lea rdx, str.CurrentSessionId.ini
lea rcx, [rbp - 0x30]
call fcn.14001c950
nop
call fcn.140034870
mov rcx, rax
mov r8b, 1
lea rdx, [rbp + 0x50]
call fcn.140034120
nop
lea r8, [rbp - 0x30]
mov rdx, rax
lea rcx, [rbp - 0x58]
call fcn.14001da00
nop
lea rcx, [rbp + 0x50]
call fcn.14001d440
nop
lea rcx, [rbp - 0x30]
call fcn.14001d440
xor edi, edi
mov dword [rsp + 0x30], edi
mov esi, edi
lea rcx, [rbp - 0x58]
call fcn.140015e70
lea r14d, [rdi - 1]
test al, al
je 0x14002d9e8
lea rcx, [rbp]
call fcn.14002b3c0
nop
lea rdx, [rbp - 0x58]
lea rcx, [rbp]
call fcn.14002c370
lea rdx, str.CurrentSessionId
lea rcx, [rbp - 0x80]
call fcn.14001c950
nop
lea rdx, str.Main
lea rcx, [rsp + 0x58]
call fcn.14001c950
nop
lea r9, [rsp + 0x30]
lea r8, [rbp - 0x80]
lea rdx, [rsp + 0x58]
lea rcx, [rbp]
call fcn.14002c050
mov ebx, eax
lea rcx, [rsp + 0x58]
call fcn.14001d440
nop
lea rcx, [rbp - 0x80]
call fcn.14001d440
mov ecx, dword [rsp + 0x30]
test ebx, ebx
cmovne ecx, r14d
mov dword [rsp + 0x30], ecx
lea rcx, [rbp]
call fcn.14002b570
mov eax, dword [rsp + 0x30]
test eax, eax
jle 0x14002da46
mov qword [rsp + 0x38], rdi
mov dword [rsp + 0x34], edi
xor bl, bl
lea rcx, [rsp + 0x34]
mov qword [rsp + 0x20], rcx
lea r9, [rsp + 0x38]
mov r8d, 8
mov edx, eax
xor ecx, ecx
call sub.WTSAPI32.dll_WTSQuerySessionInformationW
test eax, eax
je 0x14002dc01
mov rcx, qword [rsp + 0x38]
cmp dword [rsp + 0x34], 4
jne 0x14002da33
cmp dword [rcx], 0
sete bl
call sub.WTSAPI32.dll_WTSFreeMemory
test bl, bl
je 0x14002dc01
mov eax, dword [rsp + 0x30]
test eax, eax
jns 0x14002db63
movdqa xmm0, xmmword [0x1402d0510]
movdqu xmmword [rsp + 0x68], xmm0
mov byte [rsp + 0x58], 0
mov r8d, SQLFreeHandle
lea rdx, str.WTSGetActiveConsoleSessionId
lea rcx, [rsp + 0x58]
call fcn.140004c40
nop
lea rdx, str.Kernel32.dll
lea rcx, [rbp - 0x80]
call fcn.14001c840
nop
lea r8, [rsp + 0x58]
lea rdx, [rbp - 0x80]
lea rcx, [rsp + 0x40]
call fcn.14004ba50
nop
lea rcx, [rbp - 0x80]
call fcn.14001d440
nop
mov rdx, qword [rsp + 0x70]
cmp rdx, 0x10
jb 0x14002dae3
inc rdx
mov rcx, qword [rsp + 0x58]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14002dade
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14002dc0b
call fcn.140283144
movdqa xmm0, xmmword [0x1402d0510]
movdqu xmmword [rsp + 0x68], xmm0
mov byte [rsp + 0x58], 0
mov rax, qword [rsp + 0x40]
test rax, rax
je 0x14002db55
call rax
mov esi, eax
mov dword [rsp + 0x30], eax
mov qword [rsp + 0x38], rdi
mov dword [rsp + 0x34], edi
xor bl, bl
lea rax, [rsp + 0x34]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x38]
mov r8d, 8
mov edx, esi
xor ecx, ecx
call sub.WTSAPI32.dll_WTSQuerySessionInformationW
test eax, eax
je 0x14002db50
mov rcx, qword [rsp + 0x38]
cmp dword [rsp + 0x34], 4
jne 0x14002db47
cmp dword [rcx], 0
sete bl
call sub.WTSAPI32.dll_WTSFreeMemory
test bl, bl
jne 0x14002db55
mov dword [rsp + 0x30], r14d
lea rcx, [rsp + 0x40]
call fcn.14004bab0
mov eax, dword [rsp + 0x30]
test eax, eax
jns 0x14002dbc6
mov qword [rsp + 0x38], rdi
mov dword [rsp + 0x34], edi
lea rax, [rsp + 0x34]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x38]
xor edx, edx
xor ecx, ecx
lea r8d, [rdx + 1]
call sub.WTSAPI32.dll_WTSEnumerateSessionsW
test eax, eax
je 0x14002dbbe
mov rcx, qword [rsp + 0x38]
mov eax, dword [rsp + 0x34]
test eax, eax
je 0x14002dbb9
mov rdx, rcx
mov r8d, eax
cmp dword [rdx + 0x10], 0
jne 0x14002dbaf
mov eax, dword [rdx]
mov dword [rsp + 0x30], eax
add rdx, 0x18
sub r8, 1
jne 0x14002dba3
call sub.WTSAPI32.dll_WTSFreeMemory
mov eax, dword [rsp + 0x30]
test eax, eax
js 0x14002dbc8
mov edi, eax
test edi, edi
cmovne esi, edi
lea rcx, [rbp - 0x58]
call fcn.14001d440
mov eax, esi
mov rcx, qword [rbp + 0x78]
xor rcx, rsp
call fcn.140283120
lea r11, [rsp + 0x180]
mov rbx, qword [r11 + 0x10]
mov rsi, qword [r11 + 0x18]
mov rdi, qword [r11 + 0x20]
mov r14, qword [r11 + 0x28]
mov rsp, r11
pop rbp
ret
mov dword [rsp + 0x30], r14d
jmp 0x14002da4c
call fcn.140287d84
int3