Function at 0x1400017fe
Capabilities:
Delete file
Move file
Read file on windows
Write file on windows

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x50
mov qword [rbp + 0x10], rcx
mov qword [rbp + 0x18], rdx
mov rax, qword [rbp + 0x10]
lea rdx, [0x14000a050]
mov rcx, rax
call sym.fopen
mov qword [rbp - 0x10], rax
cmp qword [rbp - 0x10], 0
jne 0x140001858
mov ecx, 2
mov rax, qword [sym.__acrt_iob_func]
call rax
mov rcx, rax
mov rax, qword [rbp + 0x10]
mov r8, rax
lea rax, str.Error_opening_file:__s_n
mov rdx, rax
call sym.fprintf
jmp 0x140001ae0
mov rax, qword [rbp - 0x10]
mov r8d, 2
mov edx, 0
mov rcx, rax
call sym.fseek
mov rax, qword [rbp - 0x10]
mov rcx, rax
call sym.ftell
mov dword [rbp - 0x14], eax
mov rax, qword [rbp - 0x10]
mov r8d, 0
mov edx, 0
mov rcx, rax
call sym.fseek
mov eax, dword [rbp - 0x14]
cdqe
mov rcx, rax
call sym.malloc
mov qword [rbp - 0x20], rax
cmp qword [rbp - 0x20], 0
jne 0x1400018de
mov ecx, 2
mov rax, qword [sym.__acrt_iob_func]
call rax
mov rcx, rax
lea rax, str.Error_allocating_memory._n
mov rdx, rax
call sym.fprintf
mov rax, qword [rbp - 0x10]
mov rcx, rax
call sym.fclose
jmp 0x140001ae0
mov eax, dword [rbp - 0x14]
movsxd rdx, eax
mov rcx, qword [rbp - 0x10]
mov rax, qword [rbp - 0x20]
mov r9, rcx
mov r8, rdx
mov edx, 1
mov rcx, rax
call sym.fread
mov rdx, rax
mov eax, dword [rbp - 0x14]
cdqe
cmp rdx, rax
je 0x140001949
mov ecx, 2
mov rax, qword [sym.__acrt_iob_func]
call rax
mov rcx, rax
lea rax, str.Error_reading_file._n
mov rdx, rax
call sym.fprintf
mov rax, qword [rbp - 0x10]
mov rcx, rax
call sym.fclose
mov rax, qword [rbp - 0x20]
mov rcx, rax
call sym.free
jmp 0x140001ae0
mov rax, qword [rbp - 0x10]
mov rcx, rax
call sym.fclose
mov dword [rbp - 4], 0
jmp 0x1400019d6
mov rax, qword [rbp + 0x18]
lea rdx, [0x14000a09a]
mov rcx, rax
call sym.strcmp
test eax, eax
jne 0x140001999
mov eax, dword [rbp - 4]
cdqe
mov rdx, qword [rbp - 0x20]
add rax, rdx
movzx eax, byte [rax]
lea ecx, [rax + 0x50]
mov eax, dword [rbp - 4]
cdqe
mov rdx, qword [rbp - 0x20]
add rax, rdx
mov edx, ecx
mov byte [rax], dl
jmp 0x1400019d2
mov rax, qword [rbp + 0x18]
lea rdx, [0x14000a09e]
mov rcx, rax
call sym.strcmp
test eax, eax
jne 0x1400019d2
mov eax, dword [rbp - 4]
cdqe
mov rdx, qword [rbp - 0x20]
add rax, rdx
movzx eax, byte [rax]
lea ecx, [rax - 0x50]
mov eax, dword [rbp - 4]
cdqe
mov rdx, qword [rbp - 0x20]
add rax, rdx
mov edx, ecx
mov byte [rax], dl
add dword [rbp - 4], 1
mov eax, dword [rbp - 4]
cmp eax, dword [rbp - 0x14]
jl 0x14000195e
lea rax, [0x14000a0a2]
mov rdx, rax
lea rax, str.temp.txt
mov rcx, rax
call sym.fopen
mov qword [rbp - 0x28], rax
cmp qword [rbp - 0x28], 0
jne 0x140001a33
mov ecx, 2
mov rax, qword [sym.__acrt_iob_func]
call rax
mov rcx, rax
lea rax, str.Error_creating_temporary_file._n
mov rdx, rax
call sym.fprintf
mov rax, qword [rbp - 0x20]
mov rcx, rax
call sym.free
jmp 0x140001ae0
mov eax, dword [rbp - 0x14]
movsxd rdx, eax
mov rcx, qword [rbp - 0x28]
mov rax, qword [rbp - 0x20]
mov r9, rcx
mov r8, rdx
mov edx, 1
mov rcx, rax
call sym.fwrite
mov rax, qword [rbp - 0x20]
mov rcx, rax
call sym.free
mov rax, qword [rbp - 0x28]
mov rcx, rax
call sym.fclose
mov rax, qword [rbp + 0x10]
mov rcx, rax
call sym.remove
test eax, eax
je 0x140001aa5
mov ecx, 2
mov rax, qword [sym.__acrt_iob_func]
call rax
mov rcx, rax
mov rax, qword [rbp + 0x10]
mov r8, rax
lea rax, str.Error_removing_original_file:__s_n
mov rdx, rax
call sym.fprintf
jmp 0x140001ae0
mov rax, qword [rbp + 0x10]
mov rdx, rax
lea rax, str.temp.txt
mov rcx, rax
call sym.rename
test eax, eax
je 0x140001ae0
mov ecx, 2
mov rax, qword [sym.__acrt_iob_func]
call rax
mov rcx, rax
lea rax, str.Error_renaming_temporary_file:_temp.txt_n
mov rdx, rax
call sym.fprintf
nop
add rsp, 0x50
pop rbp
ret