Function at 0x140173f00
Capabilities:
Read file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
mov eax, 0x2058
call fcn.14018e1f0
sub rsp, rax
mov r12, r9
mov r15, r8
mov rdi, rdx
mov rsi, rcx
mov ecx, 0xfffffff6
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
test rax, rax
je 0x140173f4a
mov rbx, rax
cmp rax, 0xffffffffffffffff
jne 0x140173f7e
call qword [sym.imp.KERNEL32.dll_GetLastError]
shl rax, 0x20
jmp 0x140173f54
movabs rax, 0x600000000
mov qword [rsi + 8], rax
mov qword [rsi + 0x10], 0
mov qword [rsi], 1
mov rax, rsi
add rsp, 0x2058
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov dword [rsp + 0x58], 0
lea rdx, [rsp + 0x58]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetConsoleMode]
test eax, eax
je 0x140173fb8
test r12, r12
je 0x140173fff
cmp r12, 4
jae 0x14017400a
lea rax, str.Windows_stdin_in_console_mode_does_not_support_a_buffer_too_small_to_guarantee_holding_one_arbitrary_UTF_8_character__4_bytes_
mov qword [rsi + 0x10], rax
mov qword [rsi + 8], 0xb02
jmp 0x140173f60
mov dword [rsp + 0x58], 0
mov eax, 0xffffffff
cmp r12, rax
mov r8d, 0xffffffff
cmovb r8d, r12d
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x58]
mov rcx, rbx
mov rdx, r15
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1401740e5
mov edi, dword [rsp + 0x58]
xor eax, eax
jmp 0x140174107
xorps xmm0, xmm0
movups xmmword [rsi], xmm0
jmp 0x140173f67
xor ebp, ebp
lea r14, [rsp + 0x58]
mov r8d, 0x2000
mov rcx, r14
xor edx, edx
call sub.VCRUNTIME140.dll_memset
movabs rcx, 0xaaaaaaaaaaaaaaab
mov rax, r12
mul rcx
shr rdx, 1
cmp rdx, 0x1000
mov r13d, 0x1000
cmovb r13, rdx
movzx eax, word [rdi]
test ax, ax
je 0x140174069
mov word [rsp + 0x58], ax
mov word [rdi], 0
cmp r13, 1
mov eax, 2
cmove r13, rax
mov ebp, 1
mov rax, rbp
lea rbp, [rsp + rbp*2]
add rbp, 0x58
mov qword [rsp + 0x38], rax
sub r13, rax
movaps xmm0, xmmword [0x1402e7f90]
movaps xmmword [rsp + 0x40], xmm0
mov dword [rsp + 0x34], 0
lea rax, [rsp + 0x40]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x34]
mov rcx, rbx
mov rdx, rbp
mov r8d, r13d
call qword [sym.imp.KERNEL32.dll_ReadConsoleW]
test eax, eax
je 0x140173f3e
mov eax, dword [rsp + 0x34]
test rax, rax
je 0x14017411b
lea rcx, [rax - 1]
cmp rcx, r13
jae 0x140174281
xor ecx, ecx
cmp word [rbp + rax*2 - 2], 0x1a
sete cl
sub eax, ecx
add rax, qword [rsp + 0x38]
jne 0x140174128
jmp 0x140174251
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov ecx, eax
call fcn.140173380
cmp al, 8
jne 0x1401740fe
xor edi, edi
xor eax, eax
jmp 0x140174107
shl rdi, 0x20
mov eax, 1
mov qword [rsi], rax
mov qword [rsi + 8], rdi
mov qword [rsi + 0x10], 0
jmp 0x140173f67
xor eax, eax
add rax, qword [rsp + 0x38]
je 0x140174251
lea rcx, [rax - 1]
cmp rcx, 0xfff
ja 0x140174292
movzx ebp, word [rsp + rax*2 + 0x56]
mov edx, ebp
and edx, 0xfc00
cmp edx, 0xd800
jne 0x14017415d
mov word [rdi], bp
mov rax, rcx
test rcx, rcx
je 0x140174251
lea rbp, [rsp + rax*2]
add rbp, 0x58
xor edi, edi
movabs r13, 0x1000000000000
jmp 0x14017417f
add rdi, rax
cmp r14, rbp
je 0x140174253
lea rcx, [r14 + 2]
movzx eax, word [r14]
movzx ebx, ax
mov edx, eax
and edx, 0xf800
cmp edx, 0xd800
jne 0x1401741eb
cmp rcx, rbp
je 0x140174261
cmp ebx, 0xdbff
ja 0x140174261
movzx ecx, word [rcx]
mov edx, ecx
and edx, 0xfc00
cmp edx, 0xdc00
jne 0x140174261
add r14, 4
add eax, 0x2800
movzx eax, ax
add ecx, 0x2400
movzx ebx, cx
shl rax, 0x2a
shl rbx, 0x20
or rbx, rax
add rbx, r13
jmp 0x1401741f2
shl rbx, 0x20
mov r14, rcx
cmp bx, 2
je 0x140174253
test bx, bx
jne 0x140174261
cmp rdi, r12
ja 0x1401742a5
shr rbx, 0x20
lea rdx, [r15 + rdi]
mov r8, r12
sub r8, rdi
mov ecx, ebx
call fcn.140164390
mov eax, 1
cmp ebx, 0x80
jb 0x140174173
mov eax, 2
cmp ebx, 0x800
jb 0x140174173
cmp ebx, 0x10000
mov eax, 4
sbb rax, 0
jmp 0x140174173
xor edi, edi
mov qword [rsi + 8], rdi
xor eax, eax
mov qword [rsi], rax
jmp 0x140173f67
lea rax, str.Windows_stdin_in_console_mode_does_not_support_non_UTF_16_input__encountered_unpaired_surrogate
mov qword [rsi + 0x10], rax
mov qword [rsi + 8], 0xc02
mov eax, 1
mov qword [rsi], rax
jmp 0x140173f67
lea r8, str.library_std_src_syswindows_stdio.rs
mov rdx, r13
call fcn.14019e3e0
ud2
lea r8, str.library_std_src_syswindows_stdio.rs
mov edx, 0x1000
call fcn.14019e3e0
ud2
lea r8, str.library_std_src_syswindows_stdio.rs
mov rcx, rdi
mov rdx, r12
call fcn.14019e5b0
ud2