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

Disassembly:
push rbx
push rbp
push rdi
push r15
sub rsp, 0x68
mov rax, qword [0x140054040]
xor rax, rsp
mov qword [rsp + 0x40], rax
mov rdi, qword [rcx + 0x10]
mov rbp, r8
mov r15, rdx
mov rbx, rcx
cmp r8, rdi
je 0x140002bb3
test r8, r8
jne 0x140002bb3
lea rcx, str.recvBuffer_is_NULL
call fcn.1400019f0
xor eax, eax
jmp 0x140002e00
test rdi, rdi
je 0x140002e17
mov ecx, dword [rcx + 0x18]
xor eax, eax
mov qword [rsp + 0x60], rsi
mov qword [rsp + 0x58], r12
xor r12d, r12d
rep stosb byte [rdi], al
mov dword [rsp + 0x34], r12d
mov edi, r12d
mov qword [rsp + 0x50], r14
nop dword [rax]
mov rcx, qword [rbx]
lea r9, [rsp + 0x30]
mov edx, edi
mov r8d, 1
add rdx, qword [rbx + 0x10]
mov dword [rsp + 0x30], r12d
mov qword [rsp + 0x20], r12
call qword [sym.imp.KERNEL32.DLL_ReadFile]
mov rcx, qword [rbx]
add edi, dword [rsp + 0x30]
call qword [sym.imp.KERNEL32.DLL_FlushFileBuffers]
cmp edi, 4
jb 0x140002be0
mov rcx, qword [rbx + 0x10]
lea r8, [rsp + 0x34]
lea rdx, str._04X
call fcn.1400011f0
mov eax, dword [rsp + 0x34]
lea rcx, str.Receiving__d_bytes_from_pipe_...
mov dword [rbx + 0x20], eax
mov edx, edi
add eax, 0xfffffffc
mov dword [rsp + 0x34], eax
call fcn.140001700
mov ecx, dword [rbx + 0x18]
xor eax, eax
mov rdi, qword [rbx + 0x10]
mov esi, r12d
rep stosb byte [rdi], al
mov ecx, dword [rsp + 0x34]
nop dword [rax]
sub ecx, esi
mov dword [rsp + 0x30], r12d
cmp ecx, dword [rbx + 0x18]
mov dword [rsp + 0x38], r12d
cmovae ecx, dword [rbx + 0x18]
mov r14d, esi
cmp dword [rbx + 0x24], r12d
jne 0x140002ceb
mov eax, 0xfa0
mov edi, r12d
nop dword [rax]
nop dword [rax + rax]
mov rcx, qword [rbx]
lea r9, [rsp + 0x30]
mov edx, edi
mov r8d, eax
add rdx, qword [rbx + 0x10]
add rdx, r14
mov qword [rsp + 0x20], r12
call qword [sym.imp.KERNEL32.DLL_ReadFile]
test eax, eax
je 0x140002d29
mov rcx, qword [rbx]
lea rax, [rsp + 0x38]
mov qword [rsp + 0x28], r12
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], rax
xor edx, edx
call qword [sym.imp.KERNEL32.DLL_PeekNamedPipe]
mov ecx, dword [rsp + 0x38]
mov edx, eax
mov eax, 0xfa0
cmp ecx, eax
cmovb eax, ecx
add edi, eax
test ecx, ecx
jne 0x140002c90
jmp 0x140002d0a
mov rdx, qword [rbx + 0x10]
lea r9, [rsp + 0x30]
mov r8d, ecx
mov qword [rsp + 0x20], r12
mov rcx, qword [rbx]
add rdx, r14
call qword [sym.imp.KERNEL32.DLL_ReadFile]
mov edx, eax
test edx, edx
je 0x140002d35
mov rcx, qword [rbx]
add esi, dword [rsp + 0x30]
call qword [sym.imp.KERNEL32.DLL_FlushFileBuffers]
mov ecx, dword [rsp + 0x34]
cmp esi, ecx
jb 0x140002c60
jmp 0x140002d41
lea rcx, str.Failed_to_read_data_from_pipe
call fcn.1400019f0
lea rcx, str.Failed_to_read_data_from_pipe
call fcn.1400019f0
mov rcx, qword [rbx + 0x10]
lea rdx, str.DISCONNECT
mov r8d, 0xa
call fcn.140027640
mov r14, qword [rsp + 0x50]
mov r12, qword [rsp + 0x58]
test eax, eax
jne 0x140002d79
lea rcx, str.Received_disconnect_request
call fcn.1400017e0
mov rcx, rbx
call fcn.1400024b0
mov rdx, qword [rbx + 0x10]
cmp rbp, rdx
je 0x140002dc1
mov r8d, dword [rbx + 0x20]
mov rax, 0xffffffffffffffff
nop dword [rax]
inc rax
cmp byte [rax + rbp], 0
jne 0x140002d90
cmp rax, r8
jae 0x140002db9
mov ecx, 0x57
call qword [sym.imp.KERNEL32.DLL_SetLastError]
lea rcx, str.recvBuffer_is_too_small
call fcn.1400019f0
xor eax, eax
jmp 0x140002dfb
mov rcx, rbp
call fcn.140027380
lea edx, [rsi + 2]
lea rcx, str.Received__d_bytes_from_pipe
call fcn.140001700
mov dword [r15], esi
test rbp, rbp
je 0x140002df6
cmp rbp, qword [rbx + 0x10]
je 0x140002df6
xor eax, eax
mov ecx, esi
mov rdi, rbp
rep stosb byte [rdi], al
mov r8d, dword [r15]
mov rcx, rbp
mov rdx, qword [rbx + 0x10]
call fcn.140027380
mov eax, 1
mov rsi, qword [rsp + 0x60]
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.14001a070
add rsp, 0x68
pop r15
pop rdi
pop rbp
pop rbx
ret
lea rcx, str.Buffer_is_not_allocated
call fcn.140001af0
int3