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, [0x1400701fb]
mov qword [rbp + 0x20], r8
test rbx, rbx
je 0x140003a0f
cmp qword [rbx], 0
jne 0x140003b70
call fcn.140002a50
lea rcx, [0x14007020b]
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 [0x140090fe0]
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 [0x140090fe0]
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 [0x140090fe0]
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.140010a40
cmp qword [rbp - 0x128], 0
je 0x140003aa2
call fcn.14000df30
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.14000d730
cmp qword [rbp + 0x20], 0
je 0x140003abb
movabs r8, 0x7fffffffffffffff
mov rcx, qword [rbp + 0x20]
xor edx, edx
call fcn.14000d590
jmp 0x140003abb
lea rcx, [rbx + 0x10]
jmp 0x140003a0f
mov rcx, qword [0x140090b60]
mov edx, 0x30
call fcn.14000bb80
mov ecx, 0xd
mov rdi, rax
mov rax, qword [0x140090a60]
mov qword [rdi], rax
lea rax, [0x1400701e3]
mov qword [rdi + 0x10], rax
test rbx, rbx
je 0x140003bba
mov rax, qword [rbx]
lea rcx, [rax + 0xd]
call fcn.14000bdc0
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, [0x1400701e3]
call fcn.14000d440
nop
add rsp, 0x158
pop rbx
pop rsi
pop rdi
pop rbp
ret
mov rax, qword [str._l_n_]
mov rdx, rcx
lea rcx, [rax + 0x18]
call fcn.140007130
jmp 0x140003c56
mov rax, qword [str._l_n_]
mov rdx, rcx
lea rcx, [rax + 0x18]
call fcn.140007130
jmp 0x140003c33
mov rcx, qword [rbp - 0x138]
call fcn.140002c60
nop
nop word cs:[rax + rax]