Function at 0x46e990
Capabilities:
Read file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0xb8
mov r13, r9
mov r14, r8
mov rdi, rdx
mov rsi, rcx
mov ecx, 0xfffffff6
call sub.KERNEL32.dll_GetStdHandle
test rax, rax
je 0x46e9d2
mov rbx, rax
cmp rax, 0xffffffffffffffff
jne 0x46e9ec
call sub.KERNEL32.dll_GetLastError
shl rax, 0x20
jmp 0x46e9dc
movabs rax, 0x600000000
mov qword [rsi + 8], rax
mov qword [rsi], 1
jmp 0x46ed9f
mov dword [rsp + 0x50], 0
lea rdx, [rsp + 0x50]
mov rcx, rbx
call sub.KERNEL32.dll_GetConsoleMode
test eax, eax
je 0x46ea3a
mov rcx, qword [rdi]
call fcn.0046a830
mov r12, qword [0x004ca838]
call r12
mov rbp, rax
test rax, rax
je 0x46edb6
cmp qword [rbp], 1
jne 0x46eaa0
mov rcx, rbp
add rcx, 8
mov r15, qword [rbp + 8]
jmp 0x46eabc
mov qword [rsp + 0x80], rbx
mov dword [rsp + 0x70], 0
mov eax, 0xffffffff
cmp r13, rax
mov r8d, 0xffffffff
cmovb r8d, r13d
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x70]
mov rcx, rbx
mov rdx, r14
call sub.KERNEL32.dll_ReadFile
test eax, eax
je 0x46ec71
mov dword [rsp + 0x54], eax
mov dword [rsp + 0x50], 0
mov eax, dword [rsp + 0x70]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], 0
jmp 0x46ed57
call qword [0x004ca840]
mov r15, rax
mov rcx, rbp
add rcx, 8
mov qword [rbp], 1
mov qword [rbp + 8], rax
mov qword [rcx], r15
mov al, byte [rdi + 8]
test al, al
jne 0x46edc9
test r15, r15
mov qword [rsp + 0x98], rdi
setne byte [rsp + 0xa0]
lea rbp, [rdi + 0x10]
mov rax, qword [rdi + 0x28]
cmp rax, qword [rdi + 0x20]
jne 0x46ec33
mov ecx, 0x2000
mov edx, 2
call fcn.00409ec0
test rax, rax
je 0x46ede6
mov r12, rax
mov qword [rsp + 0x80], rax
mov qword [rsp + 0x88], 0x1000
mov qword [rsp + 0x90], 0x1000
mov dword [rsp + 0x6c], 0
movaps xmm0, xmmword [0x004cdc50]
movups xmmword [rsp + 0xa8], xmm0
lea rax, [rsp + 0xa8]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x6c]
mov r8d, 0x1000
mov rcx, rbx
mov rdx, r12
call sub.KERNEL32.dll_ReadConsoleW
test eax, eax
je 0x46ecb0
mov eax, dword [rsp + 0x6c]
cmp rax, 0x1000
mov r8d, 0x1000
cmovb r8, rax
mov qword [rsp + 0x90], r8
lea rcx, [rsp + 0x50]
mov rdx, r12
call fcn.00480750
cmp qword [rsp + 0x50], 0
je 0x46ece0
mov rax, qword [rsp + 0x60]
mov qword [rsp + 0x40], rax
movups xmm0, xmmword [rsp + 0x50]
movaps xmmword [rsp + 0x30], xmm0
mov rax, qword [rsp + 0x40]
test rax, rax
je 0x46ebd3
add rax, 0xffffffffffffffff
mov rcx, qword [rsp + 0x30]
cmp byte [rcx + rax], 0x1a
jne 0x46ebd3
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0x40]
mov qword [rsp + 0x60], rax
movaps xmm0, xmmword [rsp + 0x30]
movaps xmmword [rsp + 0x50], xmm0
mov rdx, qword [rdi + 0x18]
test rdx, rdx
je 0x46ebff
mov rcx, qword [rbp]
mov r8d, 1
call fcn.00409ea0
mov rax, qword [rsp + 0x60]
mov qword [rbp + 0x10], rax
movaps xmm0, xmmword [rsp + 0x50]
movups xmmword [rbp], xmm0
mov qword [rdi + 0x28], 0
mov edx, 0x2000
mov r8d, 2
mov rcx, r12
call fcn.00409ea0
mov r12, qword [0x004ca838]
mov rcx, rsi
mov rdx, rbp
mov r8, r14
mov r9, r13
call fcn.0044f290
test r15, r15
jne 0x46ed97
call r12
mov rbx, rax
test rax, rax
je 0x46edf7
cmp qword [rbx], 1
je 0x46ed39
call qword [0x004ca840]
jmp 0x46ed79
call sub.KERNEL32.dll_GetLastError
lea rdi, [rsp + 0x58]
mov byte [rsp + 0x58], 0
mov dword [rsp + 0x5c], eax
mov dword [rsp + 0x50], 1
mov ecx, eax
call fcn.00447a20
cmp al, 8
jne 0x46ed46
xorps xmm0, xmm0
movaps xmmword [rsp + 0x30], xmm0
mov rcx, rdi
call fcn.0044e990
jmp 0x46ed57
call sub.KERNEL32.dll_GetLastError
movzx ecx, word [rsp + 0x50]
mov word [rsp + 0x30], cx
mov cl, byte [rsp + 0x52]
mov byte [rsp + 0x32], cl
mov byte [rsi + 8], 0
mov cl, byte [rsp + 0x32]
mov byte [rsi + 0xb], cl
movzx ecx, word [rsp + 0x30]
mov word [rsi + 9], cx
mov dword [rsi + 0xc], eax
jmp 0x46ed02
lea r8, str.text_was_not_valid_unicodeInstantt
lea rcx, [rsp + 0x70]
mov dl, 0xc
mov r9d, 0x1a
call fcn.00446060
movups xmm0, xmmword [rsp + 0x70]
movups xmmword [rsi + 8], xmm0
mov qword [rsi], 1
mov edx, 0x2000
mov r8d, 2
mov rcx, r12
call fcn.00409ea0
test r15, r15
jne 0x46ed97
call qword [0x004ca838]
mov rbx, rax
test rax, rax
je 0x46ee0a
cmp qword [rbx], 1
jne 0x46ed73
mov rcx, rbx
add rcx, 8
mov rax, qword [rbx + 8]
jmp 0x46ed8b
movups xmm0, xmmword [rdi]
movups xmmword [rsp + 0x38], xmm0
mov qword [rsp + 0x30], 1
mov rax, qword [rsp + 0x40]
mov qword [rsi + 0x10], rax
mov rax, qword [rsp + 0x30]
mov qword [rsi], rax
mov rax, qword [rsp + 0x38]
mov qword [rsi + 8], rax
jmp 0x46ed9f
call qword [0x004ca840]
mov rcx, rbx
add rcx, 8
mov qword [rbx], 1
mov qword [rbx + 8], rax
mov qword [rcx], rax
test rax, rax
je 0x46ed97
mov byte [rdi + 8], 1
mov rcx, qword [rdi]
call fcn.0046aac0
mov rax, rsi
add rsp, 0xb8
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
lea rcx, [0x004cca34]
mov edx, 0x39
call fcn.00473020
test r15, r15
setne r9b
lea rcx, str.called__Result::unwrap____on_an__Err__valueSome
mov edx, 0x2b
mov r8, rdi
call fcn.00472aa0
mov ecx, 0x2000
mov edx, 2
call fcn.00481e70
ud2
lea rcx, [0x004cca34]
mov edx, 0x39
call fcn.00473020
lea rcx, [0x004cca34]
mov edx, 0x39
call fcn.00473020