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

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r14
sub rsp, 0x30
xor ebp, ebp
mov r14, r9
mov rdi, r8
mov rsi, rdx
mov rbx, rcx
mov dword [rsp + 0x60], ebp
cmp qword [rcx + 0x20], rbp
jne 0x140008546
cmp byte [rcx + 0x10], bpl
je 0x140008546
mov rcx, qword [rcx + 8]
lea rax, [rsp + 0x70]
mov qword [rsp + 0x28], rbp
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], rax
xor edx, edx
call qword [sym.imp.KERNEL32.dll_PeekNamedPipe]
test eax, eax
jne 0x140008526
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x140008500
mov eax, ebp
mov qword [r14], rbp
add rsp, 0x30
pop r14
pop rdi
pop rsi
pop rbp
pop rbx
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, 0x1117e
mov qword [r14], rbp
add eax, 0xafc80
cmp eax, 0xafced
cmove eax, edx
add rsp, 0x30
pop r14
pop rdi
pop rsi
pop rbp
pop rbx
ret
mov eax, dword [rsp + 0x70]
test eax, eax
jne 0x140008541
mov qword [r14], rbp
mov eax, ntohl
add rsp, 0x30
pop r14
pop rdi
pop rsi
pop rbp
pop rbx
ret
cmp edi, eax
cmova edi, eax
mov rcx, qword [rbx + 0x18]
test rcx, rcx
je 0x140008570
cmp byte [rbx + 0x10], bpl
jne 0x140008570
mov eax, dword [rbx + 0x80]
mov dword [rcx + 0x10], eax
mov rcx, qword [rbx + 0x80]
mov rax, qword [rbx + 0x18]
sar rcx, 0x20
mov dword [rax + 0x14], ecx
mov rax, qword [rbx + 0x18]
lea r9, [rsp + 0x60]
mov rcx, qword [rbx + 8]
mov r8d, edi
mov rdx, rsi
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x140008599
mov edx, ebp
jmp 0x140008696
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x1400085aa
mov edx, ebp
jmp 0x140008696
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea edx, [rax + 0xafc80]
cmp edx, 0xb0065
jne 0x14000867b
mov qword [rsp + 0x68], r15
or esi, 0xffffffff
movabs r15, 0x20c49ba5e353f7cf
mov rcx, qword [rbx + 0x20]
test rcx, rcx
jle 0x1400085f3
mov rax, r15
imul rcx
sar rdx, 7
mov rax, rdx
shr rax, 0x3f
add rdx, rax
jmp 0x1400085fc
cmp rcx, 0xffffffffffffffff
mov edx, ebp
cmove edx, esi
mov rcx, qword [rbx + 0x18]
mov rcx, qword [rcx + 0x18]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov edi, eax
cmp eax, 0x80
je 0x1400085d4
mov r15, qword [rsp + 0x68]
test eax, eax
je 0x140008626
mov rcx, qword [rbx + 8]
call qword [sym.imp.KERNEL32.dll_CancelIo]
mov rdx, qword [rbx + 0x18]
lea r8, [rsp + 0x60]
mov rcx, qword [rbx + 8]
mov r9d, 1
call qword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
je 0x140008647
mov edx, ebp
jmp 0x140008696
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x140008655
mov edx, ebp
jmp 0x140008696
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea edx, [rax + 0xafc80]
lea eax, [rdx - 0xb0063]
cmp eax, 1
ja 0x14000867b
cmp edi, 0x102
jne 0x14000867b
mov edx, 0x11177
jmp 0x1400086b3
cmp edx, 0xafced
jne 0x14000868a
mov edx, 0x1117e
jmp 0x1400086b3
cmp edx, 0xafca6
je 0x140008683
test edx, edx
jne 0x1400086b3
cmp dword [rsp + 0x60], ebp
je 0x140008683
cmp qword [rbx + 0x18], rbp
je 0x1400086b3
cmp byte [rbx + 0x10], bpl
jne 0x1400086b3
mov ecx, dword [rsp + 0x60]
add qword [rbx + 0x80], rcx
mov ecx, dword [rsp + 0x60]
mov eax, edx
mov qword [r14], rcx
add rsp, 0x30
pop r14
pop rdi
pop rsi
pop rbp
pop rbx
ret