Function at 0x1400039e0
Capabilities:
Write file on windows

Disassembly:
push rbp
mov rbp, rsp
push rdi
push rsi
push rbx
sub rsp, 0x158
mov rbx, rcx
mov qword [rbp + 0x18], rdx
lea rcx, [0x14006a1fb]
mov qword [rbp + 0x20], r8
test rbx, rbx
je 0x140003a0f
cmp qword [rbx], 0
jne 0x140003b70
call fcn.140002a50
lea rcx, [0x14006a20b]
mov rsi, rax
call fcn.140002a50
mov rcx, rsi
mov rdx, rax
call qword [sym.imp.msvcrt.dll__wfopen]
mov qword [rbp - 0x138], rax
test rax, rax
je 0x140003b80
mov rax, qword [str._b_b_t_]
lea rcx, [rbp - 0x120]
mov rdx, qword [rax]
mov qword [rbp - 0x130], rdx
lea rdx, [rbp - 0x130]
mov qword [rax], rdx
mov rdx, rbp
call sub.msvcrt.dll__setjmp
cdqe
mov qword [rbp - 0x128], rax
test rax, rax
je 0x140003ab0
mov rax, qword [str._b_b_t_]
mov rcx, qword [rbp - 0x138]
mov rdx, qword [rax]
mov rdx, qword [rdx]
mov qword [rax], rdx
test rcx, rcx
je 0x140003b10
call sub.msvcrt.dll_fclose
cmp qword [rbp - 0x128], 0
jne 0x140003b10
add rsp, 0x158
pop rbx
pop rsi
pop rdi
pop rbp
ret
cmp qword [rbp + 0x20], 0
jle 0x140003b38
mov rdi, qword [rbp - 0x138]
mov rcx, qword [rbp + 0x18]
mov edx, 1
mov r8, qword [rbp + 0x20]
mov r9, rdi
call sub.msvcrt.dll_fwrite
mov rcx, rdi
call sub.msvcrt.dll_ferror
test eax, eax
jne 0x140003cc8
mov rax, qword [str._b_b_t_]
mov rcx, qword [rbp - 0x138]
mov rdx, qword [rax]
mov rdx, qword [rdx]
mov qword [rax], rdx
test rcx, rcx
jne 0x140003a93
cmp qword [rbp - 0x128], 0
je 0x140003aa2
nop dword [rax]
call fcn.140010df0
cmp qword [rbp - 0x128], 0
je 0x140003aa2
call fcn.14000e2a0
nop
add rsp, 0x158
pop rbx
pop rsi
pop rdi
pop rbp
ret
mov rax, qword [rbp + 0x20]
xor ecx, ecx
lea rdx, [rax - 1]
call fcn.14000daa0
cmp qword [rbp + 0x20], 0
je 0x140003abb
movabs r8, 0x7fffffffffffffff
mov rcx, qword [rbp + 0x20]
xor edx, edx
call fcn.14000d900
jmp 0x140003abb
lea rcx, [rbx + 0x10]
jmp 0x140003a0f
mov rcx, qword [0x1400785f0]
mov edx, 0x30
call fcn.14000bf00
mov ecx, 0xd
mov rdi, rax
mov rax, qword [0x140078500]
mov qword [rdi], rax
lea rax, [0x14006a1e3]
mov qword [rdi + 0x10], rax
test rbx, rbx
je 0x140003bba
mov rax, qword [rbx]
lea rcx, [rax + 0xd]
call fcn.14000c140
movabs rdx, 0x6f20746f6e6e6163
movabs rcx, 0x203a6e65706f20
mov rsi, rax
mov rax, qword [rax]
lea rax, [rsi + rax + 0x10]
mov qword [rax], rdx
mov qword [rax + 6], rcx
mov rax, qword [rsi]
lea rdx, [rax + 0xd]
mov qword [rsi], rdx
test rbx, rbx
je 0x140003c0f
lea rcx, [rsi + rax + 0x1d]
mov rax, qword [rbx]
lea rdx, [rbx + 0x10]
lea r8, [rax + 1]
call sub.msvcrt.dll_memcpy
mov rax, qword [rbx]
add qword [rsi], rax
add qword [rsi - 0x10], 8
mov rax, qword [rdi + 0x18]
test rax, rax
je 0x140003c33
mov rbx, qword [rax - 0x10]
lea rcx, [rax - 0x10]
lea rdx, [rbx - 8]
mov qword [rax - 0x10], rdx
cmp rdx, 7
jbe 0x140003cb0
mov rax, qword [rdi + 8]
mov qword [rdi + 0x18], rsi
test rax, rax
je 0x140003c56
mov rsi, qword [rax - 0x10]
lea rcx, [rax - 0x10]
lea rdx, [rsi - 8]
mov qword [rax - 0x10], rdx
cmp rdx, 7
jbe 0x140003c98
mov qword [rdi + 8], 0
lea r9, str.io.nim
mov rcx, rdi
lea r8, str.writeFile
mov qword [rsp + 0x20], 0x381
lea rdx, [0x14006a1e3]
call fcn.14000d7b0
nop
add rsp, 0x158
pop rbx
pop rsi
pop rdi
pop rbp
ret
mov rax, qword [0x140078a80]
mov rdx, rcx
lea rcx, [rax + 0x18]
call fcn.1400073d0
jmp 0x140003c56
mov rax, qword [0x140078a80]
mov rdx, rcx
lea rcx, [rax + 0x18]
call fcn.1400073d0
jmp 0x140003c33
mov rcx, qword [rbp - 0x138]
call fcn.140002c60
nop
nop word cs:[rax + rax]
mov r8d, 1
jmp fcn.140002de0