Function at 0x140018650
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x10], rbx
push rdi
sub rsp, 0xc0
mov rax, qword [0x14009f100]
xor rax, rsp
mov qword [rsp + 0xb0], rax
xor edi, edi
mov rdx, qword [rcx + 0x10]
movabs rax, 0x7ffffffffffffffe
sub rax, rdx
cmp rax, 1
jb 0x140018987
cmp qword [rcx + 0x18], 7
jbe 0x140018696
mov rcx, qword [rcx]
mov qword [rsp + 0x30], 1
lea rax, [0x14008eea4]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rdx
mov r9, rcx
lea rcx, [rsp + 0x40]
call fcn.14001d3b0
nop
lea rdx, [0x1400a67d8]
cmp qword [0x1400a67f0], 7
cmova rdx, qword [0x1400a67d8]
mov r8, qword [0x1400a67e8]
lea rcx, [rsp + 0x40]
call fcn.14001c1e0
xorps xmm0, xmm0
movups xmmword [rsp + 0x90], xmm0
xorps xmm1, xmm1
movdqu xmmword [rsp + 0xa0], xmm1
movups xmm0, xmmword [rax]
movups xmmword [rsp + 0x90], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rsp + 0xa0], xmm1
mov qword [rax + 0x10], rdi
mov qword [rax + 0x18], 7
mov word [rax], di
mov rdx, qword [rsp + 0x58]
cmp rdx, 7
jbe 0x140018765
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x40]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140018760
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14001898d
call fcn.140036bb4
movdqa xmm0, xmmword [0x140093280]
movdqu xmmword [rsp + 0x50], xmm0
mov word [rsp + 0x40], di
lea rcx, [rsp + 0x90]
cmp qword [rsp + 0xa8], 7
cmova rcx, qword [rsp + 0x90]
mov qword [rsp + 0x30], rdi
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 1
xor r9d, r9d
xor r8d, r8d
mov edx, 0x40000000
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x14001889a
lea rdx, [0x1400a6848]
cmp qword [0x1400a6860], 0xf
cmova rdx, qword [0x1400a6848]
mov qword [rsp + 0x20], rdi
lea r9, [rsp + 0x88]
mov r8d, dword [0x1400a6858]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x14001880d
mov eax, dword [rsp + 0x88]
cmp rax, qword [0x1400a6858]
je 0x14001888c
lea rcx, [rsp + 0x60]
call fcn.140024930
cmp qword [rax + 0x18], 7
jbe 0x140018821
mov rax, qword [rax]
lea rdx, [rsp + 0x90]
cmp qword [rsp + 0xa8], 7
cmova rdx, qword [rsp + 0x90]
mov r8, rax
lea rcx, str.____Failed_to_write_to_note_file:__ls._Error:__ls_n
call fcn.140001430
mov rdx, qword [rsp + 0x78]
cmp rdx, 7
jbe 0x14001888c
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x60]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140018887
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140018993
call fcn.140036bb4
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x140018921
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x50
je 0x140018921
lea rcx, [rsp + 0x60]
call fcn.140024930
cmp qword [rax + 0x18], 7
jbe 0x1400188b9
mov rax, qword [rax]
lea rdx, [rsp + 0x90]
cmp qword [rsp + 0xa8], 7
cmova rdx, qword [rsp + 0x90]
mov r8, rax
lea rcx, str.____Failed_to_create_note_file:__ls._Error:__ls_n
call fcn.140001430
mov rdx, qword [rsp + 0x78]
cmp rdx, 7
jbe 0x140018921
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x60]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14001891b
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140018999
call fcn.140036bb4
nop
mov rdx, qword [rsp + 0xa8]
cmp rdx, 7
jbe 0x140018966
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x90]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140018960
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14001899f
call fcn.140036bb4
nop
mov rcx, qword [rsp + 0xb0]
xor rcx, rsp
call fcn.140036840
mov rbx, qword [rsp + 0xd8]
add rsp, 0xc0
pop rdi
ret
call fcn.140001720
nop
call fcn.140046420
int3
call fcn.140046420
int3
call fcn.140046420
nop
call fcn.140046420
int3