Function at 0x1400558d0
Capabilities:
Get session information

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0xb0]
sub rsp, 0x1b0
mov qword [rsp + 0x50], 0xfffffffffffffffe
mov qword [rsp + 0x200], rbx
mov rax, qword [0x1400f4d50]
xor rax, rsp
mov qword [rbp + 0xa0], rax
mov r12d, edx
mov r13, rcx
mov qword [rbp + 0x68], 7
xor esi, esi
mov qword [rbp + 0x60], rsi
mov word [rbp + 0x50], si
mov eax, 0x600
lea r9, [rsp + 0x30]
cmp word [rcx + 0x58], ax
lea rax, [rsp + 0x40]
mov qword [rsp + 0x20], rax
jb 0x140055ab3
lea r8d, [rsi + 0x18]
xor ecx, ecx
call sub.WTSAPI32.dll_WTSQuerySessionInformationW
test eax, eax
jne 0x140055971
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
cmp qword [rbp + 0x68], 8
jb 0x14005596a
mov rcx, qword [rbp + 0x50]
call fcn.140095520
mov eax, ebx
jmp 0x140055d02
mov rdi, qword [rsp + 0x30]
mov r14d, dword [rdi]
mov edx, 2
lea r8d, [rdx - 1]
lea rcx, [rsp + 0x60]
call fcn.140009740
nop
mov r15d, 0x5c
lea rdx, [rdi + 0x60]
lea rcx, [rsp + 0x60]
call fcn.140012430
mov rcx, rax
movzx edx, r15w
call fcn.140055160
mov rcx, rax
lea rdx, [rdi + 0x82]
call fcn.140012430
lea rdx, [rbp + 0x78]
lea rcx, [rsp + 0x60]
call fcn.14000a430
mov rbx, rax
lea rax, [rbp + 0x50]
cmp rax, rbx
je 0x140055a3e
cmp qword [rbp + 0x68], 8
jb 0x1400559e6
mov rcx, qword [rbp + 0x50]
call fcn.140095520
mov qword [rbp + 0x68], 7
mov qword [rbp + 0x60], rsi
mov word [rbp + 0x50], si
cmp qword [rbx + 0x18], 8
jae 0x140055a15
mov r8, qword [rbx + 0x10]
inc r8
add r8, r8
mov rdx, rbx
lea rcx, [rbp + 0x50]
call fcn.140095540
jmp 0x140055a1f
mov rax, qword [rbx]
mov qword [rbp + 0x50], rax
mov qword [rbx], rsi
mov rax, qword [rbx + 0x10]
mov qword [rbp + 0x60], rax
mov rax, qword [rbx + 0x18]
mov qword [rbp + 0x68], rax
mov qword [rbx + 0x18], 7
mov qword [rbx + 0x10], rsi
mov word [rbx], si
cmp qword [rbp + 0x90], 8
jb 0x140055a51
mov rcx, qword [rbp + 0x78]
call fcn.140095520
mov rcx, qword [rsp + 0x30]
call sub.WTSAPI32.dll_WTSFreeMemory
nop
lea rax, [rbp - 0x18]
mov qword [rsp + 0x48], rax
mov rax, qword [rsp + 0x60]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_ostringstream_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__.0
mov qword [rsp + rcx + 0x60], rax
lea rcx, [rsp + 0x68]
call fcn.1400057c0
nop
mov rax, qword [rsp + 0x60]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__.0
mov qword [rsp + rcx + 0x60], rax
lea rax, vtable.std::ios_base.0
mov qword [rbp - 0x18], rax
lea rcx, [rbp - 0x18]
call fcn.14007610c
jmp 0x140055b71
mov r8d, 8
xor ecx, ecx
call sub.WTSAPI32.dll_WTSQuerySessionInformationW
test eax, eax
jne 0x140055ad1
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
jmp 0x14005595a
mov rcx, qword [rsp + 0x30]
mov r14d, dword [rcx]
call sub.WTSAPI32.dll_WTSFreeMemory
mov edx, r12d
lea rcx, [rbp + 0x78]
call fcn.140055650
mov rbx, rax
lea rax, [rbp + 0x50]
cmp rax, rbx
je 0x140055b5e
cmp qword [rbp + 0x68], 8
jb 0x140055b06
mov rcx, qword [rbp + 0x50]
call fcn.140095520
mov qword [rbp + 0x68], 7
mov qword [rbp + 0x60], rsi
mov word [rbp + 0x50], si
cmp qword [rbx + 0x18], 8
jae 0x140055b35
mov r8, qword [rbx + 0x10]
inc r8
add r8, r8
mov rdx, rbx
lea rcx, [rbp + 0x50]
call fcn.140095540
jmp 0x140055b3f
mov rax, qword [rbx]
mov qword [rbp + 0x50], rax
mov qword [rbx], rsi
mov rax, qword [rbx + 0x10]
mov qword [rbp + 0x60], rax
mov rax, qword [rbx + 0x18]
mov qword [rbp + 0x68], rax
mov qword [rbx + 0x18], 7
mov qword [rbx + 0x10], rsi
mov word [rbx], si
cmp qword [rbp + 0x90], 8
jb 0x140055b71
mov rcx, qword [rbp + 0x78]
call fcn.140095520
mov qword [rsp + 0x48], r13
lea rcx, [r13 + 8]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
mov rcx, qword [r13 + 0x40]
mov rax, qword [rcx + 8]
cmp byte [rax + 0x29], 0
jne 0x140055ba8
nop
cmp dword [rax + 0x18], r12d
jae 0x140055b9c
mov rax, qword [rax + 0x10]
jmp 0x140055ba2
mov rcx, rax
mov rax, qword [rax]
cmp byte [rax + 0x29], 0
je 0x140055b90
mov qword [rsp + 0x30], rcx
mov rax, qword [r13 + 0x40]
cmp rcx, rax
je 0x140055bc3
cmp r12d, dword [rcx + 0x18]
jb 0x140055bc3
lea rbx, [rsp + 0x30]
jmp 0x140055bcd
mov qword [rsp + 0x40], rax
lea rbx, [rsp + 0x40]
mov rbx, qword [rbx]
cmp rbx, qword [r13 + 0x40]
jne 0x140055c6d
test r14d, r14d
je 0x140055be5
cmp r14d, 4
jne 0x140055bec
cmp qword [rbp + 0x60], 0
jne 0x140055c11
lea rcx, [r13 + 8]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
nop
cmp qword [rbp + 0x68], 8
jb 0x140055c07
mov rcx, qword [rbp + 0x50]
call fcn.140095520
mov eax, 0x139f
jmp 0x140055d02
mov ecx, 0x140
call fcn.140095cd8
mov qword [rsp + 0x30], rax
test rax, rax
je 0x140055c3a
mov r9, qword [r13 + 0x30]
mov r8d, r14d
mov edx, r12d
mov rcx, rax
call fcn.140054e60
mov rsi, rax
mov dword [rsp + 0x30], r12d
mov qword [rsp + 0x38], rsi
lea rdx, [rsp + 0x30]
lea rcx, [r13 + 0x38]
call fcn.14004f160
mov r8, rax
xor r9d, r9d
lea rdx, [rsp + 0x30]
lea rcx, [r13 + 0x38]
call fcn.14004d720
mov rbx, qword [rsp + 0x30]
jmp 0x140055c75
mov rax, qword [rbx + 0x20]
mov dword [rax + 4], r14d
mov rcx, qword [rbx + 0x20]
add rcx, 8
or r9, 0xffffffffffffffff
xor r8d, r8d
lea rdx, [rbp + 0x50]
call fcn.1400023e0
mov rcx, qword [rbx + 0x20]
add rcx, 0x38
mov rax, qword [rcx]
call qword [rax]
mov esi, eax
test eax, eax
je 0x140055cbf
lea rcx, [r13 + 8]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
nop
cmp qword [rbp + 0x68], 8
jb 0x140055cbb
mov rcx, qword [rbp + 0x50]
call fcn.140095520
mov eax, esi
jmp 0x140055d02
mov rcx, qword [rbx + 0x20]
add rcx, 0xb8
mov rax, qword [rcx]
call qword [rax]
mov ebx, eax
test eax, eax
je 0x140055ce5
lea rcx, [r13 + 8]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
nop
jmp 0x14005595a
lea rcx, [r13 + 8]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
nop
cmp qword [rbp + 0x68], 8
jb 0x140055d00
mov rcx, qword [rbp + 0x50]
call fcn.140095520
xor eax, eax
mov rcx, qword [rbp + 0xa0]
xor rcx, rsp
call fcn.1400959a0
mov rbx, qword [rsp + 0x200]
add rsp, 0x1b0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret