Function at 0x1400b9070
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.140116680
sub rsp, rax
mov r12, r9
mov r15, r8
mov rdi, rdx
mov rsi, rcx
mov ecx, 0xfffffff6
call sub.KERNEL32.dll_GetStdHandle
test rax, rax
je 0x1400b90b8
mov rbx, rax
cmp rax, 0xffffffffffffffff
jne 0x1400b90e9
call sub.KERNEL32.dll_GetLastError
shl rax, 0x20
jmp 0x1400b90c2
movabs rax, 0x600000000
mov qword [rsi + 8], rax
mov qword [rsi + 0x10], 0
mov qword [rsi], 1
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 sub.KERNEL32.dll_GetConsoleMode
test eax, eax
je 0x1400b9122
test r12, r12
je 0x1400b9168
cmp r12, 3
ja 0x1400b9173
lea rax, [0x14014fce8]
mov qword [rsi + 0x10], rax
mov qword [rsi + 8], 0xb02
jmp 0x1400b90ce
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 sub.KERNEL32.dll_ReadFile
test eax, eax
je 0x1400b924d
mov edi, dword [rsp + 0x58]
xor eax, eax
jmp 0x1400b926e
xorps xmm0, xmm0
movups xmmword [rsi], xmm0
jmp 0x1400b90d5
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 0x1400b91d2
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 [reloc.WS2_32.dll_recv]
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 sub.KERNEL32.dll_ReadConsoleW
test eax, eax
je 0x1400b90ad
mov eax, dword [rsp + 0x34]
test rax, rax
je 0x1400b9282
lea rcx, [rax - 1]
cmp rcx, r13
jae 0x1400b93e8
xor ecx, ecx
cmp word [rbp + rax*2 - 2], 0x1a
sete cl
sub eax, ecx
add rax, qword [rsp + 0x38]
jne 0x1400b928f
jmp 0x1400b93b8
call sub.KERNEL32.dll_GetLastError
mov edi, eax
mov ecx, eax
call fcn.1400ae7a0
cmp al, 8
jne 0x1400b9265
xor edi, edi
xor eax, eax
jmp 0x1400b926e
shl rdi, 0x20
mov eax, 1
mov qword [rsi], rax
mov qword [rsi + 8], rdi
mov qword [rsi + 0x10], 0
jmp 0x1400b90d5
xor eax, eax
add rax, qword [rsp + 0x38]
je 0x1400b93b8
lea rcx, [rax - 1]
cmp rcx, 0xfff
ja 0x1400b93f9
movzx ebp, word [rsp + rax*2 + 0x56]
mov edx, ebp
and edx, 0xfc00
cmp edx, 0xd800
jne 0x1400b92c4
mov word [rdi], bp
mov rax, rcx
test rcx, rcx
je 0x1400b93b8
lea rbp, [rsp + rax*2]
add rbp, 0x58
xor edi, edi
movabs r13, 0x1000000000000
jmp 0x1400b92e6
add rdi, rax
cmp r14, rbp
je 0x1400b93ba
lea rcx, [r14 + 2]
movzx eax, word [r14]
movzx ebx, ax
mov edx, eax
and edx, 0xf800
cmp edx, 0xd800
jne 0x1400b9352
cmp rcx, rbp
je 0x1400b93c8
cmp ebx, 0xdbff
ja 0x1400b93c8
movzx ecx, word [rcx]
mov edx, ecx
and edx, 0xfc00
cmp edx, 0xdc00
jne 0x1400b93c8
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 0x1400b9359
shl rbx, 0x20
mov r14, rcx
cmp bx, 2
je 0x1400b93ba
test bx, bx
jne 0x1400b93c8
cmp rdi, r12
ja 0x1400b940c
shr rbx, 0x20
lea rdx, [r15 + rdi]
mov r8, r12
sub r8, rdi
mov ecx, ebx
call fcn.1400b13e0
mov eax, 1
cmp ebx, 0x80
jb 0x1400b92da
mov eax, 2
cmp ebx, 0x800
jb 0x1400b92da
cmp ebx, 0x10000
mov eax, 4
sbb rax, 0
jmp 0x1400b92da
xor edi, edi
mov qword [rsi + 8], rdi
xor eax, eax
mov qword [rsi], rax
jmp 0x1400b90d5
lea rax, str.Windows_stdin_in_console_mode_does_not_support_non_UTF_16_input__encountered_unpaired_surrogateWindows_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], 0xc02
mov eax, 1
mov qword [rsi], rax
jmp 0x1400b90d5
lea r8, str.library_std_src_syswindows_stdio.rsWindows_stdio_in_console_mode_does_not_support_writing_non_UTF_8_byte_sequenceslibrary_std_srciomod.rs
mov rdx, r13
call fcn.140117750
ud2
lea r8, str.library_std_src_syswindows_stdio.rsWindows_stdio_in_console_mode_does_not_support_writing_non_UTF_8_byte_sequenceslibrary_std_srciomod.rs
mov edx, 0x1000
call fcn.140117750
ud2
lea r8, str.library_std_src_syswindows_stdio.rsWindows_stdio_in_console_mode_does_not_support_writing_non_UTF_8_byte_sequenceslibrary_std_srciomod.rs
mov rcx, rdi
mov rdx, r12
call fcn.140117cb0
ud2