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

Disassembly:
push rbx
push rsi
push r13
sub rsp, 0x90
mov rax, qword [0x14041da10]
xor rax, rsp
mov qword [rsp + 0x70], rax
xor eax, eax
mov r13, rcx
mov rcx, qword [rcx + 0x28]
mov rsi, rdx
xor ebx, ebx
lea r9, [rsp + 0x30]
lea r8d, [rax + 8]
lea rdx, [rsp + 0x60]
mov qword [rsp + 0x60], rax
mov byte [rsp + 0x68], al
mov dword [rsp + 0x30], ebx
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1400d6ca0
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea r8, [0x14034d2d0]
lea rdx, str._s___error__d
lea ecx, [rbx + 2]
mov r9d, eax
call fcn.140172980
mov dword [rsi + 0x34], 5
xor al, al
jmp 0x1400d6ee9
mov r8d, dword [rsp + 0x30]
cmp r8d, 8
je 0x1400d6ccf
mov r9d, 8
lea rdx, str.not_enough_read___d_bytes__expected__d_bytes_
lea ecx, [r9 - 6]
call fcn.140172980
mov dword [rsi + 0x34], 5
xor al, al
jmp 0x1400d6ee9
lea rdx, [rsp + 0x38]
lea rcx, [rsp + 0x60]
mov r8d, 0xa
mov qword [rsp + 0xc0], rbp
call fcn.1402bf798
mov ebp, eax
test eax, eax
jne 0x1400d6d32
lea rcx, [rsi + 0x58]
lea rdx, [rsp + 0x40]
mov qword [rsp + 0x58], 0xf
mov qword [rsp + 0x50], rbx
mov byte [rsp + 0x40], bl
call fcn.1400b7e70
cmp qword [rsp + 0x58], 0x10
jb 0x1400d6d24
mov rcx, qword [rsp + 0x40]
call fcn.14021ae20
mov dword [rsi + 0x34], 1
xor al, al
jmp 0x1400d6ee1
mov rcx, qword [r13 + 0x28]
lea rax, [rsp + 0x34]
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x34], ebx
call qword [sym.imp.KERNEL32.dll_PeekNamedPipe]
test eax, eax
jne 0x1400d6d8a
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea r8, [0x14034d2d0]
lea rdx, str._s___error__d
mov r9d, eax
mov ecx, 2
call fcn.140172980
mov dword [rsi + 0x34], 5
xor al, al
jmp 0x1400d6ee1
cmp dword [rsp + 0x34], ebp
jae 0x1400d6db7
mov r8d, dword [rsp + 0x30]
lea rdx, str.not_enough_bytes_available___d_bytes__expected__d_bytes_
mov r9d, ebp
mov ecx, 2
call fcn.140172980
mov dword [rsi + 0x34], 5
xor al, al
jmp 0x1400d6ee1
mov qword [rsp + 0xc8], rdi
mov qword [rsp + 0x88], r14
lea r14d, [rbp + 1]
mov ecx, r14d
mov qword [rsp + 0x80], r15
mov r15d, r14d
call fcn.1402bd120
mov rdi, rax
test rax, rax
jne 0x1400d6e06
lea rdx, str.out_of_memory__needed__u_bytes_
lea ecx, [rax + 2]
mov r8d, r14d
call fcn.140172980
mov dword [rsi + 0x34], 3
xor al, al
jmp 0x1400d6ec9
mov r8, r15
xor edx, edx
mov rcx, rax
call fcn.1402c5760
mov rcx, qword [r13 + 0x28]
lea r9, [rsp + 0x30]
mov r8d, ebp
mov rdx, rdi
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1400d6e65
mov rcx, rdi
call fcn.1402bd0e0
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea r8, [0x14034d2d0]
lea rdx, str._s___error__d
mov r9d, eax
mov ecx, 2
call fcn.140172980
mov dword [rsi + 0x34], 5
xor al, al
jmp 0x1400d6ec9
cmp dword [rsp + 0x30], ebp
jae 0x1400d6e97
mov rcx, rdi
call fcn.1402bd0e0
mov r8d, dword [rsp + 0x30]
lea rdx, str.not_enough_read___d_bytes__expected__d_bytes_
mov r9d, ebp
mov ecx, 2
call fcn.140172980
mov dword [rsi + 0x34], 5
xor al, al
jmp 0x1400d6ec9
cmp byte [rdi], bl
je 0x1400d6ea9
or rbx, 0xffffffffffffffff
nop
inc rbx
cmp byte [rdi + rbx], 0
jne 0x1400d6ea0
lea rcx, [rsi + 0x58]
mov r8, rbx
mov rdx, rdi
call fcn.1400ba880
mov rcx, rdi
mov dword [rsi + 0x34], 1
call fcn.1402bd0e0
mov al, 1
mov r14, qword [rsp + 0x88]
mov rdi, qword [rsp + 0xc8]
mov r15, qword [rsp + 0x80]
mov rbp, qword [rsp + 0xc0]
mov rcx, qword [rsp + 0x70]
xor rcx, rsp
call fcn.1402bcad0
add rsp, 0x90
pop r13
pop rsi
pop rbx
ret