Function at 0x140018060
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 0x14001809c
mov rdx, qword [rdx]
lea rdi, [rsi + 0x18]
jmp 0x14001809f
mov rdi, rbx
lea rcx, str.____Run_async_command:__s_n
call fcn.140001b80
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 0x140018192
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 0x140018136
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 0x140018243
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 0x1400181a4
mov rdx, qword [rsi]
mov r8d, eax
lea rcx, str.____Failed_to_run_async_command:__s__error_0x_X_n
call fcn.140001b80
xorps xmm0, xmm0
movups xmmword [rbp + 0x30], xmm0
movdqa xmm1, xmmword [0x140049f10]
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 0x14001821a
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsi]
cmp rdx, 0x1000
jb 0x140018215
add rdx, 0x27
mov r8, qword [rcx - 8]
sub rcx, r8
lea rax, [rcx - 8]
cmp rax, 0x1f
ja 0x140018461
mov rcx, r8
lea rbx, [rsi + 0x18]
call fcn.140019450
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 [0x1400577f0]
test rcx, rcx
je 0x14001825a
mov rdx, qword [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_AssignProcessToJobObject]
xorps xmm0, xmm0
movups xmmword [rsp + 0x78], xmm0
movdqa xmm1, xmmword [0x140049f10]
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 0x140018382
nop dword [rax]
mov eax, dword [rbp + 0x490]
test eax, eax
je 0x140018382
cmp eax, 0x3ff
mov r8d, 0x3ff
ja 0x1400182ee
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 0x140018382
mov eax, dword [rbp + 0x498]
test eax, eax
je 0x140018382
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 0x140018330
lea rdx, [rbp + 0x50]
lea rcx, [rsp + 0x78]
call fcn.140003f40
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 0x1400182d0
test ebx, ebx
jne 0x140018280
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.140003910
nop
mov rdx, qword [rbp - 0x70]
cmp rdx, 0xf
jbe 0x140018401
inc rdx
mov rcx, qword [rsp + 0x78]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400183fc
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14001845b
call fcn.140019450
movdqa xmm0, xmmword [0x140049f10]
movdqu xmmword [rbp - 0x78], xmm0
mov byte [rsp + 0x78], 0
mov rdx, qword [rsi + 0x18]
cmp rdx, 7
jbe 0x14001844e
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsi]
cmp rdx, 0x1000
jb 0x140018449
add rdx, 0x27
mov r8, qword [rcx - 8]
sub rcx, r8
lea rax, [rcx - 8]
cmp rax, 0x1f
ja 0x140018461
mov rcx, r8
call fcn.140019450
mov qword [rsi + 0x18], 7
jmp 0x140018221
call fcn.14002a6d4
nop
call fcn.14002a6d4
int3