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

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
sub rsp, 0xb0
mov qword [rsp + 0x48], 0xfffffffffffffffe
mov rax, qword [0x180101090]
xor rax, rsp
mov qword [rsp + 0xa0], rax
mov r14, r9
mov r13, r8
mov r12, rdx
mov rdi, rcx
mov rbp, qword [rsp + 0x110]
test rcx, rcx
je 0x18005a8de
test rdx, rdx
je 0x18005a8de
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x18005a6bf
mov eax, 4
jmp 0x18005a8e3
mov rcx, rdi
call fcn.180004b80
test eax, eax
jne 0x18005a6d5
mov eax, 0xd
jmp 0x18005a8e3
xor esi, esi
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
lea ebx, [rsi + 1]
cmp eax, 0xffffffff
je 0x18005a70f
and eax, ebx
je 0x18005a70f
mov r8d, ebx
xor edx, edx
mov rcx, rdi
call fcn.180051160
test eax, eax
jne 0x18005a70d
lea eax, [rsi + 5]
jmp 0x18005a8e3
mov esi, ebx
and qword [rsp + 0x30], 0
and dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 3
xor r9d, r9d
xor r8d, r8d
mov edx, 0x40000000
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbx, rax
test rax, rax
je 0x18005a8b0
cmp rax, 0xffffffffffffffff
je 0x18005a8b0
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rdx, rdi
lea rcx, [rsp + 0x78]
call fcn.180059f4c
nop
lea rdx, [rsp + 0x80]
cmp qword [rsp + 0x98], 8
cmovae rdx, qword [rsp + 0x80]
mov qword [rsp + 0x28], r14
mov qword [rsp + 0x20], rbp
mov r9, r13
mov r8, r12
mov rcx, rdi
call fcn.18005a3ac
mov ebx, eax
test eax, eax
je 0x18005a7d7
cmp qword [rbp + 0x18], 0
jne 0x18005a7d7
xor r8d, r8d
mov edx, eax
lea rcx, [rsp + 0x50]
call fcn.180058568
nop
or r9, 0xffffffffffffffff
xor r8d, r8d
mov rdx, rax
mov rcx, rbp
call fcn.18000db80
nop
cmp qword [rsp + 0x70], 8
jb 0x18005a7d7
mov rcx, qword [rsp + 0x58]
call fcn.18009a864
test ebx, ebx
jne 0x18005a860
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov ebp, eax
lea rcx, [rsp + 0x80]
cmp qword [rsp + 0x98], 8
cmovae rcx, qword [rsp + 0x80]
lea r8d, [rbx + 1]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
jne 0x18005a850
mov ecx, 0x7d0
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rcx, [rsp + 0x80]
cmp qword [rsp + 0x98], 8
cmovae rcx, qword [rsp + 0x80]
lea r8d, [rbx + 1]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
jne 0x18005a850
lea ebx, [rax + 8]
jmp 0x18005a860
cmp ebp, 0xffffffff
je 0x18005a860
mov edx, ebp
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea rcx, [rsp + 0x80]
cmp qword [rsp + 0x98], 8
cmovae rcx, qword [rsp + 0x80]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test esi, esi
je 0x18005a894
xor r8d, r8d
lea edx, [r8 + 1]
mov rcx, rdi
call fcn.180051160
nop
cmp qword [rsp + 0x98], 8
jb 0x18005a8ac
mov rcx, qword [rsp + 0x80]
call fcn.18009a864
mov eax, ebx
jmp 0x18005a8e3
test esi, esi
je 0x18005a8c3
xor r8d, r8d
lea edx, [r8 + 1]
mov rcx, rdi
call fcn.180051160
cmp rbx, 0xffffffffffffffff
je 0x18005a8d7
test rbx, rbx
je 0x18005a8d7
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 5
jmp 0x18005a8e3
mov eax, 3
mov rcx, qword [rsp + 0xa0]
xor rcx, rsp
call fcn.180099fe0
add rsp, 0xb0
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret