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

Disassembly:
push rdi
sub rsp, 0x70
mov rdi, qword [0x140058050]
test rdi, rdi
je 0x140004b2f
mov qword [rsp + 0x68], rbx
mov ecx, 0x80000
mov qword [rsp + 0x60], rbp
mov qword [rsp + 0x58], rsi
mov qword [rsp + 0x50], r14
mov qword [rsp + 0x48], r15
call fcn.140028a64
mov r14, rax
xor r15d, r15d
nop
mov rsi, qword [rdi + 0x1c]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x28], r15
xor edx, edx
mov rcx, rsi
cmp word [rdi + 0x44], 1
jne 0x1400049b2
lea rax, [rsp + 0x30]
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_PeekNamedPipe]
test eax, eax
jne 0x1400048fb
lea ebx, [rax - 1]
jmp 0x140004ab4
mov ebx, r15d
cmp dword [rsp + 0x30], r15d
je 0x140004ab4
lea r9, [rsp + 0x80]
mov dword [rsp + 0x80], r15d
mov r8d, 4
mov qword [rsp + 0x20], r15
lea rdx, [rsp + 0x90]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x140004983
nop dword [rax]
mov eax, dword [rsp + 0x80]
test eax, eax
je 0x140004983
add ebx, eax
cmp ebx, 4
jge 0x14000498d
mov r8d, 4
movsxd rax, ebx
lea rdx, [rsp + 0x90]
mov qword [rsp + 0x20], r15
sub r8d, ebx
lea r9, [rsp + 0x80]
add rdx, rax
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x140004940
mov ebx, 0xffffffff
jmp 0x140004a54
jne 0x140004983
mov r8d, dword [rsp + 0x90]
cmp r8d, 0x80000
jg 0x140004983
mov rdx, r14
mov rcx, rsi
call fcn.140007f00
mov ebx, eax
jmp 0x140004a54
lea rax, [rsp + 0x98]
mov dword [rsp + 0x88], r15d
mov qword [rsp + 0x20], rax
mov rbp, r14
mov ebx, r15d
call qword [sym.imp.KERNEL32.dll_PeekNamedPipe]
test eax, eax
je 0x140004a4f
nop word [rax + rax]
cmp dword [rsp + 0x98], r15d
je 0x140004a91
cmp ebx, 0x80000
jge 0x140004a91
mov r8d, 0x80000
mov qword [rsp + 0x20], r15
sub r8d, ebx
lea r9, [rsp + 0x88]
mov rdx, rbp
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [rsp + 0x88]
xor r9d, r9d
add ebx, eax
mov qword [rsp + 0x28], r15
add rbp, rax
xor r8d, r8d
lea rax, [rsp + 0x98]
xor edx, edx
mov rcx, rsi
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_PeekNamedPipe]
test eax, eax
jne 0x1400049e0
mov ebx, 0xffffffff
test ebx, ebx
jle 0x140004ab4
cmp dword [0x14005c344], 1
mov r8d, dword [rdi + 0x40]
jne 0x140004aa6
mov rax, qword [0x14005c350]
cmp word [rax + 0x1c0], 2
jne 0x140004aa6
movsxd rcx, dword [rax + 0x1c8]
test ecx, ecx
je 0x140004aa6
movsxd rdx, ebx
cmp rdx, rcx
ja 0x140004a9a
mov r9d, 1
jmp 0x140004aac
mov ebx, dword [rsp + 0x88]
jmp 0x140004a54
mov rdx, r14
mov ecx, ebx
call fcn.140009a20
jmp 0x140004ab4
movsxd rdx, ebx
xor r9d, r9d
mov rcx, r14
call fcn.140009930
mov eax, dword [rdi + 0x34]
cmp eax, 1
jne 0x140004ac3
cmp ebx, 0xffffffff
je 0x140004ada
jmp 0x140004ae1
test eax, eax
jne 0x140004ae1
mov rcx, qword [rdi + 4]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
je 0x140004ae1
mov dword [rdi + 0x38], 1
cmp word [rdi + 0x44], 1
jne 0x140004aec
test ebx, ebx
jg 0x140004af0
mov rdi, qword [rdi + 0x2c]
test rdi, rdi
jne 0x1400048c0
xor edx, edx
mov r8d, 0x80000
mov rcx, r14
call fcn.140022720
mov rcx, r14
call fcn.140028a50
call fcn.1400046d0
mov r15, qword [rsp + 0x48]
mov r14, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x58]
mov rbp, qword [rsp + 0x60]
mov rbx, qword [rsp + 0x68]
add rsp, 0x70
pop rdi
ret