Function at 0x2100cc350
Capabilities:
Read file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x198
mov rax, qword [rcx]
mov rbx, rdx
mov rsi, r8
mov r15, rcx
xor r8d, r8d
mov edx, 0x15
call qword [rax + 0x2d8]
test eax, eax
jle 0x2100cc648
lea r13, [0x210273880]
test byte [0x210273880], 1
je 0x2100cc3e0
mov rax, qword [r15]
lea rdx, [method.fhandler_base.get_handle__]
mov rax, qword [rax + 0x280]
cmp rax, rdx
jne 0x2100cc7b0
mov rax, qword [r15 + 0x18]
mov qword [rsp + 0x30], rax
mov rax, qword [rsi]
mov rcx, r13
lea r9, str.read__p___lu__handle__p
mov qword [rsp + 0x20], rbx
lea r8, str.virtual_void_fhandler_pty_slave::read_void__size_t_
mov edx, 0x100
mov qword [rsp + 0x28], rax
call method.strace.prntf_unsigned_int__char_const__char_const__..._
mov rax, qword [0x21024fce8]
or dword [rax + 4], 8
test rbx, rbx
je 0x2100cc488
mov r8d, 1
mov edx, 1
mov rcx, r15
call method.fhandler_pty_slave.mask_switch_to_pcon_in_bool__bool_
mov rcx, r15
call method.fhandler_pty_slave.reset_switch_to_pcon__
mov rcx, r15
call method.fhandler_base.is_nonblocking__
test al, al
jne 0x2100cc7e0
mov rax, qword [r15 + 0x1d8]
mov r14d, dword [rax + 0x34]
and r14d, 2
jne 0x2100cc790
movzx edi, byte [rax + 0x42]
mov edx, edi
mov dword [rsp + 0x64], edi
movzx edi, byte [rax + 0x49]
or dl, dil
mov dword [rsp + 0x78], edi
jne 0x2100cc668
mov rax, qword [rsi]
mov rbp, rax
test rax, rax
je 0x2100ccbb0
mov eax, r14d
xor ebp, ebp
lea r12, [rsp + 0x88]
imul rax, rax, 0xffffffffffffd8f0
cmp r14d, 0xffffffff
cmovne rbp, r12
mov qword [rsp + 0x40], rax
jmp 0x2100cc4c6
mov rcx, r15
call method.fhandler_base.is_nonblocking__
mov rax, qword [rsi]
mov rbp, rax
test rax, rax
je 0x2100ccbf0
mov dword [rsp + 0x78], 0
lea r12, [rsp + 0x88]
xor r14d, r14d
mov dword [rsp + 0x64], 0
mov rbp, r12
mov qword [rsp + 0x40], 0
lea rax, [method.fhandler_base.get_handle__]
mov qword [rsp + 0x48], rbx
xor edi, edi
mov qword [rsp + 0x50], rax
lea rax, [r15 + 0x18]
mov qword [rsp + 0x58], rax
mov rcx, qword [r15 + 0x1f8]
cmp r14d, 0xffffffff
je 0x2100cc4fc
mov rax, qword [rsp + 0x40]
mov qword [rsp + 0x88], rax
mov r8d, 5
mov rdx, rbp
call sym.cygwait_void___LARGE_INTEGER__unsigned_int_
cmp eax, 1
je 0x2100cc750
cmp eax, 1
ja 0x2100cc5a8
mov rcx, qword [r15 + 0x1e8]
mov rdx, r12
mov r8d, 5
mov qword [rsp + 0x88], 0xffffffffff676980
call sym.cygwait_void___LARGE_INTEGER__unsigned_int_
cmp eax, 2
je 0x2100cc850
ja 0x2100cc6c8
test eax, eax
je 0x2100cc8e8
test rdi, rdi
je 0x2100cc800
nop dword [rax]
mov rbp, rdi
test byte [0x210273880], 1
je 0x2100cc5fb
mov rax, qword [rsi]
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x48]
mov rcx, r13
lea r9, str._d__read__p___lu_
mov qword [rsp + 0x20], rdi
lea r8, str.virtual_void_fhandler_pty_slave::read_void__size_t_
mov edx, 0x100
mov qword [rsp + 0x28], rax
call method.strace.prntf_unsigned_int__char_const__char_const__..._
jmp 0x2100cc5fb
cmp eax, 2
je 0x2100cc850
cmp eax, 0x102
jne 0x2100cc708
test byte [0x210273880], 1
jne 0x2100cc680
test rdi, rdi
jne 0x2100cc560
cmp qword [rsp + 0x48], 0
je 0x2100cc560
mov ecx, 0xb
mov rbp, 0xffffffffffffffff
mov rdi, 0xffffffffffffffff
call sym.set_sig_errno
test byte [0x210273880], 1
jne 0x2100cc570
mov qword [rsi], rbp
test rbx, rbx
je 0x2100cc636
test rdi, rdi
jle 0x2100cc6a8
movsx edx, byte [rbx + rbp - 1]
lea rcx, [0x2102967b0]
call sym.msys_2.0.dll_strchr
test rax, rax
je 0x2100cc6a8
mov r8d, 1
xor edx, edx
mov rcx, r15
call method.fhandler_pty_slave.mask_switch_to_pcon_in_bool__bool_
mov rax, qword [0x21024fce8]
and dword [rax + 4], 0xfffffff7
jmp 0x2100cc64d
cdqe
mov qword [rsi], rax
add rsp, 0x198
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov r14d, 0xffffffff
test edi, edi
je 0x2100cc44f
imul r14d, edi, 0x64
jmp 0x2100cc44f
mov dword [rsp + 0x20], r14d
lea r9, str.wait_timed_out__time_to_wait__u
mov edx, 0x100
mov rcx, r13
lea r8, str.virtual_void_fhandler_pty_slave::read_void__size_t_
call method.strace.prntf_unsigned_int__char_const__char_const__..._
jmp 0x2100cc5c9
xor r8d, r8d
test rbp, rbp
mov rcx, r15
sete r8b
xor edx, edx
call method.fhandler_pty_slave.mask_switch_to_pcon_in_bool__bool_
jmp 0x2100cc636
cmp eax, 0x80
je 0x2100cc8e8
cmp eax, 0x102
jne 0x2100cc8a0
test byte [r13], 1
jne 0x2100cc830
cmp r14d, 0xffffffff
je 0x2100cc88c
test rdi, rdi
jne 0x2100cc560
jmp 0x2100cc5d6
test byte [0x210273880], 1
jne 0x2100cc7c0
test rdi, rdi
jne 0x2100cc560
call sym.GetLastError
mov edx, 0x5dc
lea rcx, str._usr_src_MSYS2_packages_msys2_runtime_src_msys2_runtime_winsup_cygwin_fhandler_tty.cc
mov rbp, 0xffffffffffffffff
mov r8d, eax
mov rdi, 0xffffffffffffffff
call sym.seterrno_from_win_error_char_const__int__unsigned_int_
jmp 0x2100cc5ee
mov rbp, rdi
test rdi, rdi
jne 0x2100cc5ee
test byte [0x210273880], 1
jne 0x2100cca10
mov ecx, 4
mov rbp, 0xffffffffffffffff
mov rdi, 0xffffffffffffffff
call sym.set_sig_errno
jmp 0x2100cc5ee
mov dword [rsp + 0x78], 0
mov r14d, 0xffffffff
mov dword [rsp + 0x64], 0
jmp 0x2100cc44f
mov rcx, r15
call rax
mov rax, qword [rax]
jmp 0x2100cc3b3
lea r9, str.wait_for_input_event_failed___E
lea r8, str.virtual_void_fhandler_pty_slave::read_void__size_t_
mov edx, 0x100
mov rcx, r13
call method.strace.prntf_unsigned_int__char_const__char_const__..._
jmp 0x2100cc715
mov dword [rsp + 0x78], 0
xor r14d, r14d
mov dword [rsp + 0x64], 0
jmp 0x2100cc44f
test byte [0x210273880], 1
je 0x2100cc769
lea r9, str.wait_for_mutex_caught_signal
lea r8, str.virtual_void_fhandler_pty_slave::read_void__size_t_
mov edx, 0x100
mov rcx, r13
call method.strace.prntf_unsigned_int__char_const__char_const__..._
jmp 0x2100cc769
lea r9, str.failed_to_acquire_input_mutex_after_input_event_arrived
lea r8, str.virtual_void_fhandler_pty_slave::read_void__size_t_
mov edx, 0x100
mov rcx, r13
call method.strace.prntf_unsigned_int__char_const__char_const__..._
jmp 0x2100cc6e9
mov rax, qword [0x21024fce8]
and dword [rax + 4], 0xfffffff7
call method.pthread.static_cancel_self__
mov eax, 0xffffffff
cmp rdx, rax
je 0x2100cc870
sub rdx, r8
mov qword [rsi], rdx
test r9d, r9d
je 0x2100cccba
nop dword [rax]
mov rcx, qword [r15 + 0x1e8]
call sym.ReleaseMutex
cmp qword [rsi], 0
jne 0x2100cc4e2
jmp 0x2100cc560
test byte [0x210273880], 1
jne 0x2100cca30
test rdi, rdi
jne 0x2100cc560
call sym.GetLastError
mov edx, 0x607
lea rcx, str._usr_src_MSYS2_packages_msys2_runtime_src_msys2_runtime_winsup_cygwin_fhandler_tty.cc
mov rbp, 0xffffffffffffffff
mov r8d, eax
mov rdi, 0xffffffffffffffff
call sym.seterrno_from_win_error_char_const__int__unsigned_int_
jmp 0x2100cc5ee
mov qword [rsp + 0x20], 0
mov rcx, qword [r15 + 0x1f8]
xor edx, edx
mov r8, r12
mov r9d, 8
call sym.NtQueryEvent
test eax, eax
js 0x2100cc880
mov eax, dword [rsp + 0x8c]
test eax, eax
je 0x2100cc880
mov rax, qword [r15]
mov rdx, qword [rax + 0x280]
mov rax, qword [rsp + 0x58]
cmp rdx, qword [rsp + 0x50]
jne 0x2100ccc48
lea rdx, [rsp + 0x84]
mov qword [rsp + 0x68], rdx
mov rcx, rdx
mov rdx, qword [rax]
call sym.bytes_available_unsigned_int__void_
test al, al
je 0x2100cccf5
cmp qword [rsp + 0x48], 0
mov edx, dword [rsp + 0x84]
je 0x2100ccb80
test edx, edx
jne 0x2100cca50
mov eax, dword [rsp + 0x64]
or eax, r14d
je 0x2100ccddc
mov rax, qword [r15 + 0x1d8]
test byte [rax + 0x34], 2
je 0x2100ccc3b
mov rcx, qword [r15 + 0x1f8]
mov dword [rsp + 0x88], 0
call sym.ResetEvent
mov rcx, qword [r15 + 0x1e8]
call sym.ReleaseMutex
mov rax, qword [r15 + 0x1d8]
mov r8d, dword [rax + 0x12c]
test r8d, r8d
js 0x2100ccd52
je 0x2100ccd25
test byte [rax + 0x34], 2
jne 0x2100cc560
mov rcx, r15
call method.fhandler_base.is_nonblocking__
mov edx, dword [rsp + 0x64]
test edx, edx
je 0x2100cc560
cmp al, 1
je 0x2100cc560
movsxd rax, edx
cmp rax, rdi
jg 0x2100cc88c
jmp 0x2100cc560
lea r9, str.wait_catched_signal
lea r8, str.virtual_void_fhandler_pty_slave::read_void__size_t_
mov edx, 0x100
mov rcx, r13
call method.strace.prntf_unsigned_int__char_const__char_const__..._
jmp 0x2100cc769
lea r9, str.wait_for_input_mutex_failed___E
lea r8, str.virtual_void_fhandler_pty_slave::read_void__size_t_
mov edx, 0x100
mov rcx, r13
call method.strace.prntf_unsigned_int__char_const__char_const__..._
jmp 0x2100cc8ad
mov rcx, qword [rsi]
mov eax, 0x100
mov r8, qword [r15 + 0x1d8]
cmp rcx, rax
cmovbe rax, rcx
test byte [r8 + 0x34], 2
je 0x2100ccc52
mov dword [rsp + 0x88], 0
cmp rax, rdx
cmova rax, rdx
test rax, rax
je 0x2100ccbc9
test byte [r13], 1
jne 0x2100ccc6b
mov r8d, eax
mov rax, qword [r15]
mov rax, qword [rax + 0x280]
cmp rax, qword [rsp + 0x50]
jne 0x2100cccd7
mov rax, qword [rsp + 0x58]
mov qword [rsp + 0x20], 0
mov rcx, qword [rax]
lea rdx, [rsp + 0x90]
mov r9, r12
mov qword [rsp + 0x70], rdx
call sym.ReadFile
test eax, eax
je 0x2100ccd6f
mov rax, qword [r15]
mov rax, qword [rax + 0x280]
cmp rax, qword [rsp + 0x50]
jne 0x2100ccceb
mov rax, qword [rsp + 0x58]
mov rdx, qword [rax]
mov rcx, qword [rsp + 0x68]
call sym.bytes_available_unsigned_int__void_
test al, al
je 0x2100ccdac
mov eax, dword [rsp + 0x88]
mov r9d, dword [rsp + 0x84]
test eax, eax
je 0x2100ccc0d
mov r8d, eax
mov rdx, qword [rsi]
add rdi, r8
cmp qword [rsp + 0x48], 0
je 0x2100cc860
sub rdx, r8
mov rcx, qword [rsp + 0x48]
mov dword [rsp + 0x7c], r9d
mov qword [rsi], rdx
mov rdx, qword [rsp + 0x70]
mov qword [rsp + 0x68], r8
call sym.msys_2.0.dll_memcpy
mov r9d, dword [rsp + 0x7c]
mov r8, qword [rsp + 0x68]
add qword [rsp + 0x48], r8
test r9d, r9d
je 0x2100cce2c
mov rcx, qword [r15 + 0x1e8]
call sym.ReleaseMutex
jmp 0x2100cc9b5
test edx, edx
je 0x2100ccca2
mov rdx, qword [rsi]
mov eax, 0x100
mov dword [rsp + 0x88], 0
cmp rdx, rax
cmovbe rax, rdx
test rdx, rdx
jne 0x2100cca8c
jmp 0x2100cc880
test byte [0x210273880], 1
je 0x2100cc6a8
mov qword [rsp + 0x48], rbx
xor edi, edi
jmp 0x2100cc573
mov rcx, qword [r15 + 0x1e8]
call sym.ReleaseMutex
cmp qword [rsp + 0x48], 0
jne 0x2100cc9b5
jmp 0x2100cc88c
test byte [0x210273880], 1
je 0x2100cc636
mov qword [rsp + 0x48], 0
xor edi, edi
jmp 0x2100cc573
test r9d, r9d
jne 0x2100ccbc9
mov rcx, qword [r15 + 0x1f8]
call sym.ResetEvent
mov rcx, qword [r15 + 0x1e8]
call sym.ReleaseMutex
cmp qword [rsp + 0x48], 0
jne 0x2100cc9b5
jmp 0x2100cc560
mov dword [rsp + 0x88], 0
jmp 0x2100ccc12
mov rcx, r15
call rdx
jmp 0x2100cc939
mov dword [rsp + 0x88], 0
test rcx, rcx
jne 0x2100cca8c
jmp 0x2100ccb6f
mov edx, dword [rsp + 0x78]
mov qword [rsp + 0x20], rax
mov rcx, r13
lea r9, str.reading__lu_bytes__vtime__d_
lea r8, str.virtual_void_fhandler_pty_slave::read_void__size_t_
mov qword [rsp + 0x70], rax
mov dword [rsp + 0x28], edx
mov edx, 0x100
call method.strace.prntf_unsigned_int__char_const__char_const__..._
mov rax, qword [rsp + 0x70]
jmp 0x2100cca97
mov rax, qword [r15 + 0x1d8]
test byte [rax + 0x34], 2
je 0x2100ccc3b
mov dword [rsp + 0x88], 0
mov rcx, qword [r15 + 0x1f8]
call sym.ResetEvent
mov rcx, qword [r15 + 0x1e8]
call sym.ReleaseMutex
jmp 0x2100cc560
mov dword [rsp + 0x70], r8d
mov rcx, r15
call rax
mov r8d, dword [rsp + 0x70]
jmp 0x2100ccab4
mov rcx, r15
call rax
jmp 0x2100ccaf7
mov rcx, qword [r15 + 0x1e8]
or rbp, 0xffffffffffffffff
or rdi, 0xffffffffffffffff
call sym.ReleaseMutex
mov r8d, 5
mov edx, 0x615
lea rcx, str.virtual_void_fhandler_pty_slave::read_void__size_t_
call sym.__set_errno_char_const__int__int_
jmp 0x2100cc5ee
test byte [0x210273880], 1
je 0x2100cc560
lea r9, str.saw_EOF
lea r8, str.virtual_void_fhandler_pty_slave::read_void__size_t_
mov edx, 0x100
mov rcx, r13
call method.strace.prntf_unsigned_int__char_const__char_const__..._
jmp 0x2100cc560
neg r8d
mov edx, 0x663
lea rcx, str.virtual_void_fhandler_pty_slave::read_void__size_t_
or rdi, 0xffffffffffffffff
call sym.__set_errno_char_const__int__int_
jmp 0x2100cc560
test byte [0x210273880], 1
jne 0x2100cce0c
mov rcx, qword [r15 + 0x1e8]
or rbp, 0xffffffffffffffff
or rdi, 0xffffffffffffffff
call sym.ReleaseMutex
mov r8d, 5
mov edx, 0x636
lea rcx, str.virtual_void_fhandler_pty_slave::read_void__size_t_
call sym.__set_errno_char_const__int__int_
jmp 0x2100cc5ee
mov rcx, qword [r15 + 0x1e8]
or rbp, 0xffffffffffffffff
or rdi, 0xffffffffffffffff
call sym.ReleaseMutex
mov r8d, 5
mov edx, 0x643
lea rcx, str.virtual_void_fhandler_pty_slave::read_void__size_t_
call sym.__set_errno_char_const__int__int_
jmp 0x2100cc5ee
mov rcx, qword [r15 + 0x1e8]
call sym.ReleaseMutex
xor r8d, r8d
xor edx, edx
mov rcx, r15
call method.fhandler_pty_slave.mask_switch_to_pcon_in_bool__bool_
mov rax, qword [0x21024fce8]
mov qword [rsi], 0
and dword [rax + 4], 0xfffffff7
jmp 0x2100cc64d
lea r9, str.read_failed___E
lea r8, str.virtual_void_fhandler_pty_slave::read_void__size_t_
mov edx, 0x100
mov rcx, r13
call method.strace.prntf_unsigned_int__char_const__char_const__..._
jmp 0x2100ccd7c
mov rcx, qword [r15 + 0x1f8]
call sym.ResetEvent
mov rcx, qword [r15 + 0x1e8]
call sym.ReleaseMutex
jmp 0x2100cc9b5