Function at 0x401c89
Capabilities:
Write file on windows

Disassembly:
push r15
push r14
push r12
push rsi
push rdi
push rbx
sub rsp, 0xf8
mov r12, rdx
mov rdx, qword [rdx]
mov rax, qword [r12 + 0x10]
lea r9, [rsp + 0xc8]
and dword [r9], 0
mov ebx, 0xffffffff
cmp rax, rbx
mov r8d, 0xffffffff
cmovb r8d, eax
and qword [rsp + 0x20], 0
call sub.KERNEL32.dll_WriteFile
test eax, eax
je 0x401ce8
mov eax, dword [rsp + 0xc8]
mov qword [rsp + 0x70], rax
and qword [rsp + 0x68], 0
jmp 0x401f97
call sub.KERNEL32.dll_GetLastError
mov byte [rsp + 0x70], 0
movzx ecx, word [rsp + 0x30]
mov word [rsp + 0x71], cx
mov cl, byte [rsp + 0x32]
mov byte [rsp + 0x73], cl
mov dword [rsp + 0x74], eax
mov qword [rsp + 0x68], 1
mov al, byte [rsp + 0x70]
movzx ecx, word [rsp + 0x71]
mov dl, byte [rsp + 0x73]
mov ebx, dword [rsp + 0x74]
mov rdi, qword [rsp + 0x78]
lea rsi, [rsp + 0xa0]
mov byte [rsi], al
mov word [rsi + 1], cx
mov byte [rsi + 3], dl
mov dword [rsi + 4], ebx
mov qword [rsi + 8], rdi
mov qword [rsp + 0x80], rsi
lea r15, [sym.__std::io::error::Error_as_core::fmt::Display_::fmt::h765f4158285bb383]
mov qword [rsp + 0x88], r15
lea rax, [0x0042771c]
mov qword [rsp + 0xb8], rax
mov qword [rsp + 0xc0], 6
lea rcx, [0x00424038]
call dbg.get<core::cell::RefCell<core::option::Option<alloc::boxed::Box<Write>>>>
mov rdi, rax
test rax, rax
je 0x401e5b
cmp qword [rdi], 1
je 0x401de6
movdqu xmm0, xmmword [rdi + 0x10]
xorps xmm1, xmm1
movups xmmword [rdi + 0x10], xmm1
mov eax, 1
movq xmm1, rax
cmp qword [rdi], 0
movdqu xmmword [rdi], xmm1
je 0x401ddc
movq rbx, xmm0
test rbx, rbx
je 0x401ddc
pshufd xmm0, xmm0, 0x4e
movq r14, xmm0
mov rcx, rbx
call qword [r14]
cmp qword [r14 + 8], 0
je 0x401ddc
mov rdx, qword [r14 + 0x10]
mov rcx, rbx
call sym.__rust_dealloc
cmp qword [rdi], 1
jne 0x402032
cmp qword [rdi + 8], 0
je 0x401e65
call dbg.stdout
mov rdi, rax
lea rdx, [rsp + 0x30]
mov qword [rdx], rax
lea rax, [0x00425328]
lea r8, [rsp + 0xc8]
mov qword [r8], rax
mov qword [r8 + 8], 2
lea rax, [0x0042abf0]
mov qword [r8 + 0x10], rax
mov eax, 1
mov qword [r8 + 0x18], rax
lea rcx, [rsp + 0x80]
mov qword [r8 + 0x20], rcx
mov qword [r8 + 0x28], rax
lea rcx, [rsp + 0x50]
call dbg.write_fmt
lock dec qword [rdi]
jne 0x401ed9
lea rcx, [rsp + 0x30]
call dbg.drop_slow<std::sys_common::remutex::ReentrantMutex<core::cell::RefCell<std::io::buffered::LineWriter<std::io::stdio::Maybe<std::io::stdio::StdoutRaw>>>>>
jmp 0x401ed9
mov byte [rsp + 0x30], 4
jmp 0x401ef0
or qword [rdi + 8], 0xffffffffffffffff
lea rbx, [rdi + 8]
mov rax, rdi
add rax, 0x10
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x38], rbx
mov rdx, qword [rdi + 0x10]
test rdx, rdx
je 0x401fb1
mov rax, qword [rdi + 0x18]
lea rcx, [0x00425328]
lea r8, [rsp + 0xc8]
mov qword [r8], rcx
mov qword [r8 + 8], 2
lea rcx, [0x0042abf0]
mov qword [r8 + 0x10], rcx
mov ecx, 1
mov qword [r8 + 0x18], rcx
lea rdi, [rsp + 0x80]
mov qword [r8 + 0x20], rdi
mov qword [r8 + 0x28], rcx
lea rcx, [rsp + 0x50]
call qword [rax + 0x30]
inc qword [rbx]
movdqu xmm0, xmmword [rsp + 0x50]
movdqa xmmword [rsp + 0x30], xmm0
cmp byte [rsp + 0x30], 4
jne 0x401f71
call dbg.stdout
mov rdi, rax
lea rdx, [rsp + 0x50]
mov qword [rdx], rax
lea rax, [0x00425328]
lea r8, [rsp + 0xc8]
mov qword [r8], rax
mov qword [r8 + 8], 2
lea rax, [0x0042abf0]
mov qword [r8 + 0x10], rax
mov eax, 1
mov qword [r8 + 0x18], rax
lea rcx, [rsp + 0x80]
mov qword [r8 + 0x20], rcx
mov qword [r8 + 0x28], rax
lea rcx, [rsp + 0x90]
call dbg.write_fmt
lock dec qword [rdi]
jne 0x401f5b
lea rcx, [rsp + 0x50]
call dbg.drop_slow<std::sys_common::remutex::ReentrantMutex<core::cell::RefCell<std::io::buffered::LineWriter<std::io::stdio::Maybe<std::io::stdio::StdoutRaw>>>>>
mov al, byte [rsp + 0x30]
add al, 0xfd
cmp al, 2
jb 0x401f80
lea rcx, [rsp + 0x30]
call sym._ZN4core3ptr13drop_in_place17h47d0d02e1f07e508E.llvm.14022019231308235310
jmp 0x401f80
movdqa xmm0, xmmword [rsp + 0x30]
movdqa xmmword [rsp + 0x90], xmm0
cmp byte [rsp + 0x90], 3
jne 0x401fba
lea rcx, [rsp + 0xa0]
call sym.core::ptr::drop_in_place::h987734fb29c10183
mov rcx, r12
call sym.__alloc::raw_vec::RawVec_T__A__as_core::ops::drop::Drop_::drop::hff65768293c2d1b0
nop
add rsp, 0xf8
pop rbx
pop rdi
pop rsi
pop r12
pop r14
pop r15
ret
and qword [rbx], 0
jmp 0x401ded
movdqa xmm0, xmmword [rsp + 0x90]
lea rax, [rsp + 0x50]
movdqa xmmword [rax], xmm0
lea rcx, [rsp + 0xb8]
lea rdx, [rsp + 0x30]
mov qword [rdx], rcx
lea rcx, [sym.__T_as_core::fmt::Display_::fmt::h684e11cbef2626ab]
mov qword [rdx + 8], rcx
mov qword [rdx + 0x10], rax
mov qword [rdx + 0x18], r15
lea rax, [0x00427728]
lea rcx, [rsp + 0xc8]
mov qword [rcx], rax
mov eax, 2
mov qword [rcx + 8], rax
lea rbx, [0x0042ad00]
mov qword [rcx + 0x10], rbx
mov qword [rcx + 0x18], rax
mov qword [rcx + 0x20], rdx
mov qword [rcx + 0x28], rax
lea rdx, str.libstdio_stdio.rsfailed_printing_to_PoisonError__inner:_.._
call dbg.begin_panic_fmt
lea rcx, [0x004291e8]
call dbg.panic