Function at 0x46e510
Capabilities:
Write file on windows

Disassembly:
push r15
push r14
push r12
push rsi
push rdi
push rbx
sub rsp, 0xc8
mov rbx, r9
mov r14, r8
mov rsi, rcx
mov ecx, edx
call sub.KERNEL32.dll_GetStdHandle
test rax, rax
je 0x46e549
mov rdi, rax
cmp rax, 0xffffffffffffffff
jne 0x46e572
call sub.KERNEL32.dll_GetLastError
shl rax, 0x20
jmp 0x46e553
movabs rax, 0x600000000
mov qword [rsi + 8], rax
mov qword [rsi], 1
mov rax, rsi
add rsp, 0xc8
pop rbx
pop rdi
pop rsi
pop r12
pop r14
pop r15
ret
mov dword [rsp + 0x30], 0
lea rdx, [rsp + 0x30]
mov rcx, rdi
call sub.KERNEL32.dll_GetConsoleMode
test eax, eax
je 0x46e619
cmp rbx, 0x2000
mov r8d, 0x2000
cmovb r8, rbx
lea rcx, [rsp + 0x60]
mov rdx, r14
call fcn.0048c910
cmp qword [rsp + 0x60], 1
jne 0x46e664
lea r15, [rsp + 0x68]
mov rcx, r15
call fcn.0048c8f0
test rax, rax
je 0x46e7e6
movups xmm0, xmmword [r15]
movaps xmmword [rsp + 0xa0], xmm0
lea rcx, [rsp + 0xa0]
call fcn.0048c8f0
cmp rax, rbx
ja 0x46e883
lea rcx, [rsp + 0x30]
mov rdx, r14
mov r8, rax
call fcn.0048c910
cmp qword [rsp + 0x30], 1
je 0x46e890
mov rdx, qword [rsp + 0x38]
mov r12, qword [rsp + 0x40]
jmp 0x46e66e
mov dword [rsp + 0x60], 0
mov eax, 0xffffffff
cmp rbx, rax
mov r8d, 0xffffffff
cmovb r8d, ebx
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x60]
mov rcx, rdi
mov rdx, r14
call sub.KERNEL32.dll_WriteFile
test eax, eax
je 0x46e782
mov eax, dword [rsp + 0x60]
mov qword [rsp + 0x38], rax
xor eax, eax
jmp 0x46e7ad
mov rdx, qword [rsp + 0x68]
mov r12, qword [rsp + 0x70]
lea r14, [rsp + 0x60]
mov rcx, r14
mov r8, r12
call fcn.0048d420
mov rax, qword [rsp + 0x70]
mov qword [rsp + 0x40], rax
movups xmm0, xmmword [rsp + 0x60]
movaps xmmword [rsp + 0x30], xmm0
lea rcx, [rsp + 0x80]
lea rdx, [rsp + 0x30]
call fcn.0045d220
mov dword [rsp + 0x2c], 0
mov r15, qword [rsp + 0x80]
mov rbx, qword [rsp + 0x90]
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x2c]
mov rcx, rdi
mov rdx, r15
mov r8d, ebx
call sub.KERNEL32.dll_WriteConsoleW
test eax, eax
je 0x46e726
mov eax, dword [rsp + 0x2c]
mov qword [rsp + 0xb0], rax
mov qword [rsp + 0xb8], rbx
lea rcx, [rsp + 0xb0]
mov qword [rsp + 0xc0], rcx
lea rcx, [rsp + 0xb8]
mov qword [rsp + 0xa0], rcx
cmp rbx, rax
jne 0x46e80d
mov qword [rsi + 8], r12
mov qword [rsi], 0
jmp 0x46e75b
call sub.KERNEL32.dll_GetLastError
movzx ecx, word [rsp + 0x30]
mov word [rsp + 0x60], cx
mov cl, byte [rsp + 0x32]
mov byte [rsp + 0x62], cl
mov byte [rsi + 8], 0
mov cl, byte [rsp + 0x62]
mov byte [rsi + 0xb], cl
movzx ecx, word [rsp + 0x60]
mov word [rsi + 9], cx
mov dword [rsi + 0xc], eax
mov qword [rsi], 1
mov rdx, qword [rsp + 0x88]
test rdx, rdx
je 0x46e55e
add rdx, rdx
mov r8d, 2
mov rcx, r15
call fcn.00409ea0
jmp 0x46e55e
call sub.KERNEL32.dll_GetLastError
mov byte [rsp + 0x38], 0
movzx ecx, word [rsp + 0x80]
mov word [rsp + 0x39], cx
mov cl, byte [rsp + 0x82]
mov byte [rsp + 0x3b], cl
mov dword [rsp + 0x3c], eax
mov eax, 1
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x40]
mov qword [rsi + 0x10], rax
mov rax, qword [rsp + 0x30]
mov qword [rsi], rax
mov al, byte [rsp + 0x38]
mov byte [rsi + 8], al
movzx eax, word [rsp + 0x39]
mov word [rsi + 9], ax
mov al, byte [rsp + 0x3b]
mov byte [rsi + 0xb], al
mov eax, dword [rsp + 0x3c]
mov dword [rsi + 0xc], eax
jmp 0x46e55e
lea r8, str.text_was_not_valid_unicodeInstantt
lea rcx, [rsp + 0x30]
mov dl, 0xc
mov r9d, 0x1a
call fcn.00446060
movups xmm0, xmmword [rsp + 0x30]
movups xmmword [rsi + 8], xmm0
jmp 0x46e557
lea rax, [rsp + 0xc0]
mov qword [rsp + 0x60], rax
lea rax, [0x0045a260]
mov qword [rsp + 0x68], rax
lea rcx, [rsp + 0xa0]
mov qword [rsp + 0x70], rcx
mov qword [rsp + 0x78], rax
lea rax, [0x004ce358]
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x38], 3
lea rax, [0x004cddf8]
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x48], 2
mov qword [rsp + 0x50], r14
mov qword [rsp + 0x58], 2
lea rdx, str.libstd_syswindows_stdio.rs
lea rcx, [rsp + 0x30]
call fcn.00440ea0
mov rcx, rax
mov rdx, rbx
call fcn.0048b450
lea rax, [rsp + 0x38]
movups xmm0, xmmword [rax]
movaps xmmword [rsp + 0x80], xmm0
lea rcx, str.called__Result::unwrap____on_an__Err__valueSome
lea r8, [rsp + 0x80]
mov edx, 0x2b
call fcn.00472f80