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

Disassembly:
push rbp
push rsi
push rdi
lea rbp, [rsp - 0x1090]
mov eax, 0x1190
call fcn.140016c50
sub rsp, rax
mov qword [rsp + 0x78], 0xfffffffffffffffe
mov qword [rsp + 0x11c0], rbx
mov rax, qword [0x140023008]
xor rax, rsp
mov qword [rbp + 0x1080], rax
mov rbx, rdx
mov rdi, rcx
xor esi, esi
mov dword [rsp + 0x50], esi
cmp qword [rdx + 0x10], rsi
jne 0x1400049b0
mov qword [rcx + 0x10], rsi
mov qword [rcx + 0x18], send
mov byte [rcx], sil
xor r8d, r8d
lea rdx, [0x140020030]
call fcn.1400023c0
jmp 0x140004e02
mov dword [rbp - 0x38], 0x18
mov dword [rbp - 0x28], 1
mov qword [rbp - 0x30], rsi
xor r9d, r9d
lea r8, [rbp - 0x38]
lea rdx, [rbp - 0x58]
lea rcx, [rbp - 0x60]
call qword [sym.imp.KERNEL32.dll_CreatePipe]
test eax, eax
jne 0x140004a80
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.Error_creating_pip:__d
lea rcx, [rbp + 0x80]
call fcn.140005490
mov qword [rbp + 0x70], rsi
mov qword [rbp + 0x78], send
mov byte [rbp + 0x60], sil
lea rax, [rbp + 0x80]
or rbx, 0xffffffffffffffff
mov r8, rbx
nop dword [rax]
inc r8
cmp byte [rax + r8], sil
jne 0x140004a20
lea rdx, [rbp + 0x80]
lea rcx, [rbp + 0x60]
call fcn.1400023c0
lea rcx, [rbp + 0x60]
call fcn.140003160
mov qword [rdi + 0x10], rsi
mov qword [rdi + 0x18], send
mov byte [rdi], sil
lea rax, [rbp + 0x80]
nop dword [rax + rax]
inc rbx
cmp byte [rax + rbx], sil
jne 0x140004a60
mov r8, rbx
lea rdx, [rbp + 0x80]
mov rcx, rdi
call fcn.1400023c0
jmp 0x140004e02
xor r8d, r8d
lea edx, [r8 + 1]
mov rcx, qword [rbp - 0x60]
call qword [sym.imp.KERNEL32.dll_SetHandleInformation]
test eax, eax
jne 0x140004b30
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.SetHandleInformation_failed:__d
lea rcx, [rbp + 0x80]
call fcn.140005490
mov qword [rbp + 0x70], rsi
mov qword [rbp + 0x78], send
mov byte [rbp + 0x60], sil
lea rax, [rbp + 0x80]
or rbx, 0xffffffffffffffff
mov r8, rbx
inc r8
cmp byte [rax + r8], sil
jne 0x140004ad3
lea rdx, [rbp + 0x80]
lea rcx, [rbp + 0x60]
call fcn.1400023c0
lea rcx, [rbp + 0x60]
call fcn.140003160
mov qword [rdi + 0x10], rsi
mov qword [rdi + 0x18], send
mov byte [rdi], sil
lea rax, [rbp + 0x80]
nop dword [rax + rax]
inc rbx
cmp byte [rax + rbx], sil
jne 0x140004b10
mov r8, rbx
lea rdx, [rbp + 0x80]
mov rcx, rdi
call fcn.1400023c0
jmp 0x140004e02
xor eax, eax
mov qword [rbp - 0x50], rax
mov qword [rbp - 0x48], rax
mov qword [rbp - 0x40], rax
xor edx, edx
lea r8d, [rax + 0x68]
lea rcx, [rbp - 0x20]
call fcn.1400089e0
mov dword [rbp - 0x20], 0x68
mov rax, qword [rbp - 0x58]
mov qword [rbp + 0x40], rax
mov qword [rbp + 0x38], rax
or dword [rbp + 0x1c], 0x100
cmp qword [rbx + 0x18], 8
jb 0x140004b71
mov rbx, qword [rbx]
lea rax, [rbp - 0x50]
mov qword [rsp + 0x48], rax
lea rax, [rbp - 0x20]
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x38], rsi
mov qword [rsp + 0x30], rsi
mov dword [rsp + 0x28], esi
mov dword [rsp + 0x20], 1
xor r9d, r9d
xor r8d, r8d
mov rdx, rbx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateProcessW]
mov rcx, qword [rbp - 0x58]
test eax, eax
jne 0x140004c60
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbp - 0x60]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.CreateProcess_failed:__d
lea rcx, [rbp + 0x80]
call fcn.140005490
mov qword [rbp + 0x70], rsi
mov qword [rbp + 0x78], send
mov byte [rbp + 0x60], sil
lea rax, [rbp + 0x80]
or rbx, 0xffffffffffffffff
mov r8, rbx
inc r8
cmp byte [rax + r8], sil
jne 0x140004c00
lea rdx, [rbp + 0x80]
lea rcx, [rbp + 0x60]
call fcn.1400023c0
lea rcx, [rbp + 0x60]
call fcn.140003160
mov qword [rdi + 0x10], rsi
mov qword [rdi + 0x18], send
mov byte [rdi], sil
lea rax, [rbp + 0x80]
nop dword [rax + rax]
inc rbx
cmp byte [rax + rbx], sil
jne 0x140004c40
mov r8, rbx
lea rdx, [rbp + 0x80]
mov rcx, rdi
call fcn.1400023c0
jmp 0x140004e02
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
mov dword [rbp + 0x58], eax
mov qword [rbp + 0x70], rsi
mov qword [rbp + 0x78], send
mov byte [rbp + 0x60], al
mov ecx, esi
mov dword [rbp + 0x50], ecx
mov ebx, esi
test eax, eax
je 0x140004c89
test ecx, ecx
jne 0x140004c94
mov ecx, 0x32
call qword [sym.imp.KERNEL32.dll_Sleep]
mov qword [rsp + 0x28], rsi
lea rax, [rbp + 0x50]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, qword [rbp - 0x60]
call qword [sym.imp.KERNEL32.dll_PeekNamedPipe]
test eax, eax
je 0x140004d09
cmp dword [rbp + 0x50], 0
jbe 0x140004d09
mov qword [rsp + 0x20], rsi
lea r9, [rbp + 0x58]
mov r8d, 0x1000
lea rdx, [rbp + 0x80]
mov rcx, qword [rbp - 0x60]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x140004d1e
mov eax, dword [rbp + 0x58]
test eax, eax
je 0x140004d1e
mov ebx, esi
mov r8d, eax
lea rdx, [rbp + 0x80]
lea rcx, [rbp + 0x60]
call fcn.140002210
mov eax, dword [rbp + 0x58]
mov ecx, dword [rbp + 0x50]
jmp 0x140004c81
mov ecx, esi
mov dword [rbp + 0x50], ecx
mov eax, esi
mov dword [rbp + 0x58], eax
inc ebx
cmp ebx, 0x3c
jl 0x140004c81
mov rcx, qword [rbp - 0x60]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, 0x7530
mov rcx, qword [rbp - 0x50]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x140004dc1
mov rcx, qword [rbp - 0x48]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbp - 0x50]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, 1
mov rcx, qword [rbp - 0x50]
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
mov qword [rsp + 0x68], rsi
mov qword [rsp + 0x70], socket
mov byte [rsp + 0x58], 0
mov r8d, 9
lea rdx, str.Time_out_
lea rcx, [rsp + 0x58]
call fcn.1400023c0
nop
lea rdx, [rsp + 0x58]
lea rcx, [rbp - 0x80]
call fcn.1400033d0
nop
mov rdx, rax
mov rcx, rdi
call fcn.1400035f0
nop
lea rcx, [rbp - 0x80]
call fcn.140002140
nop
lea rcx, [rsp + 0x58]
call fcn.140002320
jmp 0x140004df9
mov rcx, qword [rbp - 0x50]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbp - 0x48]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rdx, [rbp + 0x60]
lea rcx, [rbp - 0x80]
call fcn.1400033d0
nop
mov rdx, rax
mov rcx, rdi
call fcn.1400035f0
nop
lea rcx, [rbp - 0x80]
call fcn.140002140
nop
lea rcx, [rbp + 0x60]
call fcn.140002320
mov rax, rdi
mov rcx, qword [rbp + 0x1080]
xor rcx, rsp
call fcn.140005790
mov rbx, qword [rsp + 0x11c0]
add rsp, 0x1190
pop rdi
pop rsi
pop rbp
ret