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

Disassembly:
mov rax, rsp
push rbp
push rdi
push r12
lea rbp, [rax - 0x358]
sub rsp, 0x440
mov qword [rsp + 0x28], 0xfffffffffffffffe
mov qword [rax + 0x18], rbx
mov qword [rax + 0x20], rsi
mov rax, qword [0x1800cb660]
xor rax, rsp
mov qword [rbp + 0x330], rax
mov rbx, rdx
mov r12, rcx
xor edi, edi
test rcx, rcx
je 0x180012881
test rdx, rdx
je 0x180012881
mov rcx, rdx
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov esi, eax
mov rdx, rbx
lea rcx, [rsp + 0x20]
call fcn.180027390
nop
lea rdx, str._tmp
lea rcx, [rsp + 0x20]
call fcn.180025b40
mov rcx, qword [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
mov rdx, qword [rsp + 0x20]
mov rcx, r12
call fcn.180012510
mov r12d, eax
test eax, eax
je 0x180012872
lea r8d, [rdi + 1]
mov rdx, rbx
mov rcx, qword [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_MoveFileExW]
mov r12d, eax
test eax, eax
jne 0x180012863
cmp esi, 0xffffffff
je 0x180012848
test sil, 1
je 0x180012728
and esi, 0xfffffffe
mov edx, esi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov word [rsp + 0x30], di
xor edx, edx
mov r8d, 0x3fe
lea rcx, [rsp + 0x32]
call fcn.180037550
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov r9d, eax
mov r8, rbx
lea rdx, [0x1800a6d88]
lea rcx, [rsp + 0x30]
call fcn.180036368
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x1800127cf
nop dword [rax]
mov ecx, 1
call qword [sym.imp.KERNEL32.dll_Sleep]
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov r9d, eax
mov r8, rbx
lea rdx, [0x1800a6d88]
lea rcx, [rsp + 0x30]
call fcn.180036368
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
inc edi
cmp edi, 0xa
jge 0x1800127b1
cmp eax, 0xffffffff
jne 0x180012770
jmp 0x1800127cf
mov rcx, qword [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
nop
lea rcx, [rsp + 0x20]
call fcn.180025870
mov eax, r12d
jmp 0x180012883
lea rdx, [rsp + 0x30]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_MoveFileW]
mov r8d, 1
mov rdx, rbx
mov rcx, qword [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_MoveFileExW]
mov edi, eax
test eax, eax
jne 0x18001282a
lea r8d, [rax + 5]
mov rdx, rbx
mov rcx, qword [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_MoveFileExW]
mov edi, eax
test eax, eax
jne 0x18001282a
mov rdx, rbx
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_MoveFileW]
mov rcx, qword [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x18001283c
xor edx, edx
lea r8d, [rdx + 4]
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_MoveFileExW]
nop
lea rcx, [rsp + 0x20]
call fcn.180025870
jmp 0x180012881
mov rcx, qword [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
nop
lea rcx, [rsp + 0x20]
call fcn.180025870
mov eax, r12d
jmp 0x180012883
lea rcx, [rsp + 0x20]
call fcn.180025870
mov eax, r12d
jmp 0x180012883
lea rcx, [rsp + 0x20]
call fcn.180025870
mov eax, r12d
jmp 0x180012883
mov eax, edi
mov rcx, qword [rbp + 0x330]
xor rcx, rsp
call fcn.1800356a0
lea r11, [rsp + 0x440]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r12
pop rdi
pop rbp
ret