Function at 0x2100aa6a0
Capabilities:
Read file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0xb8
cmp qword [r8], 0
mov qword [rsp + 0x108], rdx
mov r12, rcx
mov rbx, r8
mov qword [rsp + 0x90], 0
mov qword [rsp + 0x98], 0
mov qword [rsp + 0xa0], 0
mov qword [rsp + 0xa8], 0
js 0x2100aa710
jne 0x2100aa71d
add rsp, 0xb8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
movabs rax, 0x7fffffffffffffff
mov qword [r8], rax
mov rcx, r12
xor edi, edi
call method.fhandler_base.is_nonblocking__
test al, al
jne 0x2100aa73c
movzx eax, byte [r12 + 0x1d0]
test al, al
jne 0x2100aab38
lea r13, [0x210273880]
test byte [0x210273880], 1
jne 0x2100aab56
xor r9d, r9d
xor r8d, r8d
mov edx, 1
lea rcx, [0x2102d1cc0]
lea rbp, [method.fhandler_base.get_handle__]
call sym.CreateEventA
lea r15, [rsp + 0x84]
lea r14, [rsp + 0x7c]
mov qword [rsp + 0x68], 0
mov qword [rsp + 0xa8], rax
lea rax, [rsp + 0x80]
mov qword [rsp + 0x50], rax
lea rax, [rsp + 0x90]
mov qword [rsp + 0x58], rax
lea rax, [r12 + 0x18]
mov qword [rsp + 0x60], rax
jmp 0x2100aa80a
test byte [r13], 1
jne 0x2100aab00
mov ecx, 0x45d
call sym.SetLastError
test byte [r13], 1
jne 0x2100aaa30
call sym.GetLastError
cmp eax, 0x3e3
jne 0x2100aaa5b
cmp qword [rbx], 0
je 0x2100aa9c8
test rdi, rdi
jle 0x2100aa9c8
cmp byte [r12 + 0x1d1], 0
jne 0x2100aa9c8
mov rax, qword [r12]
mov rax, qword [rax + 0x280]
cmp rax, rbp
jne 0x2100aaa98
mov rcx, qword [r12 + 0x18]
mov r8, r15
mov rdx, r14
call sym.ClearCommError
test eax, eax
je 0x2100aa7cd
mov eax, dword [rsp + 0x7c]
test eax, eax
jne 0x2100aa7b8
mov rax, qword [rbx]
mov edx, 0xffffffff
mov rcx, r12
cmp rax, rdx
cmovbe rdx, rax
mov qword [rsp + 0x48], rdx
mov esi, edx
call method.fhandler_base.is_nonblocking__
mov rdx, qword [rsp + 0x48]
test al, al
je 0x2100aaac0
mov esi, dword [rsp + 0x88]
test esi, esi
je 0x2100aa9c8
mov rcx, qword [rsp + 0xa8]
cmp esi, edx
cmova esi, edx
call sym.ResetEvent
mov rax, qword [r12]
mov rdx, qword [rax + 0x280]
mov rax, qword [rsp + 0x60]
cmp rdx, rbp
jne 0x2100aab28
mov rdx, qword [rsp + 0x58]
mov r9, qword [rsp + 0x50]
mov r8d, esi
mov qword [rsp + 0x20], rdx
mov rdx, qword [rsp + 0x108]
mov rcx, qword [rax]
call sym.ReadFile
test eax, eax
jne 0x2100aa948
call sym.GetLastError
cmp eax, 0x3e5
jne 0x2100aa7cd
mov rcx, r12
call method.fhandler_base.is_nonblocking__
test al, al
je 0x2100aaba0
mov rax, qword [r12]
mov rax, qword [rax + 0x280]
cmp rax, rbp
jne 0x2100aac55
mov rax, qword [rsp + 0x60]
mov rcx, qword [rax]
call sym.CancelIo
mov rax, qword [r12]
mov rax, qword [rax + 0x280]
cmp rax, rbp
jne 0x2100aac69
mov rax, qword [rsp + 0x60]
mov r8, qword [rsp + 0x50]
mov rcx, qword [rax]
mov r9d, 1
mov rdx, qword [rsp + 0x58]
call sym.GetOverlappedResult
test eax, eax
je 0x2100aa7cd
nop dword [rax + rax]
movzx ecx, byte [r13]
and ecx, 1
mov edx, dword [rsp + 0x80]
mov rax, qword [rbx]
add qword [rsp + 0x68], rdx
sub rax, rdx
add qword [rsp + 0x108], rdx
sub rdi, rdx
mov qword [rbx], rax
test cl, cl
je 0x2100aa9ba
mov rax, qword [rsp + 0x68]
mov dword [rsp + 0x30], edx
mov rcx, r13
lea r9, str.vtime___u__vmin___u__read_bytes__u__tot__D
lea r8, str.virtual_void_fhandler_serial::raw_read_void__size_t_
mov edx, 0x40
mov qword [rsp + 0x38], rax
movzx eax, byte [r12 + 0x1d0]
mov dword [rsp + 0x28], eax
movzx eax, byte [r12 + 0x1d1]
mov dword [rsp + 0x20], eax
call method.strace.prntf_unsigned_int__char_const__char_const__..._
mov rax, qword [rbx]
test rax, rax
jne 0x2100aa7f2
nop dword [rax + rax]
mov rsi, qword [rsp + 0x68]
mov rcx, qword [rsp + 0xa8]
call sym.CloseHandle
mov qword [rbx], rsi
mov rcx, r12
call method.fhandler_base.is_nonblocking__
test al, al
je 0x2100aa6f9
cmp qword [rbx], 0
jne 0x2100aa6f9
mov qword [rbx], 0xffffffffffffffff
test byte [0x210273880], 1
jne 0x2100aad18
mov rax, qword [sym.msys_2.0.dll__impure_ptr]
mov dword [rax], 0xb
call sym.msys_2.0.dll___errno
mov dword [rax], 0xb
jmp 0x2100aa6f9
lea r9, str.err__E
lea r8, str.virtual_void_fhandler_serial::raw_read_void__size_t_
mov edx, 0x40
mov rcx, r13
call method.strace.prntf_unsigned_int__char_const__char_const__..._
call sym.GetLastError
cmp eax, 0x3e3
je 0x2100aa7e8
mov rax, qword [rsp + 0x68]
mov rsi, rax
test rax, rax
jne 0x2100aa9cd
call sym.GetLastError
mov edx, 0x98
lea rcx, str._usr_src_MSYS2_packages_msys2_runtime_src_msys2_runtime_winsup_cygwin_fhandler_serial.cc
mov rsi, 0xffffffffffffffff
mov r8d, eax
call sym.seterrno_from_win_error_char_const__int__unsigned_int_
jmp 0x2100aa9cd
mov rcx, r12
call rax
mov r8, r15
mov rdx, r14
mov rcx, qword [rax]
call sym.ClearCommError
test eax, eax
jne 0x2100aa832
jmp 0x2100aa7cd
mov ecx, dword [rsp + 0x88]
test ecx, ecx
je 0x2100aaad9
cmp ecx, edx
mov r8d, ecx
cmova ecx, edx
cmp r8, rdi
cmovge esi, ecx
mov rcx, qword [rsp + 0xa8]
call sym.ResetEvent
mov rax, qword [r12]
mov rdx, qword [rax + 0x280]
cmp rdx, rbp
jne 0x2100aab28
mov rax, qword [rsp + 0x60]
jmp 0x2100aa8a3
mov dword [rsp + 0x20], eax
lea r9, str.error_detected__x
mov edx, 0x100
mov rcx, r13
lea r8, str.virtual_void_fhandler_serial::raw_read_void__size_t_
call method.strace.prntf_unsigned_int__char_const__char_const__..._
jmp 0x2100aa7c3
mov rcx, r12
call rdx
jmp 0x2100aa8a3
mov rdi, qword [rbx]
lea r13, [0x210273880]
cmp rax, rdi
cmovbe rdi, rax
test byte [0x210273880], 1
je 0x2100aa750
lea r9, str.ulen__ld__vmin___u__vtime___u
lea r8, str.virtual_void_fhandler_serial::raw_read_void__size_t_
mov edx, 0x40
movzx eax, byte [r12 + 0x1d1]
mov rcx, r13
mov dword [rsp + 0x30], eax
movzx eax, byte [r12 + 0x1d0]
mov dword [rsp + 0x28], eax
mov rax, qword [rbx]
mov qword [rsp + 0x20], rax
call method.strace.prntf_unsigned_int__char_const__char_const__..._
jmp 0x2100aa750
mov rcx, qword [rsp + 0xa8]
xor edx, edx
mov r8d, 5
call sym.cygwait_void___LARGE_INTEGER__unsigned_int_
cmp eax, 1
je 0x2100aac73
cmp eax, 2
je 0x2100aade0
test eax, eax
je 0x2100aabec
mov rax, qword [r12]
mov rax, qword [rax + 0x280]
cmp rax, rbp
jne 0x2100aac5f
mov rax, qword [rsp + 0x60]
mov rcx, qword [rax]
call sym.CancelIo
mov rax, qword [r12]
mov rax, qword [rax + 0x280]
cmp rax, rbp
jne 0x2100aad54
mov rax, qword [rsp + 0x60]
mov r8, qword [rsp + 0x50]
mov rcx, qword [rax]
mov r9d, 1
mov rdx, qword [rsp + 0x58]
call sym.GetOverlappedResult
test eax, eax
je 0x2100aa7cd
test byte [r13], 1
jne 0x2100aad5e
mov edx, dword [rsp + 0x80]
mov rax, qword [rbx]
add qword [rsp + 0x68], rdx
sub rax, rdx
add qword [rsp + 0x108], rdx
sub rdi, rdx
mov qword [rbx], rax
jmp 0x2100aa9ba
mov rcx, r12
call rax
jmp 0x2100aa902
mov rcx, r12
call rax
jmp 0x2100aabe4
mov rcx, r12
call rax
jmp 0x2100aa923
mov rax, qword [r12]
mov rax, qword [rax + 0x280]
cmp rax, rbp
jne 0x2100aad91
mov rax, qword [rsp + 0x60]
mov rcx, qword [rax]
call sym.CancelIo
mov rax, qword [r12]
mov rax, qword [rax + 0x280]
cmp rax, rbp
jne 0x2100aad9b
mov rax, qword [rsp + 0x60]
mov r8, qword [rsp + 0x50]
mov rcx, qword [rax]
mov r9d, 1
mov rdx, qword [rsp + 0x58]
call sym.GetOverlappedResult
test eax, eax
je 0x2100aa7cd
cmp qword [rsp + 0x68], 0
jne 0x2100aace3
cmp dword [rsp + 0x80], 0
je 0x2100aada5
mov rsi, qword [rsp + 0x68]
test byte [0x210273880], 1
je 0x2100aa9cd
lea r9, str.signal_received_but_ignored
lea r8, str.virtual_void_fhandler_serial::raw_read_void__size_t_
mov edx, 0x40
mov rcx, r13
call method.strace.prntf_unsigned_int__char_const__char_const__..._
jmp 0x2100aa9cd
mov dword [rsp + 0x30], 0xb
mov edx, 0x40
mov rcx, r13
lea rax, str.virtual_void_fhandler_serial::raw_read_void__size_t_
mov dword [rsp + 0x28], 0xaa
lea r9, [0x210292569]
lea r8, [0x210292580]
mov qword [rsp + 0x20], rax
call method.strace.prntf_unsigned_int__char_const__char_const__..._
jmp 0x2100aaa0b
mov rcx, r12
call rax
jmp 0x2100aac05
mov eax, dword [rsp + 0x80]
mov rcx, r13
lea r9, str.got__u_bytes_from_ReadFile
lea r8, str.virtual_void_fhandler_serial::raw_read_void__size_t_
mov edx, 0x40
mov dword [rsp + 0x20], eax
call method.strace.prntf_unsigned_int__char_const__char_const__..._
movzx ecx, byte [r13]
and ecx, 1
jmp 0x2100aa950
mov rcx, r12
call rax
jmp 0x2100aac8c
mov rcx, r12
call rax
jmp 0x2100aacad
mov ecx, 4
or rsi, 0xffffffffffffffff
call sym.set_sig_errno
test byte [0x210273880], 1
je 0x2100aa9cd
lea r9, str.signal_received__set_EINTR
lea r8, str.virtual_void_fhandler_serial::raw_read_void__size_t_
mov edx, 0x40
mov rcx, r13
call method.strace.prntf_unsigned_int__char_const__char_const__..._
jmp 0x2100aa9cd
mov rax, qword [r12]
mov rcx, r12
call qword [rax + 0x280]
mov rcx, qword [rax]
call sym.CancelIo
mov rax, qword [r12]
mov rcx, r12
call qword [rax + 0x280]
mov r8, qword [rsp + 0x50]
mov rdx, qword [rsp + 0x58]
mov r9d, 1
mov rcx, qword [rax]
call sym.GetOverlappedResult
test byte [0x210273880], 1
jne 0x2100aae28
call method.pthread.static_cancel_self__
lea r9, str.thread_canceled
lea r8, str.virtual_void_fhandler_serial::raw_read_void__size_t_
mov edx, 0x40
mov rcx, r13
call method.strace.prntf_unsigned_int__char_const__char_const__..._
jmp 0x2100aae23