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

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rdi
push r15
mov rbp, rsp
sub rsp, 0x70
mov rax, qword [0x1403ceac0]
xor rax, rsp
mov qword [rbp - 8], rax
xor edx, edx
lea rax, [rbp - 0x18]
mov rdi, rcx
mov qword [rsp + 0x20], rax
lea r9, [rbp - 0x28]
xor ecx, ecx
lea r8d, [rdx + 1]
call sub.WTSAPI32.dll_WTSEnumerateSessionsW
test eax, eax
jne 0x140222dbf
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rbp - 0x28], eax
lea rax, [0x1403cfa88]
mov qword [rbp - 0x20], rax
movups xmm0, xmmword [rbp - 0x28]
movups xmmword [rdi], xmm0
jmp 0x140222f3f
mov r9d, dword [rbp - 0x18]
xor r15d, r15d
mov r8, qword [rbp - 0x28]
mov edx, r15d
test r9d, r9d
je 0x140222dfa
mov eax, edx
lea rcx, [rax + rax*2]
movups xmm0, xmmword [r8 + rcx*8]
movsd xmm1, qword [r8 + rcx*8 + 0x10]
movsd qword [rbp - 0x30], xmm1
movups xmmword [rbp - 0x40], xmm0
cmp dword [rbp - 0x30], r15d
je 0x140222e4d
inc edx
cmp edx, r9d
jb 0x140222dd2
mov edx, dword [0x1403e17e8]
lea rbx, vtable.._AVimpersonation_error_category__1__make_error_code__A0x489fcef9__YA_AVerror_code_std__W4impersonation_error_2__Z_.0
mov rax, qword gs:[0x58]
mov ecx, 4
mov rax, qword [rax + rdx*8]
mov eax, dword [rcx + rax]
cmp dword [0x1403e11cc], eax
jg 0x140223053
jmp 0x140222e2e
mov r8, qword [rbp - 0x28]
mov rcx, r8
mov dword [rbp - 0x40], 1
mov qword [rbp - 0x38], rbx
call sub.WTSAPI32.dll_WTSFreeMemory
movups xmm0, xmmword [rbp - 0x40]
movups xmmword [rdi], xmm0
jmp 0x140222f3f
mov qword [rsp + 0x98], rsi
mov rcx, r8
mov qword [rsp + 0xa0], r14
call sub.WTSAPI32.dll_WTSFreeMemory
xor edx, edx
lea rax, [rbp - 0x18]
lea r9, [rbp - 0x28]
mov qword [rsp + 0x20], rax
xor ecx, ecx
lea r8d, [rdx + 1]
call sub.WTSAPI32.dll_WTSEnumerateProcessesW
test eax, eax
jne 0x140222ea0
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rbp - 0x28], eax
lea rax, [0x1403cfa88]
mov qword [rbp - 0x20], rax
movups xmm0, xmmword [rbp - 0x28]
jmp 0x140222f2c
mov r8d, dword [rbp - 0x18]
mov ebx, r15d
test r8d, r8d
je 0x140222ee9
mov r14d, dword [rbp - 0x40]
mov rax, qword [rbp - 0x28]
mov esi, ebx
lea rcx, [rsi + rsi*2]
cmp r14d, dword [rax + rcx*8]
jne 0x140222ee2
mov rdx, qword [rax + rcx*8 + 8]
test rdx, rdx
je 0x140222ee2
lea rcx, str.explorer.exe
call fcn.1402c7c40
test eax, eax
je 0x140222f5f
mov r8d, dword [rbp - 0x18]
inc ebx
cmp ebx, r8d
jb 0x140222eb0
mov edx, dword [0x1403e17e8]
lea rbx, vtable.._AVimpersonation_error_category__1__make_error_code__A0x489fcef9__YA_AVerror_code_std__W4impersonation_error_2__Z_.0
mov rax, qword gs:[0x58]
mov ecx, 4
mov rax, qword [rax + rdx*8]
mov eax, dword [rcx + rax]
cmp dword [0x1403e11cc], eax
jg 0x140223008
mov rcx, qword [rbp - 0x28]
mov dword [rbp - 0x40], r15d
mov qword [rbp - 0x38], rbx
call sub.WTSAPI32.dll_WTSFreeMemory
movups xmm0, xmmword [rbp - 0x40]
movups xmmword [rdi], xmm0
mov rsi, qword [rsp + 0x98]
mov r14, qword [rsp + 0xa0]
mov rax, rdi
mov rcx, qword [rbp - 8]
xor rcx, rsp
call fcn.140296f70
mov rbx, qword [rsp + 0xa8]
add rsp, 0x70
pop r15
pop rdi
pop rbp
ret
mov rcx, qword [rbp - 0x28]
lea rax, [rsi + rsi*2]
mov ebx, dword [rcx + rax*8 + 4]
call sub.WTSAPI32.dll_WTSFreeMemory
mov r8d, ebx
xor edx, edx
mov ecx, 0x410
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov rbx, rax
test rax, rax
jne 0x140222f9d
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rdi], eax
lea rax, [0x1403cfa88]
mov qword [rdi + 8], rax
jmp 0x140222f2f
lea r8, [rbp - 0x10]
mov qword [rbp - 0x10], r15
mov edx, 0xf01ff
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x140222fc1
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rdi], eax
jmp 0x140222fdc
mov rcx, qword [rbp - 0x10]
call qword [sym.imp.ADVAPI32.dll_ImpersonateLoggedOnUser]
test eax, eax
jne 0x140222fd9
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rdi], eax
jmp 0x140222fdc
mov dword [rdi], r15d
mov rcx, qword [rbp - 0x10]
lea rax, [0x1403cfa88]
mov qword [rdi + 8], rax
test rcx, rcx
je 0x140222ffa
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbp - 0x10], r15
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x140222f2f
lea rcx, [0x1403e11cc]
call fcn.14029718c
cmp dword [0x1403e11cc], 0xffffffff
jne 0x140222f17
lea rax, vtable.._AVimpersonation_error_category__1__make_error_code__A0x489fcef9__YA_AVerror_code_std__W4impersonation_error_2__Z_.0
mov qword [0x1403ce648], rbx
lea rcx, [0x140308b60]
mov qword [vtable.._AVimpersonation_error_category__1__make_error_code__A0x489fcef9__YA_AVerror_code_std__W4impersonation_error_2__Z_.0], rax
call fcn.1402974d4
lea rcx, [0x1403e11cc]
call fcn.14029712c
jmp 0x140222f17
lea rcx, [0x1403e11cc]
call fcn.14029718c
cmp dword [0x1403e11cc], 0xffffffff
jne 0x140222e2a
lea rax, vtable.._AVimpersonation_error_category__1__make_error_code__A0x489fcef9__YA_AVerror_code_std__W4impersonation_error_2__Z_.0
mov qword [0x1403ce648], rbx
lea rcx, [0x140308b60]
mov qword [vtable.._AVimpersonation_error_category__1__make_error_code__A0x489fcef9__YA_AVerror_code_std__W4impersonation_error_2__Z_.0], rax
call fcn.1402974d4
lea rcx, [0x1403e11cc]
call fcn.14029712c
jmp 0x140222e2a