Function at 0x140022340
Capabilities:
Create a process with modified i/o handles and window
Create pipe
Create process on windows
Read file on windows
Read pipe

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rdx
push rbp
push rsi
push rdi
push r14
push r15
lea rbp, [rsp - 0x450]
sub rsp, 0x550
mov rsi, rdx
mov r14, rcx
xor r15d, r15d
lea rbx, [rdx + 0x18]
cmp qword [rbx], 7
jbe 0x14002237c
mov rdx, qword [rdx]
lea rdi, [rsi + 0x18]
jmp 0x14002237f
mov rdi, rbx
lea rcx, str.____Run_async_command:__s_n
call fcn.140001e00
mov dword [rbp - 0x60], 0x18
xorps xmm0, xmm0
movups xmmword [rbp - 0x58], xmm0
mov dword [rbp - 0x50], 1
mov qword [rbp - 0x58], r15
xor r9d, r9d
lea r8, [rbp - 0x60]
lea rdx, [rsp + 0x58]
lea rcx, [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_CreatePipe]
test eax, eax
je 0x140022472
mov dword [rbp - 0x40], 0x68
xorps xmm0, xmm0
movups xmmword [rbp - 0x38], xmm0
movups xmmword [rbp - 0x28], xmm0
movups xmmword [rbp - 0x18], xmm0
movups xmmword [rbp - 8], xmm0
movups xmmword [rbp + 8], xmm0
movups xmmword [rbp + 0x18], xmm0
mov dword [rbp - 4], 0x101
mov rax, qword [rsp + 0x58]
mov qword [rbp + 0x18], rax
mov qword [rbp + 0x20], rax
mov word [rbp], r15w
xor eax, eax
movups xmmword [rsp + 0x60], xmm0
mov qword [rsp + 0x70], rax
mov rdx, rsi
cmp qword [rbx], 7
jbe 0x140022416
mov rdx, qword [rsi]
lea rax, [rsp + 0x60]
mov qword [rsp + 0x48], rax
lea rax, [rbp - 0x40]
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x38], r15
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x28], 0x10
mov dword [rsp + 0x20], 1
xor r9d, r9d
xor r8d, r8d
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
jne 0x140022523
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rbx, rdi
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rdx, rsi
cmp qword [rbx], 7
jbe 0x140022484
mov rdx, qword [rsi]
mov r8d, eax
lea rcx, str.____Failed_to_run_async_command:__s__error_0x_X_n
call fcn.140001e00
xorps xmm0, xmm0
movups xmmword [rbp + 0x30], xmm0
movdqa xmm1, xmmword [0x1400580d0]
mov byte [rbp + 0x30], 0
mov byte [r14], 0
movups xmm0, xmmword [rbp + 0x30]
movups xmmword [r14 + 8], xmm0
movups xmmword [r14 + 0x18], xmm1
mov rdx, qword [rbx]
cmp rdx, 7
jbe 0x1400224fa
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsi]
cmp rdx, 0x1000
jb 0x1400224f5
add rdx, 0x27
mov r8, qword [rcx - 8]
sub rcx, r8
lea rax, [rcx - 8]
cmp rax, 0x1f
ja 0x140022741
mov rcx, r8
lea rbx, [rsi + 0x18]
call fcn.140024d64
mov qword [rbx], 7
mov rax, r14
mov word [rsi], r15w
mov qword [rsi + 0x10], r15
mov rbx, qword [rsp + 0x580]
add rsp, 0x550
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret
mov rcx, qword [0x14006a058]
test rcx, rcx
je 0x14002253a
mov rdx, qword [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_AssignProcessToJobObject]
xorps xmm0, xmm0
movups xmmword [rsp + 0x78], xmm0
movdqa xmm1, xmmword [0x1400580d0]
movdqu xmmword [rbp - 0x78], xmm1
mov byte [rsp + 0x78], 0
nop dword [rax]
nop dword [rax + rax]
mov edx, 1
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ebx, eax
mov dword [rbp + 0x498], r15d
mov dword [rbp + 0x490], r15d
mov qword [rsp + 0x28], r15
lea rax, [rbp + 0x490]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_PeekNamedPipe]
test eax, eax
je 0x140022662
nop dword [rax]
mov eax, dword [rbp + 0x490]
test eax, eax
je 0x140022662
cmp eax, 0x3ff
mov r8d, 0x3ff
ja 0x1400225ce
mov r8d, eax
mov qword [rsp + 0x20], r15
lea r9, [rbp + 0x498]
lea rdx, [rbp + 0x50]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x140022662
mov eax, dword [rbp + 0x498]
test eax, eax
je 0x140022662
mov byte [rbp + rax + 0x50], 0
lea rax, [rbp + 0x50]
mov r8, 0xffffffffffffffff
nop word [rax + rax]
inc r8
cmp byte [rax + r8], 0
jne 0x140022610
lea rdx, [rbp + 0x50]
lea rcx, [rsp + 0x78]
call fcn.140006d60
mov dword [rbp + 0x498], r15d
mov dword [rbp + 0x490], r15d
mov qword [rsp + 0x28], r15
lea rax, [rbp + 0x490]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_PeekNamedPipe]
test eax, eax
jne 0x1400225b0
test ebx, ebx
jne 0x140022560
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [r14], 1
lea rcx, [r14 + 8]
lea rdx, [rsp + 0x78]
call fcn.140006670
nop
mov rdx, qword [rbp - 0x70]
cmp rdx, 0xf
jbe 0x1400226e1
inc rdx
mov rcx, qword [rsp + 0x78]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400226dc
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14002273b
call fcn.140024d64
movdqa xmm0, xmmword [0x1400580d0]
movdqu xmmword [rbp - 0x78], xmm0
mov byte [rsp + 0x78], 0
mov rdx, qword [rsi + 0x18]
cmp rdx, 7
jbe 0x14002272e
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsi]
cmp rdx, 0x1000
jb 0x140022729
add rdx, 0x27
mov r8, qword [rcx - 8]
sub rcx, r8
lea rax, [rcx - 8]
cmp rax, 0x1f
ja 0x140022741
mov rcx, r8
call fcn.140024d64
mov qword [rsi + 0x18], 7
jmp 0x140022501
call fcn.1400360b4
nop
call fcn.1400360b4
int3