Function at 0x140005860
Capabilities:
Read file on windows

Disassembly:
push rbp
push rsi
push rdi
push rbx
sub rsp, 0x168
lea rbp, [rsp + 0x80]
mov qword [rbp + 0xe0], 0xfffffffffffffffe
mov rax, r9
mov rdi, rdx
mov rsi, rcx
mov dword [rbp + 0x78], 0
mov rdx, qword [rdx + 0x10]
mov rcx, qword [rdi + 0x20]
mov qword [rsp + 0x20], rdx
lea r9, [rbp + 0x78]
mov rdx, r8
mov r8d, eax
call sub.kernel32.dll_ReadFile
mov ebx, eax
test eax, eax
je 0x1400058e3
mov eax, dword [rbp + 0x78]
test eax, eax
je 0x1400058e3
mov dword [rbp + 0x18], 2
mov qword [rbp + 0x40], rdi
lea rcx, [0x140024e98]
mov qword [rbp + 0x48], rcx
mov qword [rbp + 0x50], 0
mov dword [rbp + 0x68], eax
mov byte [rbp + 0x6c], 0
xor eax, eax
jmp 0x1400059d8
call sub.kernel32.dll_GetLastError
test ebx, ebx
jne 0x140005959
cmp eax, 0x3e5
jne 0x140005959
mov dword [rbp + 0x18], 2
mov qword [rbp + 0x40], rdi
lea rax, [0x140024e98]
mov qword [rbp + 0x48], rax
mov qword [rbp + 0x50], 0
mov dword [rbp + 0x68], 0
xor edx, edx
cmp dword [rdi], 1
sbb edx, edx
mov byte [rbp + 0x6c], 1
or edx, dword [rdi + 4]
mov rcx, qword [rdi + 0x18]
call sub.kernel32.dll_WaitForSingleObject
cmp eax, 0xffffffff
je 0x140005990
test eax, eax
je 0x140005966
cmp eax, 0x102
jne 0x140005c40
lea rdx, str.timed_out_while_reading_from_pipe
mov r8d, 0x21
mov cl, 0x16
call fcn.1400060e0
jmp 0x1400059d8
shl rax, 0x20
or rax, 2
jmp 0x140005bfd
mov dword [rbp + 0x78], 0
mov byte [rbp + 0x6c], 0
cmp dword [rbp + 0x18], 2
jne 0x140005997
mov rcx, qword [rbp + 0x40]
test rcx, rcx
je 0x140005c5a
mov rax, qword [rbp + 0x48]
call qword [rax + 0x18]
mov rcx, rdx
jmp 0x14000599f
call sub.kernel32.dll_GetLastError
jmp 0x1400059d0
lea rax, [rbp + 0x28]
mov rcx, qword [rbp + 0x38]
mov rdx, qword [rax]
lea r8, [rbp + 0x78]
mov r9d, 1
call sub.kernel32.dll_GetOverlappedResult
test eax, eax
je 0x1400059c4
mov eax, dword [rbp + 0x78]
test eax, eax
je 0x1400059cb
mov dword [rbp + 0x68], eax
jmp 0x1400058dc
call sub.kernel32.dll_GetLastError
jmp 0x1400059d0
call sub.kernel32.dll_GetLastError
shl rax, 0x20
or rax, 2
mov qword [rbp + 0xd0], rax
mov rax, qword [rbp + 0x38]
mov qword [rbp + 0x10], rax
mov eax, dword [rbp + 0x18]
mov rcx, qword [rbp + 0x1c]
mov edx, dword [rbp + 0x24]
movups xmm0, xmmword [rbp + 0x28]
movaps xmmword [rbp], xmm0
mov dword [rbp - 0x10], eax
mov qword [rbp - 0xc], rcx
mov dword [rbp - 4], edx
mov dword [rbp + 0x18], 2
mov edi, dword [rbp + 0x68]
mov rdx, qword [rbp + 0x50]
mov qword [rbp + 0x50], 0
test rdx, rdx
je 0x140005a6c
mov r8, qword [rbp + 0x58]
cmp dword [rbp - 0x10], 2
je 0x140005c18
mov rax, qword [rbp + 0x60]
movaps xmm0, xmmword [rbp - 0x10]
movaps xmm1, xmmword [rbp]
movups xmmword [rbp + 0x80], xmm0
movups xmmword [rbp + 0x90], xmm1
mov rcx, qword [rbp + 0x10]
mov qword [rbp + 0xa0], rcx
mov qword [rbp + 0xa8], rdx
mov qword [rbp + 0xb0], r8
mov qword [rbp + 0xb8], rax
mov qword [rbp + 0x78], rdi
jmp 0x140005aaf
mov edi, edi
mov qword [rbp + 0x78], rdi
mov dword [rbp + 0x80], 2
cmp dword [rbp - 0x10], 2
je 0x140005aaf
mov rcx, qword [rbp + 0x10]
call fcn.140021188
mov rcx, qword [rbp]
mov edx, 0x20
mov r8d, 8
call fcn.140003870
mov rcx, qword [rbp + 8]
mov byte [rbp + 0xdf], 1
call fcn.140021188
mov rcx, qword [rbp + 0xd0]
test rcx, rcx
je 0x140005ae3
mov eax, ecx
and eax, 3
cmp rax, 2
jb 0x140005b74
cmp eax, 2
jne 0x140005b74
mov rax, rcx
shr rax, 0x20
cmp eax, 0x6d
jne 0x140005b74
mov ebx, dword [rbp + 0x80]
movups xmm0, xmmword [rbp + 0x84]
movaps xmmword [rbp - 0x50], xmm0
movups xmm0, xmmword [rbp + 0x94]
movaps xmmword [rbp - 0x40], xmm0
movups xmm0, xmmword [rbp + 0xa4]
movaps xmmword [rbp - 0x30], xmm0
movups xmm0, xmmword [rbp + 0xb0]
movups xmmword [rbp - 0x24], xmm0
lea rcx, [rbp + 0x18]
call fcn.140005180
mov rax, rdi
cmp ebx, 3
je 0x140005bfd
mov qword [rbp + 0x78], rdi
mov dword [rbp + 0x80], ebx
movaps xmm0, xmmword [rbp - 0x50]
movaps xmm1, xmmword [rbp - 0x40]
movaps xmm2, xmmword [rbp - 0x30]
movups xmmword [rbp + 0x84], xmm0
movups xmmword [rbp + 0x94], xmm1
movups xmmword [rbp + 0xa4], xmm2
movups xmm0, xmmword [rbp - 0x24]
movups xmmword [rbp + 0xb0], xmm0
lea rcx, [rbp + 0x78]
call fcn.140004e90
mov qword [rsi + 8], rdi
xor eax, eax
jmp 0x140005c06
cmp dword [rbp + 0x80], 3
jne 0x140005bdd
mov eax, edi
and eax, 3
cmp eax, 1
jne 0x140005bed
lea rax, [rdi - 1]
mov qword [rbp + 0xc0], rax
mov rcx, qword [rdi - 1]
mov rax, qword [rdi + 7]
mov qword [rbp + 0x70], rcx
mov qword [rbp + 0xc8], rax
call qword [rax]
mov rax, qword [rbp + 0xc8]
mov rdx, qword [rax + 8]
test rdx, rdx
je 0x140005bc4
mov r8, qword [rax + 0x10]
mov rcx, qword [rbp + 0x70]
call fcn.140003870
mov edx, 0x18
mov r8d, 8
mov rcx, qword [rbp + 0xc0]
call fcn.140003870
jmp 0x140005bed
mov byte [rbp + 0xdf], 0
lea rcx, [rbp + 0x78]
call fcn.140004e90
lea rcx, [rbp + 0x18]
call fcn.140005180
mov rax, qword [rbp + 0xd0]
mov qword [rsi + 8], rax
mov eax, 1
mov qword [rsi], rax
mov rax, rsi
add rsp, 0x168
pop rbx
pop rdi
pop rsi
pop rbp
ret
mov qword [rbp + 0xc8], r8
mov qword [rbp + 0xc0], rdx
lea rcx, [0x140024d10]
lea r8, [0x140024e40]
mov edx, 0x28
call fcn.140022f70
jmp 0x140005c72
lea rcx, [0x140024d10]
lea r8, [0x140024f18]
mov edx, 0x28
call fcn.140022f70
jmp 0x140005c72
lea rcx, [0x140024d10]
lea r8, [0x140024d98]
mov edx, 0x28
call fcn.140022f70
ud2