Function at 0x140014f80
Capabilities:
Write file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbx
sub rsp, 0x50
mov rsi, rcx
cmp qword [0x140682368], 0
je 0x140015098
mov eax, dword [0x140682508]
mov rcx, qword gs:[0x58]
mov r12, qword [rcx + rax*8]
test rsi, rsi
je 0x140014fe4
mov rcx, rsi
call sub.msvcrt.dll_strlen
test rax, rax
jle 0x140014fe4
mov rbx, rax
mov r14, rax
inc r14
jo 0x140014fdd
mov rdi, r14
add rdi, 8
jno 0x140015119
call fcn.1400054b0
jmp 0x140014fe8
xor edi, edi
xor ebx, ebx
lea r14, [r12 + 0x2ad8]
mov rax, qword [0x140682368]
mov qword [rsp + 0x20], rbx
mov qword [rsp + 0x28], rdi
lea rsi, [rsp + 0x20]
mov rcx, rsi
call rax
test rdi, rdi
je 0x1400150ff
test byte [rdi + 7], 0x40
jne 0x1400150ff
mov eax, dword [0x140682508]
mov rcx, qword gs:[0x58]
mov rax, qword [rcx + rax*8]
lea rbx, [rax + 8]
lea rcx, str.dealloc
mov qword [rsp + 0x28], rcx
lea rcx, str._home_neko_.choosenim_toolchains_nim_2.0.2_lib_system_alloc.nim
mov qword [rsp + 0x38], rcx
mov qword [rsp + 0x30], 0
mov word [rsp + 0x40], 0
lea r15, [rax + 0x2ac8]
mov rax, qword [rax + 0x2ac8]
test rax, rax
je 0x1400150d3
movzx ecx, word [rax + 0x22]
add ecx, 1
mov word [rsp + 0x42], cx
mov qword [rsp + 0x20], rax
mov qword [r15], rsi
movzx eax, cx
cmp eax, 0x7d0
jne 0x1400150e2
call fcn.1400153a0
jmp 0x1400150e2
mov rdi, rdx
mov ecx, 2
call qword [fcn.140024860]
mov rbx, rax
mov edx, 1
mov rcx, rsi
mov r8, rdi
mov r9, rax
call sub.msvcrt.dll_fwrite
mov rcx, rbx
add rsp, 0x50
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
jmp sub.msvcrt.dll_fflush
mov word [rsp + 0x42], 0
mov qword [rsp + 0x20], rax
mov qword [r15], rsi
mov qword [rsp + 0x30], 0x42d
mov rcx, rbx
mov rdx, rdi
call fcn.14000c640
mov rax, qword [r15]
mov rax, qword [rax]
mov qword [r15], rax
cmp byte [r14], 0
jne 0x14001521e
add rsp, 0x50
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
js 0x14001519f
mov eax, dword [0x140682508]
mov rcx, qword gs:[0x58]
mov rax, qword [rcx + rax*8]
lea r15, [rax + 8]
lea rcx, str.alloc
mov qword [rsp + 0x28], rcx
lea rcx, str._home_neko_.choosenim_toolchains_nim_2.0.2_lib_system_alloc.nim
mov qword [rsp + 0x38], rcx
mov qword [rsp + 0x30], 0
mov word [rsp + 0x40], 0
lea r13, [rax + 0x2ac8]
mov rax, qword [rax + 0x2ac8]
test rax, rax
je 0x1400151ae
movzx ecx, word [rax + 0x22]
add ecx, 1
mov word [rsp + 0x42], cx
mov qword [rsp + 0x20], rax
lea rax, [rsp + 0x20]
mov qword [r13], rax
movzx eax, cx
cmp eax, 0x7d0
jne 0x1400151c3
call fcn.1400153a0
jmp 0x1400151c3
movabs r8, 0x7fffffffffffffff
mov rcx, rdi
jmp 0x140015212
mov word [rsp + 0x42], 0
mov qword [rsp + 0x20], rax
lea rax, [rsp + 0x20]
mov qword [r13], rax
mov qword [rsp + 0x30], 0x41c
mov rcx, r15
mov rdx, rdi
call fcn.1400098f0
mov rdi, rax
mov rax, qword [r13]
mov rax, qword [rax]
mov qword [r13], rax
mov qword [rdi], rbx
test r14, r14
js 0x140015204
mov rcx, rdi
add rcx, 8
mov rdx, rsi
mov r8, r14
call fcn.14003eb80
jmp 0x140014fe8
movabs r8, 0x7fffffffffffffff
lea rcx, [r8 + 1]
xor edx, edx
call fcn.14000d300
jmp 0x140014fe2
mov byte [r14], 0
mov eax, dword [0x140682508]
mov rcx, qword gs:[0x58]
mov rax, qword [rcx + rax*8]
lea rcx, [rax + 0x2ae0]
mov rax, qword [rax + 0x2ae0]
mov rdx, qword [rax + 0x38]
xor r8d, r8d
call fcn.140012cd0
jmp 0x140015109