Function at 0x210080f80
Capabilities:
Read file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x88
mov eax, dword [rcx + 0x2c]
mov rbx, qword [rsp + 0xf0]
and eax, 3
mov r12, rcx
mov rdi, rdx
mov rbp, r8
mov rsi, r9
cmp eax, 1
je 0x210081339
movzx eax, byte [rcx + 8]
and eax, 3
cmp al, 2
je 0x2100810b8
test byte [rcx + 9], 0x10
jne 0x2100810b8
mov qword [rsp + 0x68], r9
test rbx, rbx
je 0x2100812b0
mov r14, qword [rbx + 0x28]
lea r13, [rbx + 0x18]
mov rcx, qword [r12 + 0x1d0]
test rcx, rcx
je 0x2100811e1
test rbx, rbx
setne al
cmp byte [r12 + 0x1d8], al
jne 0x2100811d0
lea rax, [rsp + 0x68]
mov dword [rsp + 0x30], ebp
xor r8d, r8d
xor r9d, r9d
mov qword [rsp + 0x40], 0
mov rdx, r14
xor r15d, r15d
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x28], rdi
mov qword [rsp + 0x20], r13
mov qword [rsp + 0x50], rax
call sym.NtReadFile
mov r8d, eax
cmp eax, 0xc0000011
je 0x21008114b
test eax, eax
jns 0x2100812c0
mov eax, dword [r12 + 0x80]
cmp eax, 0xffffffff
je 0x210081208
test al, 0x10
je 0x210081208
test byte [0x210273880], 1
jne 0x2100812e0
mov rax, qword [sym.msys_2.0.dll__impure_ptr]
mov dword [rax], 0x15
call sym.msys_2.0.dll___errno
mov dword [rax], 0x15
mov r15, 0xffffffffffffffff
mov rax, r15
add rsp, 0x88
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov rax, qword [r12]
mov r8d, 1
xor edx, edx
mov rcx, r12
call qword [rax + 0x178]
mov r13, rax
test rax, rax
js 0x210081198
mov rax, qword [r12]
xor r8d, r8d
mov rdx, rsi
mov rcx, r12
call qword [rax + 0x178]
test rax, rax
js 0x210081198
mov rax, qword [r12]
lea r8, [rsp + 0x70]
mov rdx, rdi
mov rcx, r12
mov qword [rsp + 0x70], rbp
call qword [rax + 0x148]
mov rax, qword [r12]
xor r8d, r8d
mov rdx, r13
mov rcx, r12
call qword [rax + 0x178]
test rax, rax
js 0x210081198
mov r15, qword [rsp + 0x70]
test rbx, rbx
je 0x21008114b
mov qword [rbx + 0x30], r15
cmp r15, 0xffffffffffffffff
je 0x2100811a5
mov dword [rbx + 0x38], 0
mov rcx, qword [rbx + 0x28]
call sym.SetEvent
test byte [0x210273880], 1
je 0x21008109c
mov qword [rsp + 0x40], rbx
lea r9, str._d__pread__p___ld___D___p__n
lea r8, str.virtual_ssize_t_fhandler_disk_file::pread_void__size_t__off_t__void_
mov edx, 0x40
mov qword [rsp + 0x38], rsi
lea rcx, [0x210273880]
mov qword [rsp + 0x30], rbp
mov qword [rsp + 0x28], rdi
mov qword [rsp + 0x20], r15
call method.strace.prntf_unsigned_int__char_const__char_const__..._
jmp 0x21008109c
test rbx, rbx
je 0x2100811b8
mov qword [rbx + 0x30], 0xffffffffffffffff
call sym.msys_2.0.dll___errno
mov rcx, qword [rbx + 0x28]
mov eax, dword [rax]
mov dword [rbx + 0x38], eax
call sym.SetEvent
mov r15, 0xffffffffffffffff
test byte [0x210273880], 1
je 0x21008109c
jmp 0x210081158
call sym.NtClose
mov qword [r12 + 0x1d0], 0
xor edx, edx
mov r8, rbx
mov rcx, r12
call method.fhandler_disk_file.prw_open_bool__void_
test eax, eax
jne 0x2100810b8
mov rcx, qword [r12 + 0x1d0]
jmp 0x21008100a
cmp r8d, 0xc0000005
jne 0x210081290
mov rcx, qword [r12 + 0x1d0]
mov dword [rsp + 0x5c], r8d
xor r15d, r15d
call sym.is_at_eof_void_
test eax, eax
jne 0x21008114b
mov rdx, rbp
mov rcx, rdi
call sym.mmap_is_attached_or_noreserve_void__unsigned_long_
mov r8d, dword [rsp + 0x5c]
cmp eax, 1
je 0x210081320
cmp eax, 2
jne 0x210081290
mov rax, qword [rsp + 0x50]
mov dword [rsp + 0x30], ebp
xor r8d, r8d
xor r9d, r9d
mov qword [rsp + 0x28], rdi
mov rcx, qword [r12 + 0x1d0]
mov rdx, r14
mov qword [rsp + 0x40], 0
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x20], r13
call sym.NtReadFile
mov r8d, eax
test eax, eax
jns 0x2100812c0
nop word [rax + rax]
mov edx, 0x65e
lea rcx, str._usr_src_MSYS2_packages_msys2_runtime_src_msys2_runtime_winsup_cygwin_fhandler_disk_file.cc
call sym.seterrno_from_nt_status_char_const__int__int_
jmp 0x210081095
xor r14d, r14d
lea r13, [rsp + 0x70]
jmp 0x210080fe5
test rbx, rbx
je 0x2100812d0
mov r15, qword [rbx + 0x20]
jmp 0x21008114b
mov r15, qword [rsp + 0x78]
jmp 0x21008114b
lea rax, str.virtual_ssize_t_fhandler_disk_file::pread_void__size_t__off_t__void_
mov dword [rsp + 0x30], 0x15
lea r9, [0x21028c231]
mov edx, 0x40
mov dword [rsp + 0x28], 0x642
lea r8, [0x21028c248]
lea rcx, [0x210273880]
mov qword [rsp + 0x20], rax
call method.strace.prntf_unsigned_int__char_const__char_const__..._
jmp 0x21008107d
mov ecx, 0xa
mov dword [rsp + 0x50], r8d
call sym.raise_1
mov r8d, dword [rsp + 0x50]
jmp 0x210081290
test byte [0x210273880], 1
jne 0x210081366
mov rax, qword [sym.msys_2.0.dll__impure_ptr]
mov r15, 0xffffffffffffffff
mov dword [rax], 9
call sym.msys_2.0.dll___errno
mov dword [rax], 9
jmp 0x21008109c
lea rax, str.virtual_ssize_t_fhandler_disk_file::pread_void__size_t__off_t__void_
mov dword [rsp + 0x30], 9
lea r9, [0x21028c231]
mov edx, 0x40
mov dword [rsp + 0x28], 0x625
lea r8, [0x21028c248]
lea rcx, [0x210273880]
mov qword [rsp + 0x20], rax
call method.strace.prntf_unsigned_int__char_const__char_const__..._
jmp 0x210081342