Function at 0x1400015a6
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, [0x14000a00d]
mov rcx, rax
call sym.fopen
mov qword [rbp - 0x10], rax
cmp qword [rbp - 0x10], 0
jne 0x140001600
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 0x140001888
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 0x140001686
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 0x140001888
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 0x1400016f1
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 0x140001888
mov rax, qword [rbp - 0x10]
mov rcx, rax
call sym.fclose
mov dword [rbp - 4], 0
jmp 0x14000177e
mov rax, qword [rbp + 0x18]
lea rdx, [0x14000a057]
mov rcx, rax
call sym.strcmp
test eax, eax
jne 0x140001741
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 0x14000177a
mov rax, qword [rbp + 0x18]
lea rdx, [0x14000a05b]
mov rcx, rax
call sym.strcmp
test eax, eax
jne 0x14000177a
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 0x140001706
lea rax, [0x14000a05f]
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 0x1400017db
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 0x140001888
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 0x14000184d
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 0x140001888
mov rax, qword [rbp + 0x10]
mov rdx, rax
lea rax, str.temp.txt
mov rcx, rax
call sym.rename
test eax, eax
je 0x140001888
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