Function at 0x140001210
Capabilities:
Get logon sessions

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x37]
sub rsp, 0x90
mov rax, qword [0x140005008]
xor rax, rsp
mov qword [rbp + 0x2f], rax
xorps xmm0, xmm0
movups xmmword [rbp + 0xf], xmm0
mov ecx, 0x20
call fcn.140001a70
mov rdi, rax
mov qword [rbp + 0xf], rax
mov qword [rbp + 0x1f], 0x11
mov r13d, 0x1f
mov qword [rbp + 0x27], r13
movups xmm0, xmmword [str.______0Bh__:__]
movups xmmword [rax], xmm0
movzx eax, byte [0x140003410]
mov byte [rdi + 0x10], al
lea rax, [rdi + 0x11]
mov byte [rax], 0
cmp rdi, rax
je 0x1400012a3
nop dword [rax]
add byte [rdi], 0xe0
inc rdi
cmp rdi, rax
jne 0x140001290
mov r13, qword [rbp + 0x27]
mov rdi, qword [rbp + 0xf]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, rax
lea r8, [rbp - 0x21]
mov edx, 8
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x1400012ff
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
lea rdx, str.OpenProcessToken_failed_with_error
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.1400016b0
mov rcx, rax
mov edx, ebx
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___unsigned_long_int____ptr64]
mov rcx, rax
lea rdx, [0x140001880]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
mov ebx, 1
jmp 0x140001513
lea rax, [rbp - 0x29]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 0xa]
mov rcx, qword [rbp - 0x21]
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
mov ecx, dword [rbp - 0x29]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov r15, rax
test rax, rax
jne 0x140001363
lea rdx, str.Memory_allocation_failed
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.1400016b0
mov rcx, rax
lea rdx, [0x140001880]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
mov rcx, qword [rbp - 0x21]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea ebx, [r15 + 1]
jmp 0x140001513
lea rax, [rbp - 0x29]
mov qword [rsp + 0x20], rax
mov r9d, dword [rbp - 0x29]
mov r8, r15
mov edx, 0xa
mov rcx, qword [rbp - 0x21]
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
jne 0x1400013d9
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
lea rdx, str.GetTokenInformation_failed_with_error
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.1400016b0
mov rcx, rax
mov edx, ebx
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___unsigned_long_int____ptr64]
mov rcx, rax
lea rdx, [0x140001880]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
mov rcx, r15
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, qword [rbp - 0x21]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, 1
jmp 0x140001513
mov rcx, qword [rbp - 0x21]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xorps xmm0, xmm0
movups xmmword [rbp - 9], xmm0
mov ecx, 8
call fcn.140001a70
mov rsi, rax
mov qword [rbp - 9], rax
lea r12, [rax + 8]
mov qword [rbp + 7], r12
xor eax, eax
mov qword [rsi], rax
mov r14, r12
mov qword [rbp - 1], r12
mov ebx, 1
mov dword [rbp - 0x11], ebx
mov rdx, rsi
lea rcx, [rbp - 0x11]
call qword [sym.imp.Secur32.dll_LsaEnumerateLogonSessions]
mov edx, dword [rbp - 0x11]
cmp rdx, rbx
jae 0x140001432
lea r14, [rsi + rdx*8]
jmp 0x140001449
jbe 0x140001449
lea rcx, [rbp - 9]
call fcn.1400018e0
mov r12, qword [rbp + 7]
mov r14, qword [rbp - 1]
mov rsi, qword [rbp - 9]
mov rdx, rsi
lea rcx, [rbp - 0x11]
call qword [sym.imp.Secur32.dll_LsaEnumerateLogonSessions]
mov rbx, rsi
cmp rsi, r14
je 0x1400014c3
nop
mov rcx, qword [rbx]
test rcx, rcx
je 0x1400014ba
mov rax, qword [r15 + 8]
cmp rax, qword [rcx]
jne 0x1400014ba
lea rdx, [rbp - 0x19]
call qword [sym.imp.Secur32.dll_LsaGetLogonSessionData]
mov rdx, qword [rbp - 0x19]
mov rdx, qword [rdx + 0x80]
lea rcx, str.User_UPN:__s_n
call fcn.140001010
mov rdx, qword [rbp - 0x19]
mov rdx, qword [rdx + 0x18]
lea rcx, str.User_name:__s_n
call fcn.140001010
mov rdx, qword [rbp - 0x19]
mov rdx, qword [rdx + 0x28]
lea rcx, str.User_name:__s_n
call fcn.140001010
add rbx, 8
cmp rbx, r14
jne 0x140001460
mov rcx, r15
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
xor ebx, ebx
test rsi, rsi
je 0x140001513
sub r12, rsi
sar r12, 3
lea rdx, [r12*8]
mov rax, rsi
cmp rdx, 0x1000
jb 0x14000150a
add rdx, 0x27
mov rsi, qword [rsi - 8]
sub rax, rsi
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14000150a
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
mov rcx, rsi
call fcn.140001aac
nop
cmp r13, 0x10
jb 0x14000154d
lea rdx, [r13 + 1]
mov rax, rdi
cmp rdx, 0x1000
jb 0x140001545
add rdx, 0x27
mov rdi, qword [rdi - 8]
sub rax, rdi
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140001545
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
mov rcx, rdi
call fcn.140001aac
mov eax, ebx
mov rcx, qword [rbp + 0x2f]
xor rcx, rsp
call fcn.140001a50
lea r11, [rsp + 0x90]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rdi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret