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

Disassembly:
push rbp
push rsi
push rdi
push r14
push r15
lea rbp, [rsp - 0x80]
sub rsp, 0x180
mov qword [rbp + 0x50], 0xfffffffffffffffe
mov qword [rsp + 0x1c0], rbx
mov rax, qword [0x140051020]
xor rax, rsp
mov qword [rbp + 0x78], rax
mov edi, edx
mov r14d, ecx
lea rcx, [rsp + 0x50]
call fcn.140004590
nop
lea eax, [r14 - 1]
lea r15, [0x140000000]
cmp eax, 8
ja case.default.0x140029721
mov ecx, dword [r15 + rax*4 + 0x29c18]
add rcx, r15
jmp rcx
lea rdx, str.SESSION_EVENT___Console_connect_event:
lea rcx, [rsp + 0x60]
call fcn.140005730
mov rcx, rax
mov edx, edi
call qword [sym.imp.MSVCP110.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.MSVCP110.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.MSVCP110.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 0x1400297b5
lea rdx, str.SESSION_EVENT___Console_disconnect_event:
jmp 0x14002972a
lea rdx, str.SESSION_EVENT___Remote_connect_event:
jmp 0x14002972a
lea rdx, str.SESSION_EVENT___Remote_disconnect_event:
jmp 0x14002972a
lea rdx, str.SESSION_EVENT___Session_Logon:
jmp 0x14002972a
lea rdx, str.SESSION_EVENT___Session_Logoff:
jmp 0x14002972a
lea rdx, str.SESSION_EVENT___Session_lock:
jmp 0x14002972a
lea rdx, str.SESSION_EVENT___Session_Unlock:
jmp 0x14002972a
lea rdx, str.SESSION_EVENT___Session_remote_control_status_change:
jmp 0x1400297a0
lea rdx, str.SESSION_EVENT___Unknown:
lea rcx, [rsp + 0x60]
call fcn.140005730
mov edx, edi
mov rcx, rax
call qword [sym.imp.MSVCP110.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.1400295c0
test eax, eax
jne 0x1400297e9
lea rdx, str.Not_running_terminal_services
lea rcx, [rsp + 0x60]
call fcn.140005730
mov rcx, rax
mov rdx, qword [sym.imp.MSVCP110.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.MSVCP110.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.140029640
test eax, eax
jne 0x140029815
lea rdx, str.Not_running_single_user_terminal_services
lea rcx, [rsp + 0x60]
call fcn.140005730
mov rcx, rax
mov rdx, qword [sym.imp.MSVCP110.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.MSVCP110.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 0x140029828
test bl, bl
jne 0x140029828
mov ebx, 1
jmp 0x140029bdd
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov ebx, eax
lea rdx, str.Current_process_id:
lea rcx, [rsp + 0x60]
call fcn.140005730
mov rcx, rax
mov edx, ebx
call qword [sym.imp.MSVCP110.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.MSVCP110.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.MSVCP110.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 0x14002988a
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
lea rdx, str.ProcessIdToSessionId_failed_with_error
lea rcx, [rsp + 0x60]
call fcn.140005730
mov edx, ebx
jmp 0x14002989f
lea rdx, str.Current_session_id:
lea rcx, [rsp + 0x60]
call fcn.140005730
mov edx, dword [rsp + 0x40]
mov rcx, rax
call qword [sym.imp.MSVCP110.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.MSVCP110.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.MSVCP110.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.140005730
mov rcx, rax
mov edx, ebx
call qword [sym.imp.MSVCP110.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.MSVCP110.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.MSVCP110.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]
mov qword [rsp + 0x38], 0
mov dword [rsp + 0x30], 0
lea rax, [rsp + 0x30]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x38]
xor edx, edx
xor ecx, ecx
lea r8d, [rdx + 1]
call qword [sym.imp.WTSAPI32.dll_WTSEnumerateSessionsW]
test eax, eax
jne 0x140029957
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
lea rdx, str.WTSEnumerateSessions_failed_with_error
lea rcx, [rsp + 0x60]
call fcn.140005730
mov rcx, rax
mov edx, ebx
call qword [sym.imp.MSVCP110.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.MSVCP110.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.MSVCP110.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 0x140029b6a
cmp qword [rsp + 0x38], 0
je 0x140029b6a
lea rdx, str.Sessions:__
lea rcx, [rsp + 0x60]
call fcn.140005730
mov rcx, rax
mov edx, dword [rsp + 0x30]
call qword [sym.imp.MSVCP110.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, [0x140041750]
call fcn.140005730
mov rcx, rax
mov rdx, qword [sym.imp.MSVCP110.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.MSVCP110.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 esi, esi
cmp dword [rsp + 0x30], esi
jbe 0x140029b5f
nop dword [rax]
mov edx, esi
lea rcx, [rsp + 0x60]
call qword [sym.imp.MSVCP110.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, [0x140041770]
call fcn.140005730
lea rcx, [rsi + rsi*2]
lea rbx, [rcx*8]
lea rdx, str._id_
lea rcx, [rsp + 0x60]
call fcn.140005730
mov rcx, rax
mov rax, qword [rsp + 0x38]
mov edx, dword [rbx + rax]
call qword [sym.imp.MSVCP110.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.140005730
mov rcx, rax
mov rdx, qword [rsp + 0x38]
mov rdx, qword [rbx + rdx + 8]
call fcn.140005730
mov rcx, rax
lea rdx, [0x140041788]
call fcn.140005730
lea rdx, str._class_
lea rcx, [rsp + 0x60]
call fcn.140005730
mov rax, qword [rsp + 0x38]
movsxd rbx, dword [rbx + rax + 0x10]
cmp ebx, 9
ja case.default.0x140029a5b
mov ecx, dword [r15 + rbx*4 + 0x29c3c]
add rcx, r15
jmp rcx
lea rdx, str.Active
lea rcx, [rsp + 0x60]
call fcn.140005730
jmp 0x140029b43
lea rdx, str.Connected
lea rcx, [rsp + 0x60]
call fcn.140005730
jmp 0x140029b43
lea rdx, str.ConnectQuery
lea rcx, [rsp + 0x60]
call fcn.140005730
jmp 0x140029b43
lea rdx, str.Shadow
lea rcx, [rsp + 0x60]
call fcn.140005730
jmp 0x140029b43
lea rdx, str.Disconnected
lea rcx, [rsp + 0x60]
call fcn.140005730
jmp 0x140029b43
lea rdx, str.Idle
lea rcx, [rsp + 0x60]
call fcn.140005730
jmp 0x140029b43
lea rdx, str.Listen
lea rcx, [rsp + 0x60]
call fcn.140005730
jmp 0x140029b43
lea rdx, str.Reset
lea rcx, [rsp + 0x60]
call fcn.140005730
jmp 0x140029b43
lea rdx, str.Down
lea rcx, [rsp + 0x60]
call fcn.140005730
jmp 0x140029b43
lea rdx, str.Init
lea rcx, [rsp + 0x60]
call fcn.140005730
jmp 0x140029b43
lea rdx, str.Unknown:
lea rcx, [rsp + 0x60]
call fcn.140005730
mov rcx, rax
mov edx, ebx
call qword [sym.imp.MSVCP110.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.MSVCP110.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.MSVCP110.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 esi
cmp esi, dword [rsp + 0x30]
jb 0x1400299b0
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.WTSAPI32.dll_WTSFreeMemory]
lea rdx, [rbp + 0x58]
lea rcx, [rsp + 0x50]
call fcn.140004700
nop
cmp qword [rax + 0x18], 8
jb 0x140029b83
mov rax, qword [rax]
mov r8, rax
mov edx, 2
lea ecx, [rdx + 0x1f]
call fcn.140030a90
nop
cmp qword [rbp + 0x70], 8
jb 0x140029ba5
mov rcx, qword [rbp + 0x58]
call qword [sym.imp.MSVCR110.dll_void___cdecl_operator_delete_void____ptr64_]
mov rbx, qword [0x140052c00]
cmp rbx, qword [0x140052c08]
je 0x140029bdb
nop word [rax + rax]
mov rax, qword [rbx]
mov r8, qword [rbx + 8]
mov edx, edi
mov ecx, r14d
call rax
add rbx, 0x10
cmp rbx, qword [0x140052c08]
jne 0x140029bc0
xor ebx, ebx
lea rcx, [rbp - 0x18]
call fcn.140004650
lea rcx, [rbp - 0x18]
call qword [sym.imp.MSVCP110.dll_public_virtual:_void___cdecl_std::basic_ios_wchar_t__struct_std::char_traits_wchar_t__::destructor_void____ptr64]
mov eax, ebx
mov rcx, qword [rbp + 0x78]
xor rcx, rsp
call fcn.140031010
mov rbx, qword [rsp + 0x1c0]
add rsp, 0x180
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret