Function at 0x18001bfc0
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 [0x180084088]
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 0x18001c038
test byte [rdi + 0x58], 0x40
je 0x18001c038
mov rcx, qword [rdi + 8]
mov rdx, rdi
add rcx, 0x58
call fcn.1800195b0
mov eax, dword [rdi + 0x58]
test al, 0x40
je 0x18001c038
and eax, 0xffffffbf
mov dword [rdi + 0x58], eax
test al, 0x20
je 0x18001c038
mov rax, qword [rdi + 8]
dec dword [rax + 8]
mov ecx, dword [rsi + 0x40]
movaps xmmword [rsp + 0x300], xmm6
test ecx, ecx
jns 0x18001c100
test dword [rbx + 0x58], 0x100
je 0x18001c2fc
movups xmm6, xmmword [0x180077158]
call qword [0x1800931d0]
mov esi, eax
cmp eax, 0x3e3
je 0x18001c2fc
mov rcx, qword [rbx + 0x128]
movdqa xmmword [rsp + 0x40], xmm6
cmp eax, 0x6d
jne 0x18001c0c4
test rcx, rcx
je 0x18001c09e
lea rdx, [0x18001c8f0]
call fcn.180014120
xor edi, edi
mov qword [rbx + 0x128], rdi
and dword [rbx + 0x58], 0xffff7fff
mov rcx, rbx
call fcn.1800144e0
lea r8, [rsp + 0x40]
mov rdx, 0xfffffffffffff001
mov rcx, rbx
call qword [rbx + reloc.WS2_32.dll_WSASetLastError]
jmp 0x18001c2fc
test rcx, rcx
je 0x18001c0de
lea rdx, [0x18001c8f0]
call fcn.180014120
xor edi, edi
mov qword [rbx + 0x128], rdi
mov rcx, rbx
call fcn.1800144e0
mov ecx, esi
call fcn.180019d80
movsxd rdx, eax
lea r8, [rsp + 0x40]
mov rcx, rbx
call qword [rbx + reloc.WS2_32.dll_WSASetLastError]
jmp 0x18001c2fc
test dword [rbx + 0x58], 0x100
je 0x18001c2e2
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 0x18001c2b6
mov ecx, dword [rsp + 0x30]
test ecx, ecx
je 0x18001c2e2
cmp dword [rbx + 0x110], edi
je 0x18001c201
cmp qword [rbx + 0x1e8], rdi
jne 0x18001c1f2
mov rcx, qword [rbx + 0x118]
lea r9, [rsp + 0x34]
mov r8d, reloc.WS2_32.dll_recv
mov qword [rsp + 0x20], rdi
lea rdx, [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x18001c2b6
mov eax, dword [rsp + 0x60]
test al, 2
je 0x18001c1d7
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 0x18001c2b6
mov r8d, dword [rsp + 0x60]
lea rdx, [rsp + 0x70]
and r8d, 4
mov rcx, rbx
call fcn.18001bea0
mov eax, dword [rsp + 0x60]
test al, 1
je 0x18001c1ec
mov rax, qword [rsp + 0x68]
mov qword [rbx + 0x1e8], rax
jmp 0x18001c286
mov ecx, dword [rsp + 0x30]
jmp 0x18001c201
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 0x18001c2a2
mov eax, dword [rsp + 0x50]
test eax, eax
je 0x18001c2a2
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 0x18001c295
mov ecx, dword [rsp + 0x34]
cmp dword [rbx + 0x110], edi
je 0x18001c26e
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 0x18001c2e2
test dword [rbx + 0x58], 0x100
jne 0x18001c110
jmp 0x18001c2e2
movaps xmm0, xmmword [rsp + 0x50]
movdqa xmmword [rsp + 0x40], xmm0
jmp 0x18001c2c2
lea r8, [rsp + 0x50]
mov rdx, 0xfffffffffffff024
mov rcx, rbx
call qword [rbx + reloc.WS2_32.dll_WSASetLastError]
jmp 0x18001c2e2
movups xmm0, xmmword [0x180077158]
movaps xmmword [rsp + 0x40], xmm0
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e3
je 0x18001c2e2
lea r9, [rsp + 0x40]
mov r8d, eax
mov rdx, rbx
mov rcx, r14
call fcn.18001be00
mov eax, dword [rbx + 0x58]
and eax, 0x20100
cmp eax, 0x100
jne 0x18001c2fc
mov rdx, rbx
mov rcx, r14
call fcn.18001bb90
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 0x18001c33d
test ecx, ecx
jne 0x18001c33d
test al, 8
jne 0x18001c33d
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.18002b180
add rsp, 0x320
pop r14
pop rbx
pop rbp
ret