Function at 0x1400038f0
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, [0x1400631db]
mov qword [rbp + 0x20], r8
test rbx, rbx
je 0x14000391f
cmp qword [rbx], 0
jne 0x140003a80
call fcn.1400029a0
lea rcx, [0x1400631eb]
mov rsi, rax
call fcn.1400029a0
mov rcx, rsi
mov rdx, rax
call qword [sym.imp.msvcrt.dll__wfopen]
mov qword [rbp - 0x138], rax
test rax, rax
je 0x140003a90
mov rax, qword [str._bx_b_]
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 0x1400039c0
mov rax, qword [str._bx_b_]
mov rcx, qword [rbp - 0x138]
mov rdx, qword [rax]
mov rdx, qword [rdx]
mov qword [rax], rdx
test rcx, rcx
je 0x140003a20
call sub.msvcrt.dll_fclose
cmp qword [rbp - 0x128], 0
jne 0x140003a20
add rsp, 0x158
pop rbx
pop rsi
pop rdi
pop rbp
ret
cmp qword [rbp + 0x20], 0
jle 0x140003a48
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 0x140003bd8
mov rax, qword [str._bx_b_]
mov rcx, qword [rbp - 0x138]
mov rdx, qword [rax]
mov rdx, qword [rdx]
mov qword [rax], rdx
test rcx, rcx
jne 0x1400039a3
cmp qword [rbp - 0x128], 0
je 0x1400039b2
nop dword [rax]
call fcn.140011590
cmp qword [rbp - 0x128], 0
je 0x1400039b2
call fcn.14000ea10
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.14000e210
cmp qword [rbp + 0x20], 0
je 0x1400039cb
movabs r8, 0x7fffffffffffffff
mov rcx, qword [rbp + 0x20]
xor edx, edx
call fcn.14000e070
jmp 0x1400039cb
lea rcx, [rbx + 0x10]
jmp 0x14000391f
mov rcx, qword [str.__b_]
mov edx, 0x30
call fcn.14000b930
mov ecx, 0xd
mov rdi, rax
mov rax, qword [0x14006fae0]
mov qword [rdi], rax
lea rax, [0x1400631c3]
mov qword [rdi + 0x10], rax
test rbx, rbx
je 0x140003aca
mov rax, qword [rbx]
lea rcx, [rax + 0xd]
call fcn.14000bb70
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 0x140003b1f
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 0x140003b43
mov rbx, qword [rax - 0x10]
lea rcx, [rax - 0x10]
lea rdx, [rbx - 8]
mov qword [rax - 0x10], rdx
cmp rdx, 7
jbe 0x140003bc0
mov rax, qword [rdi + 8]
mov qword [rdi + 0x18], rsi
test rax, rax
je 0x140003b66
mov rsi, qword [rax - 0x10]
lea rcx, [rax - 0x10]
lea rdx, [rsi - 8]
mov qword [rax - 0x10], rdx
cmp rdx, 7
jbe 0x140003ba8
mov qword [rdi + 8], 0
lea r9, str.io.nim
mov rcx, rdi
lea r8, str.writeFile
mov qword [rsp + 0x20], 0x381
lea rdx, [0x1400631c3]
call fcn.14000df20
nop
add rsp, 0x158
pop rbx
pop rsi
pop rdi
pop rbp
ret
mov rax, qword [str._L_b_]
mov rdx, rcx
lea rcx, [rax + 0x18]
call fcn.140007040
jmp 0x140003b66
mov rax, qword [str._L_b_]
mov rdx, rcx
lea rcx, [rax + 0x18]
call fcn.140007040
jmp 0x140003b43
mov rcx, qword [rbp - 0x138]
call fcn.140002b70
nop
nop word cs:[rax + rax]