Function at 0x140011370
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 [0x1400af210]
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 0x1400113e8
test byte [rdi + 0x58], 0x40
je 0x1400113e8
mov rcx, qword [rdi + 8]
mov rdx, rdi
add rcx, 0x58
call fcn.14000def0
mov eax, dword [rdi + 0x58]
test al, 0x40
je 0x1400113e8
and eax, 0xffffffbf
mov dword [rdi + 0x58], eax
test al, 0x20
je 0x1400113e8
mov rax, qword [rdi + 8]
dec dword [rax + 8]
mov ecx, dword [rsi + 0x40]
movaps xmmword [rsp + 0x300], xmm6
test ecx, ecx
jns 0x1400114b0
test dword [rbx + 0x58], 0x100
je 0x1400116ac
movups xmm6, xmmword [0x1400a0d60]
call qword [0x1400b94a8]
mov esi, eax
cmp eax, 0x3e3
je 0x1400116ac
mov rcx, qword [rbx + 0x128]
movdqa xmmword [rsp + 0x40], xmm6
cmp eax, 0x6d
jne 0x140011474
test rcx, rcx
je 0x14001144e
lea rdx, [0x140011ca0]
call fcn.140008d60
xor edi, edi
mov qword [rbx + 0x128], rdi
and dword [rbx + 0x58], 0xffff7fff
mov rcx, rbx
call fcn.140009130
lea r8, [rsp + 0x40]
mov rdx, 0xfffffffffffff001
mov rcx, rbx
call qword [rbx + reloc.WS2_32.dll_WSASetLastError]
jmp 0x1400116ac
test rcx, rcx
je 0x14001148e
lea rdx, [0x140011ca0]
call fcn.140008d60
xor edi, edi
mov qword [rbx + 0x128], rdi
mov rcx, rbx
call fcn.140009130
mov ecx, esi
call fcn.14000f480
movsxd rdx, eax
lea r8, [rsp + 0x40]
mov rcx, rbx
call qword [rbx + reloc.WS2_32.dll_WSASetLastError]
jmp 0x1400116ac
test dword [rbx + 0x58], 0x100
je 0x140011692
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 0x140011666
mov ecx, dword [rsp + 0x30]
test ecx, ecx
je 0x140011692
cmp dword [rbx + 0x110], edi
je 0x1400115b1
cmp qword [rbx + 0x1e8], rdi
jne 0x1400115a2
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 0x140011666
mov eax, dword [rsp + 0x60]
test al, 2
je 0x140011587
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 0x140011666
mov r8d, dword [rsp + 0x60]
lea rdx, [rsp + 0x70]
and r8d, 4
mov rcx, rbx
call fcn.140011250
mov eax, dword [rsp + 0x60]
test al, 1
je 0x14001159c
mov rax, qword [rsp + 0x68]
mov qword [rbx + 0x1e8], rax
jmp 0x140011636
mov ecx, dword [rsp + 0x30]
jmp 0x1400115b1
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 0x140011652
mov eax, dword [rsp + 0x50]
test eax, eax
je 0x140011652
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 0x140011645
mov ecx, dword [rsp + 0x34]
cmp dword [rbx + 0x110], edi
je 0x14001161e
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 0x140011692
test dword [rbx + 0x58], 0x100
jne 0x1400114c0
jmp 0x140011692
movaps xmm0, xmmword [rsp + 0x50]
movdqa xmmword [rsp + 0x40], xmm0
jmp 0x140011672
lea r8, [rsp + 0x50]
mov rdx, 0xfffffffffffff024
mov rcx, rbx
call qword [rbx + reloc.WS2_32.dll_WSASetLastError]
jmp 0x140011692
movups xmm0, xmmword [0x1400a0d60]
movaps xmmword [rsp + 0x40], xmm0
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e3
je 0x140011692
lea r9, [rsp + 0x40]
mov r8d, eax
mov rdx, rbx
mov rcx, r14
call fcn.1400111b0
mov eax, dword [rbx + 0x58]
and eax, 0x20100
cmp eax, 0x100
jne 0x1400116ac
mov rdx, rbx
mov rcx, r14
call fcn.140010f40
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 0x1400116ed
test ecx, ecx
jne 0x1400116ed
test al, 8
jne 0x1400116ed
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.140052350
add rsp, 0x320
pop r14
pop rbx
pop rbp
ret