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

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rdi
push rbp
push r14
push r15
lea rbp, [rsp - 0x5d0]
sub rsp, 0x6d0
mov rax, qword [0x140013010]
xor rax, rsp
mov qword [rbp + 0x5c0], rax
mov rbx, rcx
xor edx, edx
lea rcx, [rbp + 0x1a0]
mov r8d, 0x208
xor r14d, r14d
call sub.VCRUNTIME140.dll_memset
mov r8, rbx
lea rcx, [rbp + 0x1a0]
mov edx, 0x104
mov r15d, r14d
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscpy_s]
mov edx, 0x104
lea rcx, [rbp + 0x1a0]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcslwr_s]
lea rcx, str.Kernel32.dll
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x1400018ed
lea rdx, str.QueryFullProcessImageNameW
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov r15, rax
test rax, rax
je 0x140001939
xor edx, edx
lea ecx, [rdx + 2]
call qword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
mov rdi, rax
cmp rax, 0xffffffffffffffff
jne 0x140001911
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x140001acb
lea rdx, [rsp + 0x50]
mov dword [rsp + 0x50], 0x238
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_Process32FirstW]
test eax, eax
jne 0x140001940
test rdi, rdi
je 0x140001939
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x140001acb
mov qword [rsp + 0x6f8], rsi
nop dword [rax + rax]
xor edx, edx
lea rcx, [rbp + 0x3b0]
mov r8d, 0x208
call sub.VCRUNTIME140.dll_memset
mov r8d, dword [rsp + 0x58]
xor edx, edx
mov ecx, 0x400
mov dword [rbp + 0x198], 0x104
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov rsi, rax
test rax, rax
je 0x14000199e
lea r9, [rbp + 0x198]
xor edx, edx
lea r8, [rbp + 0x3b0]
mov rcx, rax
call r15
mov edx, 0x104
lea rcx, [rbp + 0x3b0]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcslwr_s]
lea rdx, [rbp + 0x1a0]
lea rcx, [rbp + 0x3b0]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
jne 0x140001a87
mov ecx, dword [rsp + 0x58]
lea rdx, [rbp + 0x190]
mov dword [rbp + 0x190], r14d
call qword [sym.imp.KERNEL32.dll_ProcessIdToSessionId]
mov ecx, dword [rbp + 0x190]
lea r9, [rsp + 0x48]
test eax, eax
mov qword [rsp + 0x48], r14
lea rax, [rbp + 0x194]
mov dword [rbp + 0x194], r14d
cmove ecx, r14d
mov qword [rsp + 0x20], rax
mov dword [rbp + 0x190], ecx
mov ebx, 0xffffffff
xor ecx, ecx
xor edx, edx
lea r8d, [rbx + 2]
call qword [sym.imp.WTSAPI32.dll_WTSEnumerateSessionsW]
test eax, eax
jne 0x140001a31
mov ebx, 0xffffffff
jmp 0x140001a7f
mov r8d, dword [rbp + 0x194]
mov eax, r14d
mov r9, qword [rsp + 0x48]
test r8d, r8d
je 0x140001a76
mov ecx, eax
lea rdx, [rcx + rcx*2]
movups xmm0, xmmword [r9 + rdx*8]
movsd xmm1, qword [r9 + rdx*8 + 0x10]
movsd qword [rsp + 0x40], xmm1
movups xmmword [rsp + 0x30], xmm0
cmp dword [rsp + 0x40], r14d
je 0x140001a72
inc eax
cmp eax, r8d
jb 0x140001a45
jmp 0x140001a76
mov ebx, dword [rsp + 0x30]
mov rcx, r9
call qword [sym.imp.WTSAPI32.dll_WTSFreeMemory]
cmp ebx, dword [rbp + 0x190]
je 0x140001a9f
lea rdx, [rsp + 0x50]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_Process32NextW]
test eax, eax
jne 0x140001950
jmp 0x140001aa4
mov r14d, dword [rsp + 0x58]
test rdi, rdi
je 0x140001ab2
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test rsi, rsi
je 0x140001ac0
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rsi, qword [rsp + 0x6f8]
mov eax, r14d
mov rcx, qword [rbp + 0x5c0]
xor rcx, rsp
call fcn.1400098f0
lea r11, [rsp + 0x6d0]
mov rbx, qword [r11 + 0x30]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret