Function at 0x140027c50
Capabilities:
Check if file exists
Copy file
Get common file path
Get file attributes
Move file

Disassembly:
mov rax, rsp
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x50
mov qword [rax - 0x48], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov r14, r8
mov r13, rdx
mov r15, rcx
lea rdx, [0x14003ef00]
mov ecx, 0x28
call fcn.14002c8c0
mov rsi, rax
mov qword [rsp + 0x90], rax
or rbx, 0xffffffffffffffff
xor ebp, ebp
test rax, rax
je 0x140027cbe
mov r9, qword [r15 + 0x60]
lea rax, [0x14003d648]
mov qword [rsi], rax
mov qword [rsi + 0x10], rbp
mov qword [rsi + 0x18], rbp
mov qword [rsi + 0x20], rbx
mov qword [rsi + 8], r9
jmp 0x140027cc1
mov rsi, rbp
mov rcx, r14
call qword [sym.imp.OLEAUT32.dll_SysReAllocString]
mov rdi, rax
mov qword [rsp + 0x90], rax
mov edx, 0x5c
mov rcx, rax
call qword [sym.imp.msvcrt.dll_wcsrchr]
mov r12, rax
mov word [rax + 2], bp
mov rcx, rdi
call fcn.140021ccc
mov rcx, rdi
call fcn.140021f30
mov bpl, al
xor ecx, ecx
cmp byte [0x14004b35e], cl
je 0x140027d18
mov rdx, r14
lea rcx, str.setting_up_restore_file__s_n
call sub.msvcrt.dll_wprintf
xor ecx, ecx
mov eax, dword [r15 + 0x58]
cmp eax, 5
jne 0x140027e49
mov word [r12], cx
xor r12d, r12d
inc rbx
cmp word [rdi + rbx*2], r12w
jne 0x140027d2d
lea edx, [rbx + 0x104]
xor ecx, ecx
call qword [sym.imp.OLEAUT32.dll_SysReAllocStringLen]
mov rbx, rax
mov qword [rsp + 0xa8], rax
mov r9, rax
xor r8d, r8d
lea rdx, str.TBCK
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
jne 0x140027da3
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp byte [0x14004b35b], r12b
jne 0x140027d7e
test bpl, bpl
jne 0x140027da3
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
cmovle ecx, eax
mov r9d, eax
mov r8, rdi
lea rdx, str.GetTempFileName_in_directory__s_failed_due_to_error__d._n
call fcn.14001b970
jmp 0x140027e28
xor r8d, r8d
mov rdx, rbx
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
jne 0x140027dd9
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp byte [0x14004b35b], r12b
jne 0x140027dca
test bpl, bpl
jne 0x140027dd9
mov r9, rbx
mov r8, r13
lea rdx, str.CopyFile_from__s_to__s_failed_due_to_error__d._n
jmp 0x140027e10
mov r8d, 5
mov rdx, r14
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
jne 0x140027e36
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp byte [0x14004b35b], r12b
jne 0x140027e03
test bpl, bpl
jne 0x140027e36
mov r9, r14
mov r8, rbx
lea rdx, str.MoveFileEx_from__s_to__s_failed_due_to_error__d._n
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
mov dword [rsp + 0x20], eax
cmovle ecx, eax
call fcn.14001b970
nop
mov rcx, rbx
call qword [sym.imp.OLEAUT32.dll_SysStringLen]
jmp 0x140027f62
mov byte [r15 + 0x5c], 1
mov rcx, rbx
call qword [sym.imp.OLEAUT32.dll_SysStringLen]
jmp 0x140027f5b
cmp eax, 1
jne 0x140027e86
mov qword [rsp + 0x30], rcx
mov dword [rsp + 0x28], ecx
mov dword [rsp + 0x20], eax
xor r9d, r9d
xor r8d, r8d
mov edx, 0x40000000
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r12, rax
cmp rax, rbx
jne 0x140027f29
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x50
jmp 0x140027ef5
cmp eax, 5
je 0x140027e95
cmp eax, 1
jle 0x140027e95
cmp eax, 9
jl 0x140027ea3
cmp dword [r15 + 0x98], 2
jne 0x140027f5b
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
xor ecx, ecx
cmp eax, 0xffffffff
cmovne ecx, eax
and qword [rsp + 0x30], 0
mov dword [rsp + 0x28], ecx
mov dword [rsp + 0x20], 2
xor r9d, r9d
xor r8d, r8d
mov edx, 0x40000000
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r12, rax
cmp rax, rbx
jne 0x140027f29
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [rax - 0x20]
cmp ecx, 1
jbe 0x140027f24
cmp eax, 0x4c8
je 0x140027f24
cmp byte [0x14004b35b], 0
jne 0x140027f05
test bpl, bpl
jne 0x140027f29
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
cmovle ecx, eax
mov r8d, eax
lea rdx, str.CreateFile_failed_due_to_error__d._n
call fcn.14001b970
jmp 0x140027f62
xor bpl, bpl
jmp 0x140027f62
mov qword [rsi + 0x20], r12
mov rcx, qword [rsi + 0x18]
call qword [sym.imp.OLEAUT32.dll_SysStringLen]
mov rcx, r14
call qword [sym.imp.OLEAUT32.dll_SysReAllocString]
mov qword [rsi + 0x18], rax
mov rcx, qword [rsi + 0x10]
call qword [sym.imp.OLEAUT32.dll_SysStringLen]
mov rcx, r13
call qword [sym.imp.OLEAUT32.dll_SysReAllocString]
mov qword [rsi + 0x10], rax
mov qword [r15 + 0x60], rsi
mov bpl, 1
mov rcx, rdi
call qword [sym.imp.OLEAUT32.dll_SysStringLen]
mov al, bpl
mov rbx, qword [rsp + 0x98]
add rsp, 0x50
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret