Function at 0x14002a550
Capabilities:
Enumerate processes on remote desktop session host

Disassembly:
mov rax, rsp
push rbp
push rdi
push r12
push r13
push r14
lea rbp, [rax - 0xb8]
sub rsp, 0x190
mov qword [rbp + 0x50], 0xfffffffffffffffe
mov qword [rax + 0x18], rbx
mov qword [rax + 0x20], rsi
mov rax, qword [0x140055020]
xor rax, rsp
mov qword [rbp + 0x80], rax
mov edi, edx
mov r13d, ecx
lea rcx, [rsp + 0x50]
call fcn.140003a40
nop
lea eax, [r13 - 1]
lea r14, [0x140000000]
cmp eax, 8
ja case.default.0x14002a5b9
mov ecx, dword [r14 + rax*4 + 0x2aaac]
add rcx, r14
jmp rcx
lea rdx, str.SESSION_EVENT___Console_connect_event:
lea rcx, [rsp + 0x60]
call fcn.140004e80
mov rcx, rax
mov edx, edi
call qword [sym.imp.MSVCP100.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___unsigned_long_int____ptr64]
mov rcx, rax
mov rdx, qword [sym.imp.MSVCP100.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::endl_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64_]
call qword [sym.imp.MSVCP100.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64____cdecl___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64_____ptr64]
jmp 0x14002a64d
lea rdx, str.SESSION_EVENT___Console_disconnect_event:
jmp 0x14002a5c2
lea rdx, str.SESSION_EVENT___Remote_connect_event:
jmp 0x14002a5c2
lea rdx, str.SESSION_EVENT___Remote_disconnect_event:
jmp 0x14002a5c2
lea rdx, str.SESSION_EVENT___Session_Logon:
jmp 0x14002a5c2
lea rdx, str.SESSION_EVENT___Session_Logoff:
jmp 0x14002a5c2
lea rdx, str.SESSION_EVENT___Session_lock:
jmp 0x14002a5c2
lea rdx, str.SESSION_EVENT___Session_Unlock:
jmp 0x14002a5c2
lea rdx, str.SESSION_EVENT___Session_remote_control_status_change:
jmp 0x14002a638
lea rdx, str.SESSION_EVENT___Unknown:
lea rcx, [rsp + 0x60]
call fcn.140004e80
mov edx, edi
mov rcx, rax
call qword [sym.imp.MSVCP100.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___unsigned_long_int____ptr64]
mov sil, 1
movzx ebx, sil
call fcn.14002a450
test eax, eax
jne 0x14002a681
lea rdx, str.Not_running_terminal_services
lea rcx, [rsp + 0x60]
call fcn.140004e80
mov rcx, rax
mov rdx, qword [sym.imp.MSVCP100.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::endl_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64_]
call qword [sym.imp.MSVCP100.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64____cdecl___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64_____ptr64]
xor sil, sil
call fcn.14002a4d0
test eax, eax
jne 0x14002a6ad
lea rdx, str.Not_running_single_user_terminal_services
lea rcx, [rsp + 0x60]
call fcn.140004e80
mov rcx, rax
mov rdx, qword [sym.imp.MSVCP100.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::endl_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64_]
call qword [sym.imp.MSVCP100.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64____cdecl___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64_____ptr64]
xor bl, bl
test sil, sil
jne 0x14002a6d3
test bl, bl
jne 0x14002a6d3
lea rcx, [rbp - 0x18]
call fcn.140003af0
lea rcx, [rbp - 0x18]
call qword [sym.imp.MSVCP100.dll_public_virtual:_void___cdecl_std::basic_ios_wchar_t__struct_std::char_traits_wchar_t__::destructor_void____ptr64]
mov eax, 1
jmp 0x14002aa80
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov ebx, eax
lea rdx, str.Current_process_id:
lea rcx, [rsp + 0x60]
call fcn.140004e80
mov rcx, rax
mov edx, ebx
call qword [sym.imp.MSVCP100.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___unsigned_long_int____ptr64]
mov rcx, rax
mov rdx, qword [sym.imp.MSVCP100.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::endl_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64_]
call qword [sym.imp.MSVCP100.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64____cdecl___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64_____ptr64]
lea rdx, [rsp + 0x40]
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_ProcessIdToSessionId]
test eax, eax
jne 0x14002a735
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
lea rdx, str.ProcessIdToSessionId_failed_with_error
lea rcx, [rsp + 0x60]
call fcn.140004e80
mov edx, ebx
jmp 0x14002a74a
lea rdx, str.Current_session_id:
lea rcx, [rsp + 0x60]
call fcn.140004e80
mov edx, dword [rsp + 0x40]
mov rcx, rax
call qword [sym.imp.MSVCP100.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___unsigned_long_int____ptr64]
mov rdx, qword [sym.imp.MSVCP100.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::endl_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64_]
mov rcx, rax
call qword [sym.imp.MSVCP100.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64____cdecl___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64_____ptr64]
call qword [sym.imp.KERNEL32.dll_WTSGetActiveConsoleSessionId]
mov ebx, eax
lea rdx, str.Active_console_session_id:
lea rcx, [rsp + 0x60]
call fcn.140004e80
mov rcx, rax
mov edx, ebx
call qword [sym.imp.MSVCP100.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___unsigned_long_int____ptr64]
mov rcx, rax
mov rdx, qword [sym.imp.MSVCP100.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::endl_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64_]
call qword [sym.imp.MSVCP100.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64____cdecl___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64_____ptr64]
xor ebx, ebx
mov qword [rsp + 0x38], rbx
mov dword [rsp + 0x30], ebx
lea rax, [rsp + 0x30]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x38]
xor edx, edx
xor ecx, ecx
lea r8d, [rbx + 1]
call qword [sym.imp.WTSAPI32.dll_WTSEnumerateSessionsW]
test eax, eax
jne 0x14002a7fc
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
lea rdx, str.WTSEnumerateSessions_failed_with_error
lea rcx, [rsp + 0x60]
call fcn.140004e80
mov rcx, rax
mov edx, ebx
call qword [sym.imp.MSVCP100.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___unsigned_long_int____ptr64]
mov rcx, rax
mov rdx, qword [sym.imp.MSVCP100.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::endl_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64_]
call qword [sym.imp.MSVCP100.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64____cdecl___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64_____ptr64]
jmp 0x14002aa05
cmp qword [rsp + 0x38], rbx
je 0x14002aa05
lea rdx, str.Sessions:__
lea rcx, [rsp + 0x60]
call fcn.140004e80
mov rcx, rax
mov edx, dword [rsp + 0x30]
call qword [sym.imp.MSVCP100.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___unsigned_long_int____ptr64]
mov rcx, rax
lea rdx, [0x140043580]
call fcn.140004e80
mov rcx, rax
mov rdx, qword [sym.imp.MSVCP100.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::endl_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64_]
call qword [sym.imp.MSVCP100.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64____cdecl___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64_____ptr64]
cmp dword [rsp + 0x30], ebx
jbe 0x14002a9fa
mov rsi, rbx
mov edx, ebx
lea rcx, [rsp + 0x60]
call qword [sym.imp.MSVCP100.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___unsigned_long_int____ptr64]
mov rcx, rax
lea rdx, [0x1400435a0]
call fcn.140004e80
lea rdx, str._id_
lea rcx, [rsp + 0x60]
call fcn.140004e80
mov rcx, rax
mov rax, qword [rsp + 0x38]
mov edx, dword [rsi + rax]
call qword [sym.imp.MSVCP100.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___unsigned_long_int____ptr64]
lea rdx, str._name___
lea rcx, [rsp + 0x60]
call fcn.140004e80
mov rcx, rax
mov rdx, qword [rsp + 0x38]
mov rdx, qword [rsi + rdx + 8]
call fcn.140004e80
mov rcx, rax
lea rdx, [0x1400435b8]
call fcn.140004e80
lea rdx, str._class_
lea rcx, [rsp + 0x60]
call fcn.140004e80
mov r11, qword [rsp + 0x38]
movsxd r12, dword [rsi + r11 + 0x10]
cmp r12d, 9
ja case.default.0x14002a8f1
mov ecx, dword [r14 + r12*4 + 0x2aad0]
add rcx, r14
jmp rcx
lea rdx, str.Active
lea rcx, [rsp + 0x60]
call fcn.140004e80
jmp 0x14002a9da
lea rdx, str.Connected
lea rcx, [rsp + 0x60]
call fcn.140004e80
jmp 0x14002a9da
lea rdx, str.ConnectQuery
lea rcx, [rsp + 0x60]
call fcn.140004e80
jmp 0x14002a9da
lea rdx, str.Shadow
lea rcx, [rsp + 0x60]
call fcn.140004e80
jmp 0x14002a9da
lea rdx, str.Disconnected
lea rcx, [rsp + 0x60]
call fcn.140004e80
jmp 0x14002a9da
lea rdx, str.Idle
lea rcx, [rsp + 0x60]
call fcn.140004e80
jmp 0x14002a9da
lea rdx, str.Listen
lea rcx, [rsp + 0x60]
call fcn.140004e80
jmp 0x14002a9da
lea rdx, str.Reset
lea rcx, [rsp + 0x60]
call fcn.140004e80
jmp 0x14002a9da
lea rdx, str.Down
lea rcx, [rsp + 0x60]
call fcn.140004e80
jmp 0x14002a9da
lea rdx, str.Init
lea rcx, [rsp + 0x60]
call fcn.140004e80
jmp 0x14002a9da
lea rdx, str.Unknown:
lea rcx, [rsp + 0x60]
call fcn.140004e80
mov rcx, rax
mov edx, r12d
call qword [sym.imp.MSVCP100.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___int____ptr64]
mov rdx, qword [sym.imp.MSVCP100.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::endl_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64_]
mov rcx, rax
call qword [sym.imp.MSVCP100.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64____cdecl___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64_____ptr64]
inc ebx
add rsi, 0x18
cmp ebx, dword [rsp + 0x30]
jb 0x14002a851
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.WTSAPI32.dll_WTSFreeMemory]
lea rdx, [rbp + 0x58]
lea rcx, [rsp + 0x50]
call fcn.140003b90
nop
cmp qword [rax + 0x18], 8
jb 0x14002aa1e
mov rax, qword [rax]
mov r8, rax
mov edx, 2
lea ecx, [rdx + 0x1f]
call fcn.140031a70
nop
cmp qword [rbp + 0x70], 8
jb 0x14002aa40
mov rcx, qword [rbp + 0x58]
call qword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void____ptr64_]
mov rbx, qword [0x140057ab8]
cmp rbx, qword [0x140057ac0]
je 0x14002aa6b
mov rax, qword [rbx]
mov r8, qword [rbx + 8]
mov edx, edi
mov ecx, r13d
call rax
add rbx, 0x10
cmp rbx, qword [0x140057ac0]
jne 0x14002aa50
lea rcx, [rbp - 0x18]
call fcn.140003af0
lea rcx, [rbp - 0x18]
call qword [sym.imp.MSVCP100.dll_public_virtual:_void___cdecl_std::basic_ios_wchar_t__struct_std::char_traits_wchar_t__::destructor_void____ptr64]
xor eax, eax
mov rcx, qword [rbp + 0x80]
xor rcx, rsp
call fcn.140032000
lea r11, [rsp + 0x190]
mov rbx, qword [r11 + 0x40]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r14
pop r13
pop r12
pop rdi
pop rbp
ret