Function at 0x140020a10
Capabilities:
Check if file exists
Delete file
Get file attributes
Set file attributes

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x200]
sub rsp, 0x300
mov qword [rbp - 0x70], 0xfffffffffffffffe
mov qword [rsp + 0x358], rbx
mov rax, qword [0x14028e6b0]
xor rax, rsp
mov qword [rbp + 0x1f0], rax
mov byte [rsp + 0x31], r9b
mov rbx, r8
mov rdi, rdx
mov qword [rsp + 0x50], rdx
mov rsi, rcx
mov qword [rsp + 0x58], rcx
mov r13, qword [rbp + 0x260]
mov qword [rsp + 0x60], r13
lea rax, [0x1402a3240]
mov qword [rbp - 0x68], rax
mov rcx, rax
call fcn.1401469f8
test eax, eax
je 0x140020a8f
mov ecx, eax
call fcn.140146b60
nop
mov byte [rsp + 0x30], 0
xor r15d, r15d
mov r12d, r15d
mov dword [rsp + 0x3c], r15d
xor r9d, r9d
lea r8, [rbp - 0x20]
mov edx, 0x104
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFullPathNameW]
lea edx, [r15 + 0x7e]
lea rcx, [rbp - 0x20]
call fcn.14018805c
test rax, rax
je 0x140020ada
mov r8d, 0x104
lea rdx, [rbp - 0x20]
lea rcx, [rbp - 0x20]
call qword [sym.imp.KERNEL32.dll_GetLongPathNameW]
lea rcx, [rbp - 0x20]
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x140020b1a
lea rcx, [rbp - 0x20]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov r12d, eax
mov dword [rsp + 0x3c], eax
cmp eax, 0xffffffff
je 0x140020b1a
mov edx, eax
and edx, 6
setne byte [rsp + 0x30]
test edx, edx
je 0x140020b1a
mov edx, eax
and edx, 0xfffffff9
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov ebx, dword [rdi + 0x4c]
cmp ebx, 4
cmove ebx, r15d
lea rcx, [rsp + 0x68]
call fcn.14012e3a0
nop
mov edx, ebx
lea rcx, [rsp + 0x68]
call fcn.14012ecc0
mov eax, dword [rdi + 0x50]
mov dword [rsp + 0x34], eax
lea r8, [0x1401d49f4]
lea rdx, [rbp - 0x20]
lea rcx, [rsp + 0x68]
call fcn.14012eac0
test rax, rax
je 0x140020e7f
mov r9, qword [rdi + 0x18]
xor r8d, r8d
mov edx, 0x936
mov rcx, qword [rsi + 8]
call fcn.14000f5d0
xor r9d, r9d
xor r8d, r8d
mov edx, 0x7d6
mov rcx, qword [rsi + 8]
call fcn.14000f5d0
mov r14, rax
xor r9d, r9d
xor r8d, r8d
mov edx, 0x9d8
mov rcx, qword [rsi + 8]
call fcn.14000f5d0
mov rbx, rax
mov qword [rsp + 0x48], rax
cmp dword [rsp + 0x34], 0xffffffff
jne 0x140020bd4
movsxd r8, r14d
mov rdx, rax
lea rcx, [rsp + 0x68]
call fcn.14012eaf0
mov r15, rax
test r14d, r14d
jne 0x140020cb3
lea r15d, [r14 + 1]
jmp 0x140020cb3
call fcn.14000cd40
mov qword [rsp + 0x40], rax
xor eax, eax
mov r13d, eax
test r14d, r14d
jle 0x140020ca5
mov ecx, 0x20004
mov rdi, rbx
mov rsi, qword [rsp + 0x40]
mov r12d, dword [rsp + 0x34]
nop
mov ebx, r14d
sub ebx, r13d
cmp ebx, ecx
cmovg ebx, ecx
mov dword [rsp + 0x40], eax
mov dword [rsp + 0x38], eax
mov dword [rsp + 0x34], eax
movsxd rdx, r13d
add rdx, rdi
lea rax, [rsp + 0x38]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x34]
mov qword [rsp + 0x20], rax
mov r9d, ebx
mov r8d, 0xfde9
mov rcx, rsi
call fcn.140028ba0
lea rcx, [rsp + 0x40]
mov qword [rsp + 0x20], rcx
mov r9d, dword [rsp + 0x34]
mov r8d, r12d
mov rdx, rax
mov rcx, rsi
call fcn.14002d430
sub ebx, dword [rsp + 0x38]
movsxd r8, dword [rsp + 0x40]
mov rdx, rax
lea rcx, [rsp + 0x68]
call fcn.14012eaf0
mov r15, rax
add r13d, ebx
cmp r13d, r14d
mov eax, 0
mov ecx, 0x20004
jl 0x140020c00
mov rdi, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x58]
mov r12d, dword [rsp + 0x3c]
mov rbx, qword [rsp + 0x48]
test r14d, r14d
mov eax, 1
cmove r15, rax
mov r13, qword [rsp + 0x60]
movsxd r8, r14d
mov rdx, rbx
mov rcx, rsi
call fcn.14001e670
mov ebx, eax
lea rcx, [rsp + 0x68]
call fcn.14012ea90
cmp r15, 1
je 0x140020d0b
mov r9, qword [rsi + 0x10]
xor r8d, r8d
mov edx, 0x936
mov rcx, qword [rsi + 8]
call fcn.14000f5d0
test r13, r13
je 0x140020e7f
mov r8d, 0x3b
lea rdx, str.Failed_to_save_file._nNot_enough_space_on_disk_to_save_file_
mov rcx, r13
call fcn.140006f10
jmp 0x140020e7f
cmp byte [rsp + 0x30], 0
je 0x140020d1f
mov edx, r12d
lea rcx, [rbp - 0x20]
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
cmp byte [rsp + 0x31], 0
je 0x140020d42
mov r9, qword [rsi + 0x10]
xor r8d, r8d
mov edx, 0x936
mov rcx, qword [rsi + 8]
call fcn.14000f5d0
mov bl, 1
jmp 0x140020e81
mov r8d, ebx
lea rdx, [rbp - 0x20]
mov rcx, rdi
call fcn.140020f30
mov byte [rdi + 0x48], 0
cmp byte [rdi + 8], 0
je 0x140020d6f
mov rcx, qword [rdi]
mov r8d, 2
mov rdx, rdi
mov rcx, qword [rcx]
call fcn.14008a270
mov eax, 1
mov dword [rdi + 0xa0], eax
cmp byte [rdi + 8], 0
je 0x140020d92
mov rcx, qword [rdi]
lea r8d, [rax + 0x1f]
mov rdx, rdi
mov rcx, qword [rcx]
call fcn.14008a270
mov rcx, rdi
call fcn.14001dc10
xor r9d, r9d
xor r8d, r8d
mov edx, 0x7de
mov rcx, qword [rsi + 8]
call fcn.14000f5d0
mov r9, qword [rsi + 0x10]
xor r8d, r8d
mov edx, 0x936
mov rcx, qword [rsi + 8]
call fcn.14000f5d0
lea rdx, [rbp - 0x40]
mov rcx, rdi
call fcn.14001ef50
nop
xor ebx, ebx
cmp qword [rbp - 0x30], rbx
je 0x140020e51
mov qword [rbp - 0x50], rbx
mov qword [rbp - 0x48], rbx
mov r8d, 7
mov qword [rbp - 0x48], r8
mov qword [rbp - 0x50], rbx
mov word [rbp - 0x60], bx
lea rcx, [rdi + 0xe0]
lea rax, [rbp - 0x60]
cmp rcx, rax
je 0x140020e16
or r9, 0xffffffffffffffff
xor r8d, r8d
lea rdx, [rbp - 0x60]
call fcn.140006dd0
mov r8, qword [rbp - 0x48]
cmp r8, 8
jb 0x140020e2c
inc r8
mov rdx, qword [rbp - 0x60]
lea rcx, [rbp - 0x60]
call fcn.140007680
mov qword [rbp - 0x48], 7
mov qword [rbp - 0x50], rbx
mov word [rbp - 0x60], bx
lea rcx, [rbp - 0x40]
cmp qword [rbp - 0x28], 8
cmovae rcx, qword [rbp - 0x40]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
nop
mov r8, qword [rbp - 0x28]
cmp r8, 8
jb 0x140020e6b
inc r8
mov rdx, qword [rbp - 0x40]
lea rcx, [rbp - 0x40]
call fcn.140007680
mov qword [rbp - 0x28], 7
mov qword [rbp - 0x30], rbx
mov word [rbp - 0x40], bx
mov bl, 1
jmp 0x140020e81
xor bl, bl
lea rcx, [rsp + 0x68]
call fcn.14012e3f0
nop
lea rcx, [0x1402a3240]
call fcn.140146a58
test eax, eax
je 0x140020ea3
mov ecx, eax
call fcn.140146b60
movzx eax, bl
mov rcx, qword [rbp + 0x1f0]
xor rcx, rsp
call fcn.140168660
mov rbx, qword [rsp + 0x358]
add rsp, 0x300
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret