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

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rsi
push rbp
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0xf0]
sub rsp, 0x1f0
mov rax, qword [0x14019a0c0]
xor rax, rsp
mov qword [rbp + 0xe0], rax
mov rbx, rdx
mov r14, rcx
mov qword [rsp + 0x60], rcx
xor r12d, r12d
xorps xmm0, xmm0
movups xmmword [rbp + 0x38], xmm0
mov edi, r12d
mov qword [rbp + 0x48], r12
mov r15d, reloc.WS2_32.dll_ntohs
mov qword [rbp + 0x50], r15
mov byte [rbp + 0x38], dil
mov qword [rsp + 0x58], r12
mov qword [rsp + 0x60], r12
mov dword [rbp - 0x80], Ordinal_27
mov qword [rbp - 0x78], r12
mov dword [rbp - 0x70], 1
xor r9d, r9d
lea r8, [rbp - 0x80]
lea rdx, [rsp + 0x60]
lea rcx, [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_CreatePipe]
xorps xmm0, xmm0
test eax, eax
jne 0x140039e86
movups xmmword [r14], xmm0
mov qword [r14 + 0x10], r12
mov qword [r14 + 0x18], r12
mov ecx, reloc.WLDAP32.dll_Ordinal_32
call fcn.140111e40
mov qword [r14], rax
mov qword [r14 + 0x10], reloc.WLDAP32.dll_Ordinal_22
mov qword [r14 + 0x18], Ordinal_35
movups xmm0, xmmword [str.Failed_to_create_pipe.]
movups xmmword [rax], xmm0
mov ecx, dword [0x140181858]
mov dword [rax + 0x10], ecx
movzx ecx, word [0x14018185c]
mov word [rax + 0x14], cx
mov byte [rax + 0x16], r12b
jmp 0x14003a033
mov dword [rbp - 0x60], 0x68
movups xmmword [rbp - 0x58], xmm0
movups xmmword [rbp - 0x48], xmm0
movups xmmword [rbp - 0x38], xmm0
movups xmmword [rbp - 0x28], xmm0
movups xmmword [rbp - 0x18], xmm0
movups xmmword [rbp - 8], xmm0
mov dword [rbp - 0x24], 0x101
mov word [rbp - 0x20], r12w
mov rax, qword [rsp + 0x60]
mov qword [rbp - 8], rax
mov qword [rbp], rax
xor eax, eax
movups xmmword [rsp + 0x68], xmm0
mov qword [rsp + 0x78], rax
mov r8, rbx
cmp qword [rbx + 0x18], 0xf
jbe 0x140039ed7
mov r8, qword [rbx]
mov dword [rsp + 0x28], r12d
mov qword [rsp + 0x20], r12
mov r9d, dword [rbx + 0x10]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
movsxd rsi, eax
xorps xmm0, xmm0
movups xmmword [rbp + 0x18], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp + 0x28], xmm1
mov r8, rsi
lea rcx, [rbp + 0x18]
call fcn.14003f150
lea rcx, [rbp + 0x18]
cmp qword [rbp + 0x30], 7
cmova rcx, qword [rbp + 0x18]
mov r9d, dword [rbx + 0x10]
cmp qword [rbx + 0x18], 0xf
jbe 0x140039f29
mov rbx, qword [rbx]
mov dword [rsp + 0x28], esi
mov qword [rsp + 0x20], rcx
mov r8, rbx
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
nop
lea rdx, [rbp + 0x18]
cmp qword [rbp + 0x30], 7
cmova rdx, qword [rbp + 0x18]
lea rax, [rsp + 0x68]
mov qword [rsp + 0x48], rax
lea rax, [rbp - 0x60]
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x38], r12
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], r12d
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 0x14003a061
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xorps xmm0, xmm0
movups xmmword [r14], xmm0
mov qword [r14 + 0x10], r12
mov qword [r14 + 0x18], r12
mov ecx, reloc.WLDAP32.dll_Ordinal_32
call fcn.140111e40
mov qword [r14], rax
mov qword [r14 + 0x10], reloc.WLDAP32.dll_Ordinal_22
mov qword [r14 + 0x18], Ordinal_35
movups xmm0, xmmword [str.CreateProcessW_failed.]
movups xmmword [rax], xmm0
mov ecx, dword [0x140181870]
mov dword [rax + 0x10], ecx
movzx ecx, word [0x140181874]
mov word [rax + 0x14], cx
mov byte [rax + 0x16], 0
mov rdx, qword [rbp + 0x30]
cmp rdx, 7
jbe 0x14003a033
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp + 0x18]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14003a02d
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14003a1a2
call fcn.140112194
nop
mov rax, r14
mov rcx, qword [rbp + 0xe0]
xor rcx, rsp
call fcn.140111a60
lea r11, [rsp + 0x1f0]
mov rbx, qword [r11 + 0x40]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsp + 0x20], r12
lea r9, [rbp + 0x10]
mov r8d, 0x80
lea rdx, [rbp + 0x60]
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x14003a12d
movzx ebx, byte [rsp + 0x50]
nop word [rax + rax]
mov eax, dword [rbp + 0x10]
test eax, eax
je 0x14003a12d
mov esi, eax
mov rax, r15
sub rax, rdi
cmp rsi, rax
ja 0x14003a0e5
lea rax, [rsi + rdi]
mov qword [rbp + 0x48], rax
lea rax, [rbp + 0x38]
cmp r15, 0xf
cmova rax, qword [rbp + 0x38]
add rdi, rax
mov r8d, esi
lea rdx, [rbp + 0x60]
mov rcx, rdi
call sub.VCRUNTIME140.dll_memmove
mov byte [rsi + rdi], 0
jmp 0x14003a0fe
mov qword [rsp + 0x20], rsi
lea r9, [rbp + 0x60]
movzx r8d, bl
mov rdx, rsi
lea rcx, [rbp + 0x38]
call fcn.14003f3b0
mov qword [rsp + 0x20], r12
lea r9, [rbp + 0x10]
mov r8d, 0x80
lea rdx, [rbp + 0x60]
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x14003a12d
mov r15, qword [rbp + 0x50]
mov rdi, qword [rbp + 0x48]
jmp 0x14003a0a0
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
movups xmm0, xmmword [rbp + 0x38]
movups xmmword [r14], xmm0
movups xmm1, xmmword [rbp + 0x48]
movups xmmword [r14 + 0x10], xmm1
mov rdx, qword [rbp + 0x30]
cmp rdx, 7
jbe 0x14003a033
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp + 0x18]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14003a02d
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14003a02d
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3