Function at 0x140041df0
Capabilities:
Check if file exists
Read file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
mov eax, 0x20f8
call dbg.___chkstk_ms
sub rsp, rax
movdqa xmmword [rsp + 0x20e0], xmm9
movaps xmmword [rsp + 0x20d0], xmm8
movaps xmmword [rsp + 0x20c0], xmm7
movaps xmmword [rsp + 0x20b0], xmm6
mov rdi, r8
mov rsi, rdx
mov rbx, rcx
mov rcx, rdx
call sub.KERNEL32.dll_AcquireSRWLockExclusive
mov rax, qword [0x140186118]
shl rax, 1
test rax, rax
mov qword [rsp + 0x90], rbx
jne 0x14004262a
mov dword [rsp + 0x4c], 0
movzx eax, byte [rsi + 8]
mov qword [rsp + 0x70], rdi
mov rax, qword [rdi + 0x10]
lea rcx, [rsi + 0x38]
mov qword [rsp + 0xa8], rcx
lea rcx, [rsi + 0x3a]
mov qword [rsp + 0x80], rcx
lea rbp, [0x140068090]
movdqa xmm6, xmmword [0x140068070]
movdqa xmm7, xmmword [0x140068080]
xorps xmm8, xmm8
lea rcx, str.library_std_src_syswindows_stdio.rs
mov qword [rsp + 0x68], rcx
mov qword [rsp + 0x98], rax
mov qword [rsp + 0x78], rax
xor eax, eax
mov qword [rsp + 0xa0], rax
jmp 0x140041ee2
cmp byte [rbx + 0xf], 0x23
jne 0x14004254e
mov rcx, rbx
call dbg.drop_in_place<std::io::error::Error>
mov r15, qword [rsi + 0x10]
mov rax, qword [rsi + 0x20]
mov rbx, qword [rsi + 0x28]
sub rbx, rax
jbe 0x140041f20
test r15, r15
jne 0x140042375
mov eax, ebx
and eax, 3
mov r14d, 1
xor edi, edi
movsxd rax, dword [rbp + rax*4]
add rax, rbp
jmp rax
mov r14, qword [rsi + 0x18]
mov rcx, qword [rsi + 0x30]
mov r8, r14
sub r8, rcx
jb 0x140042654
add rcx, r15
xor edx, edx
call sub.msvcrt.dll_memset
movq xmm9, r14
pslldq xmm9, 8
mov ecx, 0xfffffff6
call sub.KERNEL32.dll_GetStdHandle
test rax, rax
je 0x140041f84
mov rdi, rax
cmp rax, 0xffffffffffffffff
jne 0x140041fa6
call sub.KERNEL32.dll_GetLastError
mov ebx, eax
shl rbx, 0x20
or rbx, 2
mov eax, ebx
and eax, 3
cmp rax, 2
jae 0x14004220b
jmp 0x140042233
movabs rax, 0x600000000
lea rbx, [rax + 2]
mov eax, ebx
and eax, 3
cmp rax, 2
jae 0x14004220b
jmp 0x140042233
mov dword [rsp + 0xb0], 0
mov rcx, rdi
lea rdx, [rsp + 0xb0]
call sub.KERNEL32.dll_GetConsoleMode
test eax, eax
je 0x140042029
movzx ebx, byte [rsi + 0x3e]
cmp r14, rbx
mov r13, rbx
cmovb r13, r14
cmp r13, 4
ja 0x140042668
mov rcx, r15
mov r12, qword [rsp + 0x80]
mov rdx, r12
mov r8, r13
call sym.memcpy
cmp r14, rbx
jae 0x1400420cf
mov r8d, 4
sub r8, r13
lea rdx, [r12 + r13]
mov rcx, r12
call sub.msvcrt.dll_memmove
movzx eax, byte [rsi + 0x3e]
sub al, r13b
mov byte [rsi + 0x3e], al
cmp r14, rbx
ja 0x1400420dd
jmp 0x14004234a
movdqu xmm0, xmmword [0x14006d5f8]
movdqa xmmword [rsp + 0x50], xmm0
mov eax, 0xffffffff
cmp r14, rax
cmovb rax, r14
movups xmmword [rsp + 0x38], xmm8
mov dword [rsp + 0x30], eax
mov qword [rsp + 0x28], r15
lea rax, [rsp + 0x50]
mov qword [rsp + 0x20], rax
mov rcx, rdi
xor edx, edx
xor r8d, r8d
xor r9d, r9d
call sub.ntdll.dll_NtReadFile
cmp eax, 0x103
jne 0x140042084
mov rcx, rdi
mov edx, 0xffffffff
call sub.KERNEL32.dll_WaitForSingleObject
mov eax, dword [rsp + 0x50]
cmp eax, 0xc0000011
je 0x1400420c7
cmp eax, 0x103
je 0x140042672
test eax, eax
jns 0x1400422e2
mov ecx, eax
call sub.ntdll.dll_RtlNtStatusToDosError
mov rbx, rax
shl rbx, 0x20
or rbx, 2
mov ecx, eax
call dbg.decode_error_kind
cmp al, 0xb
jne 0x140042200
mov rcx, rbx
call dbg.drop_in_place<std::io::error::Error>
xor r13d, r13d
jmp 0x14004234a
xor eax, eax
mov byte [rsi + 0x3e], al
cmp r14, rbx
jbe 0x14004234a
mov r12, r14
sub r12, r13
cmp r12, 4
jae 0x140042191
mov word [rsp + 0x50], 0
mov rax, qword [rsp + 0xa8]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], 1
mov r9d, 1
lea rcx, [rsp + 0xb0]
mov rdx, rdi
lea r8, [rsp + 0x50]
call dbg.read_u16s_fixup_surrogates
cmp qword [rsp + 0xb0], 0
mov rbx, qword [rsp + 0xb8]
jne 0x1400421f2
cmp rbx, 1
ja 0x140042705
test rbx, rbx
mov rax, qword [rsp + 0x80]
je 0x1400422e9
movups xmmword [rsp + 0x30], xmm8
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x28], 4
mov ecx, 0xfde9
mov edx, pe_nt_image_headers64
lea r8, [rsp + 0x50]
mov r9d, ebx
call sub.KERNEL32.dll_WideCharToMultiByte
lea rbx, str.Windows_stdin_in_console_mode_does_not_support_non_UTF_16_input__encountered_unpaired_surrogate
test eax, eax
je 0x1400421f2
jmp 0x1400422eb
mov rax, r14
movabs rcx, 0xaaaaaaaaaaaaaaab
mul rcx
shr rdx, 1
cmp rdx, 0x1000
mov eax, 0x1000
cmovae rdx, rax
mov rax, qword [rsp + 0xa8]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rdx
mov r9d, 0x1000
lea rcx, [rsp + 0x50]
mov rdx, rdi
lea r8, [rsp + 0xb0]
call dbg.read_u16s_fixup_surrogates
cmp qword [rsp + 0x50], 0
mov rbx, qword [rsp + 0x58]
je 0x140042275
test rbx, rbx
je 0x140042360
nop dword [rax + rax]
mov eax, ebx
and eax, 3
cmp rax, 2
jb 0x140042233
cmp eax, 2
jne 0x140042233
mov rax, rbx
movabs rcx, 0xffffffff00000000
and rax, rcx
movabs rcx, 0x600000000
cmp rax, rcx
je 0x1400422d8
mov eax, ebx
and eax, 3
mov r14d, 1
xor edi, edi
movsxd rax, dword [rbp + rax*4]
add rax, rbp
jmp rax
cmp byte [rbx + 0x10], 0x23
je 0x140041eda
jmp 0x14004254e
mov rax, rbx
shr rax, 0x20
cmp eax, 0x23
je 0x140041eda
jmp 0x14004254e
cmp rbx, 0x1000
ja 0x1400426f4
test rbx, rbx
je 0x140042337
movups xmmword [rsp + 0x30], xmm8
mov dword [rsp + 0x28], r14d
mov qword [rsp + 0x20], r15
mov ecx, 0xfde9
mov edx, pe_nt_image_headers64
lea r8, [rsp + 0xb0]
mov r9d, ebx
call sub.KERNEL32.dll_WideCharToMultiByte
test eax, eax
jne 0x140042345
lea rbx, str.Windows_stdin_in_console_mode_does_not_support_non_UTF_16_input__encountered_unpaired_surrogate
mov eax, ebx
and eax, 3
cmp rax, 2
jae 0x14004220b
jmp 0x140042233
mov rcx, rbx
call dbg.drop_in_place<std::io::error::Error>
jmp 0x140042360
mov r13, qword [rsp + 0x58]
jmp 0x14004234a
xor eax, eax
mov byte [rsi + 0x3e], al
lea rcx, [r15 + r13]
movzx ebx, al
cmp r12, rbx
mov rdi, rbx
cmovb rdi, r12
mov rdx, qword [rsp + 0x80]
mov r8, rdi
call sym.memcpy
cmp r12, rbx
jae 0x14004233b
mov r8d, 4
sub r8, rdi
mov rcx, qword [rsp + 0x80]
lea rdx, [rcx + rdi]
call sub.msvcrt.dll_memmove
movzx eax, byte [rsi + 0x3e]
sub al, dil
jmp 0x14004233d
xor eax, eax
jmp 0x140042347
xor eax, eax
mov byte [rsi + 0x3e], al
add r13, rdi
jmp 0x14004234a
cdqe
add r13, rax
cmp r14, r13
cmovbe r14, r13
movq xmm0, r14
movq xmm9, r13
punpcklqdq xmm9, xmm0
mov qword [rsi + 0x20], 0
movdqu xmmword [rsi + 0x28], xmm9
movq rbx, xmm9
xor eax, eax
add r15, rax
cmp rbx, 0x10
jae 0x1400423a8
test rbx, rbx
je 0x14004245f
xor ecx, ecx
nop dword [rax]
cmp byte [r15 + rcx], 0xa
je 0x1400424ac
inc rcx
cmp rbx, rcx
jne 0x140042390
jmp 0x14004245f
lea rax, [r15 + 7]
and rax, 0xfffffffffffffff8
sub rax, r15
je 0x1400423e9
cmp rax, rbx
cmovae rax, rbx
test rax, rax
je 0x1400423e9
xor ecx, ecx
nop word cs:[rax + rax]
cmp byte [r15 + rcx], 0xa
je 0x1400424a2
inc rcx
cmp rax, rcx
jne 0x1400423d0
lea rcx, [rbx - 0x10]
jmp 0x140042400
lea rcx, [rbx - 0x10]
xor eax, eax
jmp 0x140042405
cmp rax, rcx
ja 0x14004243e
movdqu xmm0, xmmword [r15 + rax]
movdqa xmm1, xmm0
pxor xmm1, xmm6
paddq xmm1, xmm7
pandn xmm0, xmm1
pshufd xmm1, xmm0, 0xee
por xmm1, xmm0
movq rdx, xmm1
movabs r8, 0x8080808080808080
test rdx, r8
jne 0x14004243e
add rax, 0x10
jmp 0x140042400
mov rdx, rbx
sub rdx, rax
je 0x14004245f
lea r8, [r15 + rax]
xor ecx, ecx
nop dword [rax]
cmp byte [r8 + rcx], 0xa
je 0x14004249f
inc rcx
cmp rdx, rcx
jne 0x140042450
mov rdi, qword [rsp + 0x70]
mov rax, qword [rdi + 8]
mov r14, qword [rsp + 0x78]
sub rax, r14
cmp rax, rbx
jae 0x140042487
mov rcx, rdi
mov rdx, r14
mov r8, rbx
call dbg.do_reserve_and_handle<u8, alloc::alloc::Global>
mov r14, qword [rdi + 0x10]
mov rcx, qword [rdi]
add rcx, r14
mov rdx, r15
mov r8, rbx
call sym.memcpy
add r14, rbx
xor eax, eax
jmp 0x1400424fa
add rcx, rax
cmp rcx, 0xffffffffffffffff
je 0x140042734
lea r13, [rcx + 1]
cmp rcx, rbx
jae 0x140042716
mov rdi, qword [rsp + 0x70]
mov rax, qword [rdi + 8]
mov r14, qword [rsp + 0x78]
sub rax, r14
cmp rax, rcx
ja 0x1400424e1
mov rcx, rdi
mov rdx, r14
mov r8, r13
call dbg.do_reserve_and_handle<u8, alloc::alloc::Global>
mov r14, qword [rdi + 0x10]
mov rcx, qword [rdi]
add rcx, r14
mov rdx, r15
mov r8, r13
call sym.memcpy
add r14, r13
mov al, 1
mov rbx, r13
mov qword [rsp + 0x78], r14
mov qword [rdi + 0x10], r14
mov rcx, qword [rsi + 0x20]
add rcx, rbx
mov rdx, qword [rsi + 0x28]
cmp rcx, rdx
cmovae rcx, rdx
mov qword [rsi + 0x20], rcx
mov rcx, qword [rsp + 0xa0]
add rcx, rbx
mov dil, 1
test al, al
jne 0x140042649
mov rax, rcx
mov r14d, 0
test rbx, rbx
mov qword [rsp + 0xa0], rcx
mov rbx, rcx
jne 0x140041ee2
jmp case.0x140041f11.2
xor edi, edi
mov r13, qword [rsp + 0x78]
mov r8, r13
mov r12, qword [rsp + 0x98]
sub r8, r12
jb 0x1400426e0
mov r15, qword [rsp + 0x70]
mov rdx, qword [r15]
add rdx, r12
lea rcx, [rsp + 0xb0]
call dbg.from_utf8
cmp qword [rsp + 0xb0], 0
je 0x1400425bd
lea rax, [0x14006c290]
test dil, dil
cmovne rbx, rax
mov rax, qword [rsp + 0x90]
mov qword [rax + 8], rbx
mov qword [rax], 1
mov r13, r12
mov qword [r15 + 0x10], r13
cmp byte [rsp + 0x4c], 0
jne 0x1400425ed
jmp 0x1400425d7
mov rax, qword [rsp + 0x90]
mov qword [rax], r14
mov qword [rax + 8], rbx
mov qword [r15 + 0x10], r13
cmp byte [rsp + 0x4c], 0
jne 0x1400425ed
mov rax, qword [0x140186118]
movabs rcx, 0x7fffffffffffffff
test rax, rcx
jne 0x14004263a
mov rcx, rsi
movaps xmm6, xmmword [rsp + 0x20b0]
movaps xmm7, xmmword [rsp + 0x20c0]
movaps xmm8, xmmword [rsp + 0x20d0]
movaps xmm9, xmmword [rsp + 0x20e0]
add rsp, 0x20f8
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
jmp fcn.140047e94
call dbg.is_zero_slow_path
xor al, 1
mov dword [rsp + 0x4c], eax
jmp 0x140041e60
call dbg.is_zero_slow_path
test al, al
jne 0x1400425ed
mov byte [rsi + 8], 1
jmp 0x1400425ed
mov rbx, rcx
xor r14d, r14d
jmp case.0x140041f11.2
lea r8, [0x14006c828]
mov rdx, r14
call dbg.slice_start_index_len_fail
jmp 0x140042739
mov ebx, 4
jmp 0x140042722
mov dword [rsp + 0x88], 0
mov byte [rsp + 0x8c], 0
lea rax, str.fatal_runtime_error:_I_O_error:_operation_failed_to_complete_synchronously_n
mov qword [rsp + 0xb0], rax
mov qword [rsp + 0xb8], 1
lea rax, [rsp + 0x48]
mov qword [rsp + 0xc0], rax
pxor xmm0, xmm0
movdqu xmmword [rsp + 0xc8], xmm0
lea rcx, [rsp + 0x88]
lea rdx, [rsp + 0xb0]
call sym.std::io::Write::write_fmt::h9c6f8a47e53199c5
mov rcx, rax
call sym.core::ptr::drop_in_place_core::result::Result____std::io::error::Error__::h0f798feb3c43cb64
mov ecx, 7
int 0x29
ud2
lea r8, [0x14006c810]
mov rcx, r12
mov rdx, r13
call dbg.slice_start_index_len_fail
jmp 0x140042739
mov r13, rbx
mov ebx, 0x1000
lea rax, str.library_std_src_syswindows_stdio.rs
jmp 0x14004271d
mov r13, rbx
mov ebx, 1
lea rax, str.library_std_src_syswindows_stdio.rs
jmp 0x14004271d
lea rax, [0x14006c8b8]
mov qword [rsp + 0x68], rax
mov rcx, r13
mov rdx, rbx
mov r8, qword [rsp + 0x68]
call dbg.slice_end_index_len_fail
jmp 0x140042739
call dbg.slice_end_index_overflow_fail
ud2