Function at 0x140004570
Capabilities:
Connect pipe
Create pipe
Read file on windows

Disassembly:
mov rax, rsp
push rbp
push r14
push r15
lea rbp, [rax - 0x7e8]
sub rsp, 0x8d0
mov qword [rsp + 0x58], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
mov qword [rax + 0x20], r12
mov rax, qword [0x140020008]
xor rax, rsp
mov qword [rbp + 0x7c0], rax
mov ecx, 0x28
call fcn.14000af44
mov qword [rbp - 0x78], rax
mov edx, 1
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 1]
mov rcx, qword [rbp - 0x78]
call qword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
mov dword [rbp - 0x80], 0x18
mov dword [rbp - 0x70], 1
lea rax, [rbp - 0x80]
mov qword [rsp + 0x38], rax
xor edi, edi
mov dword [rsp + 0x30], edi
mov dword [rsp + 0x28], 0x400
mov dword [rsp + 0x20], 0x400
lea edx, [rdi + 3]
mov r9d, 0xff
lea r8d, [rdi + 6]
lea rcx, str..pipexfrun
call qword [sym.imp.KERNEL32.dll_CreateNamedPipeW]
mov rsi, rax
cmp rax, 0xffffffffffffffff
je 0x140004655
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_ConnectNamedPipe]
test eax, eax
jne 0x14000465c
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x217
je 0x14000465c
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x140004882
cmp dword [0x140021db8], edi
jne 0x14000464c
call fcn.140001930
mov rdx, rax
mov ecx, edi
test rax, rax
setne cl
test ecx, ecx
jne 0x140004683
mov ecx, 0x80004005
call fcn.1400013f0
int3
mov rax, qword [rax]
mov rcx, rdx
call qword [rax + 0x18]
add rax, 0x18
mov qword [rbp - 0x68], rax
lea rdx, [0x14001c20e]
test rdx, 0xffffffffffff0000
jne 0x1400046c4
movzx ebx, dx
mov ecx, ebx
call fcn.1400014c0
test rax, rax
je 0x1400046ce
mov r8d, ebx
mov rdx, rax
lea rcx, [rbp - 0x68]
call fcn.140005be0
jmp 0x1400046ce
lea rcx, [rbp - 0x68]
call fcn.140005620
nop
or r15d, 0xffffffff
movabs r12, 0x7fffffffffffffff
nop dword [rax]
mov qword [rsp + 0x20], rdi
lea r9, [rbp - 0x60]
mov r8d, 0x800
lea rdx, [rbp - 0x40]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov r14d, eax
test eax, eax
jne 0x140004714
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xea
jne 0x1400047f2
xorps xmm0, xmm0
movdqu xmmword [rbp - 0x58], xmm0
mov qword [rbp - 0x48], rdi
mov word [rsp + 0x40], di
mov eax, dword [rbp - 0x60]
lea edx, [rax + rax]
lea r8, [rsp + 0x40]
lea rcx, [rbp - 0x58]
call fcn.140004fb0
mov r8d, dword [rbp - 0x60]
lea rdx, [rbp - 0x40]
mov rcx, qword [rbp - 0x58]
call fcn.1400073b0
mov r8, qword [rbp - 0x58]
lea rdx, [rbp - 0x68]
lea rcx, [rsp + 0x50]
call fcn.1400052b0
nop
mov rdx, rax
lea rcx, [rbp - 0x68]
call fcn.140005830
nop
mov rdx, qword [rsp + 0x50]
add rdx, 0xffffffffffffffe8
mov eax, r15d
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x140004789
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
mov rcx, qword [rbp - 0x58]
mov qword [rsp + 0x68], rcx
xorps xmm0, xmm0
movdqu xmmword [rbp - 0x58], xmm0
mov rax, qword [rbp - 0x48]
mov qword [rsp + 0x78], rax
mov qword [rbp - 0x48], rdi
test rcx, rcx
je 0x1400047e8
sub rax, rcx
sar rax, 1
cmp rax, r12
ja 0x140004819
add rax, rax
cmp rax, 0x1000
jb 0x1400047e2
test cl, 0x1f
jne 0x140004813
mov rax, qword [rcx - 8]
cmp rax, rcx
jae 0x14000480d
sub rcx, rax
cmp rcx, 8
jb 0x140004807
cmp rcx, 0x27
ja 0x140004801
mov rcx, rax
call fcn.1400061e4
nop
test r14d, r14d
jne 0x14000481f
jmp 0x1400046e0
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rbx, qword [rbp - 0x68]
jmp 0x140004866
call fcn.14000abfc
int3
call fcn.14000abfc
int3
call fcn.14000abfc
int3
call fcn.14000abfc
int3
call fcn.14000abfc
nop
mov rbx, qword [rbp - 0x68]
lea rcx, [rbx - 0x18]
call fcn.140005990
add rax, 0x18
mov qword [rsp + 0x48], rax
lea rdx, [rsp + 0x48]
mov rcx, rsi
call fcn.1400039d0
mov rcx, rsi
test eax, eax
je 0x14000485b
call qword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_DisconnectNamedPipe]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, 1
lea rdx, [rbx - 0x18]
lock xadd dword [rdx + 0x10], r15d
sub r15d, 1
jg 0x140004880
mov rcx, qword [rdx]
mov r8, qword [rcx]
call qword [r8 + 8]
mov eax, edi
mov rcx, qword [rbp + 0x7c0]
xor rcx, rsp
call fcn.140006200
lea r11, [rsp + 0x8d0]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x30]
mov r12, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret