Function at 0x14001fe70
Capabilities:
Read file on windows
Read pipe

Disassembly:
mov r11, rsp
push rbp
push rbx
push r14
lea rbp, [r11 - 0x238]
sub rsp, 0x320
mov rax, qword [0x1400dc160]
xor rax, rsp
mov qword [rbp + 0x1f0], rax
and dword [rdx + 0x58], 0xfffdffff
mov rbx, rdx
mov qword [r11 - 0x20], rsi
mov r14, rcx
mov qword [r11 - 0x28], rdi
mov rsi, r8
mov rdi, qword [rdx + 0x128]
test rdi, rdi
je 0x14001fee8
test byte [rdi + 0x58], 0x40
je 0x14001fee8
mov rcx, qword [rdi + 8]
mov rdx, rdi
add rcx, 0x58
call fcn.14001c610
mov eax, dword [rdi + 0x58]
test al, 0x40
je 0x14001fee8
and eax, 0xffffffbf
mov dword [rdi + 0x58], eax
test al, 0x20
je 0x14001fee8
mov rax, qword [rdi + 8]
dec dword [rax + 8]
mov ecx, dword [rsi + 0x40]
movaps xmmword [rsp + 0x300], xmm6
test ecx, ecx
jns 0x14001ffb0
test dword [rbx + 0x58], 0x100
je 0x1400201ac
movups xmm6, xmmword [0x1400c8ee0]
call qword [0x1400e4d50]
mov esi, eax
cmp eax, 0x3e3
je 0x1400201ac
mov rcx, qword [rbx + 0x128]
movdqa xmmword [rsp + 0x40], xmm6
cmp eax, 0x6d
jne 0x14001ff74
test rcx, rcx
je 0x14001ff4e
lea rdx, [0x1400207a0]
call fcn.140017210
xor edi, edi
mov qword [rbx + 0x128], rdi
and dword [rbx + 0x58], 0xffff7fff
mov rcx, rbx
call fcn.1400175e0
lea r8, [rsp + 0x40]
mov rdx, 0xfffffffffffff001
mov rcx, rbx
call qword [rbx + reloc.WS2_32.dll_WSASetLastError]
jmp 0x1400201ac
test rcx, rcx
je 0x14001ff8e
lea rdx, [0x1400207a0]
call fcn.140017210
xor edi, edi
mov qword [rbx + 0x128], rdi
mov rcx, rbx
call fcn.1400175e0
mov ecx, esi
call fcn.14001dc20
movsxd rdx, eax
lea r8, [rsp + 0x40]
mov rcx, rbx
call qword [rbx + reloc.WS2_32.dll_WSASetLastError]
jmp 0x1400201ac
test dword [rbx + 0x58], 0x100
je 0x140020192
xor edi, edi
nop
mov rcx, qword [rbx + 0x118]
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rdi
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], rax
xor edx, edx
call qword [sym.imp.KERNEL32.dll_PeekNamedPipe]
test eax, eax
je 0x140020166
mov ecx, dword [rsp + 0x30]
test ecx, ecx
je 0x140020192
cmp dword [rbx + 0x110], edi
je 0x1400200b1
cmp qword [rbx + 0x1e8], rdi
jne 0x1400200a2
mov rcx, qword [rbx + 0x118]
lea r9, [rsp + 0x34]
mov r8d, select
mov qword [rsp + 0x20], rdi
lea rdx, [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x140020166
mov eax, dword [rsp + 0x60]
test al, 2
je 0x140020087
mov rcx, qword [rbx + 0x118]
lea r9, [rsp + 0x34]
mov r8d, 0x278
mov qword [rsp + 0x20], rdi
lea rdx, [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x140020166
mov r8d, dword [rsp + 0x60]
lea rdx, [rsp + 0x70]
and r8d, 4
mov rcx, rbx
call fcn.14001fd50
mov eax, dword [rsp + 0x60]
test al, 1
je 0x14002009c
mov rax, qword [rsp + 0x68]
mov qword [rbx + 0x1e8], rax
jmp 0x140020136
mov ecx, dword [rsp + 0x30]
jmp 0x1400200b1
mov eax, dword [rbx + 0x1e8]
cmp ecx, eax
cmovae ecx, eax
mov dword [rsp + 0x30], ecx
mov edx, ecx
lea r8, [rsp + 0x50]
mov qword [rsp + 0x48], rdi
mov rcx, rbx
mov dword [rsp + 0x40], edi
movaps xmm0, xmmword [rsp + 0x40]
movdqa xmmword [rsp + 0x50], xmm0
call qword [rbx + 0x68]
mov rdx, qword [rsp + 0x58]
test rdx, rdx
je 0x140020152
mov eax, dword [rsp + 0x50]
test eax, eax
je 0x140020152
mov r8d, dword [rsp + 0x30]
lea r9, [rsp + 0x34]
mov rcx, qword [rbx + 0x118]
cmp eax, r8d
mov qword [rsp + 0x20], rdi
cmovb r8d, eax
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x140020145
mov ecx, dword [rsp + 0x34]
cmp dword [rbx + 0x110], edi
je 0x14002011e
sub qword [rbx + 0x1e8], rcx
mov rdx, rcx
lea r8, [rsp + 0x50]
mov rcx, rbx
call qword [rbx + reloc.WS2_32.dll_WSASetLastError]
mov eax, dword [rsp + 0x50]
cmp dword [rsp + 0x34], eax
jbe 0x140020192
test dword [rbx + 0x58], 0x100
jne 0x14001ffc0
jmp 0x140020192
movaps xmm0, xmmword [rsp + 0x50]
movdqa xmmword [rsp + 0x40], xmm0
jmp 0x140020172
lea r8, [rsp + 0x50]
mov rdx, 0xfffffffffffff024
mov rcx, rbx
call qword [rbx + reloc.WS2_32.dll_WSASetLastError]
jmp 0x140020192
movups xmm0, xmmword [0x1400c8ee0]
movaps xmmword [rsp + 0x40], xmm0
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e3
je 0x140020192
lea r9, [rsp + 0x40]
mov r8d, eax
mov rdx, rbx
mov rcx, r14
call fcn.14001fcb0
mov eax, dword [rbx + 0x58]
and eax, 0x20100
cmp eax, 0x100
jne 0x1400201ac
mov rdx, rbx
mov rcx, r14
call fcn.14001fa40
mov ecx, dword [rbx + 0x78]
mov eax, dword [rbx + 0x58]
dec ecx
movaps xmm6, xmmword [rsp + 0x300]
mov rdi, qword [rsp + 0x310]
mov rsi, qword [rsp + 0x318]
mov dword [rbx + 0x78], ecx
test al, 1
je 0x1400201ed
test ecx, ecx
jne 0x1400201ed
test al, 8
jne 0x1400201ed
or eax, 8
mov dword [rbx + 0x58], eax
mov rax, qword [r14 + 0x50]
mov qword [rbx + 0x50], rax
mov qword [r14 + 0x50], rbx
mov rcx, qword [rbp + 0x1f0]
xor rcx, rsp
call fcn.14005c600
add rsp, 0x320
pop r14
pop rbx
pop rbp
ret