Function at 0x414a30
Capabilities:
Write file on windows

Disassembly:
push r15
push r14
push r12
push rsi
push rdi
push rbx
sub rsp, 0xc8
mov rsi, r9
mov rbx, r8
mov r15, rcx
mov ecx, edx
call sub.KERNEL32.dll_GetStdHandle
test rax, rax
je 0x414a69
mov rdi, rax
cmp rax, 0xffffffffffffffff
jne 0x414a8f
call sub.KERNEL32.dll_GetLastError
shl rax, 0x20
jmp 0x414a73
movabs rax, 0x600000000
mov qword [r15 + 8], rax
mov qword [r15], 1
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 0x414b37
cmp rsi, 0x2000
mov r8d, 0x2000
cmovb r8, rsi
lea r14, [rsp + 0x80]
mov rcx, r14
mov rdx, rbx
call dbg.from_utf8
cmp qword [rsp + 0x80], 1
jne 0x414b88
cmp qword [rsp + 0x88], 0
je 0x414cce
lea rax, [rsp + 0x88]
movups xmm0, xmmword [rax]
movaps xmmword [rsp + 0xa0], xmm0
mov r8, qword [rsp + 0xa0]
cmp r8, rsi
ja 0x414ded
lea rcx, [rsp + 0x30]
mov rdx, rbx
call dbg.from_utf8
cmp qword [rsp + 0x30], 1
je 0x414dfa
mov rax, qword [rsp + 0x38]
mov rbx, qword [rsp + 0x40]
jmp 0x414b98
mov dword [rsp + 0x30], 0
mov eax, 0xffffffff
cmp rsi, rax
mov r8d, 0xffffffff
cmovb r8d, esi
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x30]
mov rcx, rdi
mov rdx, rbx
call sub.KERNEL32.dll_WriteFile
test eax, eax
je 0x414caa
mov ebx, dword [rsp + 0x30]
movzx ecx, bl
and ebx, 0xffffff00
xor eax, eax
xor edx, edx
jmp 0x414cbc
mov rax, qword [rsp + 0x88]
mov rbx, qword [rsp + 0x90]
mov qword [rsp + 0x30], rax
add rax, rbx
mov qword [rsp + 0x38], rax
mov word [rsp + 0x40], 0
lea rcx, [rsp + 0x60]
lea rdx, [rsp + 0x30]
call dbg.from_iter<u16,core::str::EncodeUtf16>
mov dword [rsp + 0x2c], 0
mov r12, qword [rsp + 0x60]
mov rsi, qword [rsp + 0x70]
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x2c]
mov rcx, rdi
mov rdx, r12
mov r8d, esi
call sub.KERNEL32.dll_WriteConsoleW
test eax, eax
je 0x414c42
mov eax, dword [rsp + 0x2c]
mov qword [rsp + 0xb0], rax
mov qword [rsp + 0xb8], rsi
lea rcx, [rsp + 0xb0]
mov qword [rsp + 0xc0], rcx
lea rcx, [rsp + 0xb8]
mov qword [rsp + 0xa0], rcx
cmp rsi, rax
jne 0x414d6b
mov qword [r15 + 8], rbx
mov qword [r15], 0
cmp qword [rsp + 0x68], 0
jne 0x414c93
jmp 0x414a7e
call sub.KERNEL32.dll_GetLastError
movzx ecx, word [rsp + 0x30]
mov word [rsp + 0x80], cx
mov cl, byte [rsp + 0x32]
mov byte [rsp + 0x82], cl
mov byte [r15 + 8], 0
mov cl, byte [rsp + 0x82]
mov byte [r15 + 0xb], cl
movzx ecx, word [rsp + 0x80]
mov word [r15 + 9], cx
mov dword [r15 + 0xc], eax
mov qword [r15], 1
cmp qword [rsp + 0x68], 0
je 0x414a7e
call sub.KERNEL32.dll_GetProcessHeap
xor edx, edx
mov rcx, rax
mov r8, r12
call fcn.0041d084
jmp 0x414a7e
call sub.KERNEL32.dll_GetLastError
shl rax, 0x20
mov edx, 1
xor ecx, ecx
xor ebx, ebx
or rcx, rbx
or rcx, rax
mov qword [r15], rdx
mov qword [r15 + 8], rcx
jmp 0x414a7e
lea rcx, str.text_was_not_valid_unicode
mov edx, 0x1a
call dbg.from
mov rsi, rax
call sub.KERNEL32.dll_GetProcessHeap
xor edx, edx
mov r8d, 0x18
mov rcx, rax
call fcn.0041d08c
test rax, rax
je 0x414e13
mov qword [rax], rsi
lea rcx, dbg.drop_in_place_std::error::impl::from::StringError_
mov qword [rax + 8], rcx
mov byte [rax + 0x10], 0xc
mov cl, byte [rsp + 0x36]
mov byte [rax + 0x17], cl
movzx ecx, word [rsp + 0x34]
mov word [rax + 0x15], cx
mov ecx, dword [rsp + 0x30]
mov dword [rax + 0x11], ecx
mov cl, byte [rsp + 0x36]
mov byte [rsp + 0x66], cl
movzx ecx, word [rsp + 0x34]
mov word [rsp + 0x64], cx
mov ecx, dword [rsp + 0x30]
mov dword [rsp + 0x60], ecx
mov byte [r15 + 8], 2
mov cl, byte [rsp + 0x66]
mov byte [r15 + 0xf], cl
movzx ecx, word [rsp + 0x64]
mov word [r15 + 0xd], cx
mov ecx, dword [rsp + 0x60]
mov dword [r15 + 9], ecx
mov qword [r15 + 0x10], rax
jmp 0x414a77
lea rax, [rsp + 0xc0]
mov qword [rsp + 0x80], rax
lea rax, [sym.__T_as_core::fmt::Debug_::fmt::ha5369021c2b03d25]
mov qword [rsp + 0x88], rax
lea rcx, [rsp + 0xa0]
mov qword [rsp + 0x90], rcx
mov qword [rsp + 0x98], rax
lea rax, str.assertion_failed:___left__right___n__left:_____n_right:___:
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x38], 3
lea rax, [0x0042ad00]
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.rsOnce_instance_has_previously_been_poisoned
lea rcx, [rsp + 0x30]
call dbg.begin_panic_fmt
mov rcx, r8
mov rdx, rsi
call dbg.slice_index_len_fail
lea rax, [rsp + 0x38]
movups xmm0, xmmword [rax]
movaps xmmword [rsp + 0x60], xmm0
lea rcx, [rsp + 0x60]
call dbg.unwrap_failed<core::str::Utf8Error>
mov ecx, 0x18
mov edx, 8
call dbg.handle_alloc_error
ud2