Function at 0x140017e10
Capabilities:
Create pipe
Create process on windows
Read file on windows

Disassembly:
push rbp
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0x10]
sub rsp, 0x110
movsxd r12, r8d
mov r14, rdx
mov rdi, rcx
mov dword [rbp - 0x80], reloc.LIBPQ.dll_Ordinal_24
xor r15d, r15d
mov dword [rbp - 0x70], 1
lea r8, [rbp - 0x80]
mov qword [rbp - 0x78], r15
lea rdx, [rsp + 0x58]
xor r9d, r9d
lea rcx, [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_CreatePipe]
test eax, eax
jne 0x140017e70
xor eax, eax
add rsp, 0x110
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret
mov qword [rsp + 0x140], rbx
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rdx, qword [rsp + 0x50]
lea r9, [rsp + 0x60]
mov dword [rsp + 0x30], 2
mov rcx, rax
mov dword [rsp + 0x28], r15d
mov r8, rbx
mov dword [rsp + 0x20], r15d
call qword [sym.imp.KERNEL32.dll_DuplicateHandle]
mov rcx, qword [rsp + 0x50]
test eax, eax
jne 0x140017ed0
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x1400180a0
mov qword [rsp + 0x148], rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
lea rcx, [rbp - 0x60]
xor edx, edx
mov qword [rsp + 0x68], rax
mov qword [rsp + 0x70], rax
mov qword [rsp + 0x78], rax
lea r8d, [rax + 0x68]
call sub.VCRUNTIME140.dll_memset
mov rax, qword [rsp + 0x58]
mov rsi, 0xffffffffffffffff
mov qword [rbp], rax
xor r9d, r9d
mov qword [rbp - 8], rax
xor r8d, r8d
lea rax, [rsp + 0x68]
mov dword [rbp - 0x60], reloc.LIBPQ.dll_Ordinal_104
mov qword [rsp + 0x48], rax
mov rdx, rdi
lea rax, [rbp - 0x60]
mov dword [rbp - 0x24], 0x100
mov qword [rsp + 0x40], rax
xor ecx, ecx
mov qword [rsp + 0x38], r15
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x28], r15d
mov dword [rsp + 0x20], 1
mov qword [rbp - 0x10], rsi
call qword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x14001807f
mov r8, r12
xor edx, edx
mov rcx, r14
call sub.VCRUNTIME140.dll_memset
lea rbx, [r12 - 1]
mov rdi, r14
add rbx, r14
cmp r14, rbx
jae 0x140018069
nop dword [rax + rax]
mov rcx, qword [rsp + 0x60]
mov edx, 0x2710
mov dword [rbp + 0x58], r15d
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x140017ff9
mov rcx, qword [rsp + 0x60]
lea r9, [rbp + 0x58]
mov r8d, r14d
mov qword [rsp + 0x20], r15
sub r8d, edi
mov rdx, rdi
add r8d, r12d
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x140017ff9
mov rax, rsi
nop
inc rax
cmp byte [rdi + rax], r15b
jne 0x140017fd0
add rdi, rax
cmp dword [rbp + 0x58], r15d
je 0x140017ff9
mov edx, 0xa
mov rcx, r14
call sub.VCRUNTIME140.dll_strchr
test rax, rax
jne 0x140017ff9
cmp rdi, rbx
jb 0x140017f90
cmp rdi, r14
je 0x140018069
mov edx, 0xa
mov rcx, r14
call sub.VCRUNTIME140.dll_strchr
test rax, rax
je 0x140018014
mov byte [rax + 1], r15b
inc rsi
cmp byte [r14 + rsi], r15b
jne 0x140018014
cmp esi, 2
jl 0x14001803f
movsxd rax, esi
cmp byte [rax + r14 - 2], 0xd
jne 0x14001803f
cmp byte [rax + r14 - 1], 0xa
jne 0x14001803f
mov word [rax + r14 - 2], 0xa
dec esi
test esi, esi
je 0x14001804e
movsxd rax, esi
cmp byte [rax + r14 - 1], 0xa
je 0x140018066
lea rcx, [r14 - 1]
cmp byte [rcx + 1], r15b
lea rcx, [rcx + 1]
jne 0x140018052
movzx eax, word [reloc.LIBPQ.dll_Ordinal_10]
mov word [rcx], ax
mov r15, r14
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rsi, qword [rsp + 0x148]
mov rax, r15
mov rbx, qword [rsp + 0x140]
add rsp, 0x110
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret