Function at 0x14001c470
Capabilities:
Create process on windows
Enumerate processes on remote desktop session host

Disassembly:
mov qword [rsp + 0x10], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x230]
sub rsp, 0x330
mov rax, qword [0x140041008]
xor rax, rsp
mov qword [rbp + 0x220], rax
lea rdx, str.sam.exe
mov r13d, r9d
mov r12d, r8d
mov r15, rcx
xor ebx, ebx
call fcn.1400221fc
test eax, eax
jne 0x14001c5b3
lea rax, [rsp + 0x60]
mov dword [rsp + 0x60], ebx
lea r9, [rsp + 0x68]
mov qword [rsp + 0x20], rax
xor edx, edx
mov qword [rsp + 0x68], rbx
xor ecx, ecx
lea r8d, [rbx + 1]
mov r14d, ebx
call qword [sym.imp.WTSAPI32.dll_WTSEnumerateProcessesW]
test eax, eax
je 0x14001c741
mov edx, dword [rsp + 0x60]
mov edi, ebx
test edx, edx
je 0x14001c596
nop
mov eax, edi
lea rcx, [rax + rax*2]
mov rax, qword [rsp + 0x68]
lea rsi, [rcx*8]
cmp dword [rsi + rax], r12d
jne 0x14001c58c
mov rcx, qword [rsi + rax + 8]
mov rdx, r15
call fcn.1400221fc
test eax, eax
jne 0x14001c588
mov rcx, qword [rsp + 0x68]
lea rdx, [rsp + 0x70]
mov qword [rsp + 0x70], rbx
mov rcx, qword [rsi + rcx + 0x10]
call qword [sym.imp.ADVAPI32.dll_ConvertSidToStringSidW]
mov rcx, qword [rsp + 0x70]
test rcx, rcx
je 0x14001c583
lea rdx, str.S_1_5_18
call fcn.1400221fc
test eax, eax
jne 0x14001c578
mov rax, qword [rsp + 0x68]
xor edx, edx
mov ecx, 0x1fffff
mov r8d, dword [rsi + rax + 4]
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov r14, rax
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_LocalFree]
test r14, r14
jne 0x14001c5a6
mov edx, dword [rsp + 0x60]
inc edi
cmp edi, edx
jb 0x14001c500
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.WTSAPI32.dll_WTSFreeMemory]
jmp 0x14001c741
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.WTSAPI32.dll_WTSFreeMemory]
jmp 0x14001c5c1
mov edx, r12d
mov rcx, r15
call fcn.14001bd80
mov r14, rax
test r14, r14
je 0x14001c741
test r15, r15
je 0x14001c738
lea r8, [rsp + 0x78]
mov qword [rsp + 0x78], rbx
mov edx, 0xb
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x14001c738
xor edx, edx
lea rcx, [rbp - 0x60]
lea r8d, [rdx + 0x68]
call fcn.14001fd60
lea rax, str.WinSta0Winlogon
mov dword [rbp - 0x60], 0x68
mov qword [rbp - 0x50], rax
lea rdx, [rbp + 0x10]
xor eax, eax
mov r8d, 0x104
xor ecx, ecx
mov qword [rbp - 0x80], rax
mov qword [rbp - 0x78], rax
mov qword [rbp - 0x70], rax
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x14001c72d
mov r8, 0xffffffffffffffff
mov rax, r8
inc rax
cmp word [r15 + rax*2], bx
jne 0x14001c646
lea rdx, [rbp + 0x10]
mov rcx, r8
inc rcx
cmp word [rdx + rcx*2], bx
jne 0x14001c657
add rax, 0x104
add rcx, rax
mov eax, 2
mul rcx
cmovo rax, r8
mov rcx, rax
call fcn.14001e484
lea r8, [rbp + 0x10]
mov rdi, rax
lea rdx, str.__s___closet__s
mov r9, r15
mov rcx, rax
test r13d, r13d
jne 0x14001c69d
lea rdx, str.__s___close__s
call qword [sym.imp.USER32.dll_wsprintfW]
mov rcx, qword [rsp + 0x78]
lea rax, [rbp - 0x80]
mov qword [rsp + 0x50], rax
xor r9d, r9d
lea rax, [rbp - 0x60]
mov r8, rdi
mov qword [rsp + 0x48], rax
xor edx, edx
mov qword [rsp + 0x40], rbx
mov qword [rsp + 0x38], rbx
mov dword [rsp + 0x30], ebx
mov dword [rsp + 0x28], ebx
mov qword [rsp + 0x20], rbx
call qword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
test eax, eax
je 0x14001c70e
test r13d, r13d
lea rax, str._TREE
lea rdx, [0x14003a6d4]
mov r8, rdi
cmovne rdx, rax
lea rcx, str.dol_start_:_CLOSE_AT_s_:__s__n
call fcn.14001de10
mov ebx, 1
jmp 0x14001c725
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8, rdi
lea rcx, str.dol_start_:_create_process_with_token_failed__08x_:__s__n
mov edx, eax
call fcn.14001de10
mov rcx, rdi
call fcn.14001e450
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, ebx
mov rcx, qword [rbp + 0x220]
xor rcx, rsp
call fcn.14001e3f0
mov rbx, qword [rsp + 0x378]
add rsp, 0x330
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret