Function at 0x40918e
Capabilities:
Write file on windows

Disassembly:
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x60
mov rdi, qword [rcx]
mov r12, qword [rcx + 8]
lea rbx, [rsp + 0x30]
mov rbp, rdx
mov qword [rsp + 0xb0], r8
lea rcx, [rsp + 0x48]
mov rdx, rbx
mov qword [rsp + 0x30], rdi
mov qword [rsp + 0x48], 0
mov qword [rsp + 0x38], r12
call fcn.004090b0
lea rcx, [0x004111c0]
mov r13d, eax
call fcn.0040bfc0
cmp byte [rax], 0
mov rsi, rax
jne 0x409431
test r13b, r13b
mov r8, qword [rsp + 0xb0]
jne 0x4092b4
lea rbp, str.IOError
mov ecx, 0x50
call fcn.00405b6b
lea rdx, [0x00411160]
mov rcx, rbx
mov qword [rax + 0x10], rdx
lea rdx, [rdi + 0xd]
mov qword [rax + 0x20], rbp
lea rsi, [rax + 0x10]
mov qword [rsp + 0x50], 0
mov qword [rsp + 0x58], 0
call fcn.00406113
lea r9, [rsp + 0x50]
movups xmm0, xmmword [rsp + 0x30]
mov rdx, rbx
movaps xmm1, xmmword [0x00414a20]
mov rcx, r9
movaps xmmword [rsp + 0x50], xmm0
movaps xmmword [rsp + 0x30], xmm1
call fcn.00403a44
mov rdx, rbx
mov qword [rsp + 0x30], rdi
mov rcx, r9
mov qword [rsp + 0x38], r12
call fcn.00403a44
movaps xmm2, xmmword [rsp + 0x50]
mov rdx, rbp
mov rcx, rsi
mov qword [rsi + 8], 0
lea r9, str.syncio.nim
movups xmmword [rsi + 0x18], xmm2
lea r8, str.writeFile
mov qword [rsp + 0x20], 0x371
call fcn.00405c61
jmp 0x409431
mov r12, qword [rsp + 0x48]
mov edx, 1
mov rcx, rbp
mov r9, r12
call sub.msvcrt.dll_fwrite
mov rcx, r12
call sub.msvcrt.dll_ferror
test eax, eax
je 0x409416
mov qword [rsp + 0x50], 0
mov rbp, qword [sym.imp.msvcrt.dll__errno]
mov qword [rsp + 0x58], 0
call rbp
mov rcx, rbx
movsxd rdx, dword [rax]
call fcn.00406772
cmp byte [rsi], 0
mov r14, qword [rsp + 0x30]
mov rdi, qword [rsp + 0x38]
jne 0x4093fb
call rbp
mov ecx, dword [rax]
call sub.msvcrt.dll_strerror
mov rcx, rbx
mov rdx, rax
call fcn.00408927
mov r13, qword [rsp + 0x30]
mov rcx, rbx
mov rbp, qword [rsp + 0x38]
lea rdx, [r14 + r13 + 0xa]
call fcn.00406113
lea r9, [rsp + 0x50]
movups xmm3, xmmword [rsp + 0x30]
mov rdx, rbx
movaps xmm4, xmmword [0x004136f0]
mov rcx, r9
movaps xmmword [rsp + 0x50], xmm3
movaps xmmword [rsp + 0x30], xmm4
call fcn.00403a44
mov rdx, rbx
mov qword [rsp + 0x30], r14
mov rcx, r9
mov qword [rsp + 0x38], rdi
call fcn.00403a44
movaps xmm5, xmmword [0x004136e0]
mov rdx, rbx
mov rcx, r9
movaps xmmword [rsp + 0x30], xmm5
call fcn.00403a44
mov rdx, rbx
mov qword [rsp + 0x30], r13
mov rcx, r9
mov qword [rsp + 0x38], rbp
call fcn.00403a44
movaps xmm0, xmmword [0x004136d0]
mov rdx, rbx
mov rcx, r9
movaps xmmword [rsp + 0x30], xmm0
call fcn.00403a44
mov r14, qword [rsp + 0x50]
mov rcx, r12
mov r13, qword [rsp + 0x58]
call sub.msvcrt.dll_clearerr
mov rcx, rbx
mov qword [rsp + 0x30], r14
mov qword [rsp + 0x38], r13
call fcn.00408e03
test rbp, rbp
je 0x4093fb
mov eax, 1
shl rax, 0x3e
test qword [rbp], rax
jne 0x4093fb
mov rcx, rbp
call fcn.00404b55
test rdi, rdi
je 0x409416
mov eax, 1
shl rax, 0x3e
test qword [rdi], rax
jne 0x409416
mov rcx, rdi
call fcn.00404b55
mov rcx, qword [rsp + 0x48]
mov bl, byte [rsi]
mov byte [rsi], 0
test rcx, rcx
je 0x40942a
call sub.msvcrt.dll_fclose
cmp byte [rsi], 0
jne 0x409431
mov byte [rsi], bl
add rsp, 0x60
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret