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

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x98
lea rbx, [rsp + 0x50]
mov r15, rcx
mov rcx, rbx
call fcn.004b0260
lea rcx, [rbx + 0x28]
call fcn.00477f50
mov rdx, qword [r15]
mov rcx, rbx
call fcn.004b02c0
test al, al
je 0x4af4db
mov eax, dword [rsp + 0x70]
test al, 0x10
je 0x4af4d0
test ah, 4
mov rcx, qword [rsp + 0x78]
jne 0x4af51b
test rcx, rcx
je 0x4af393
call fcn.007da030
lea rdi, [rsp + 0x20]
mov rdx, r15
mov rcx, rdi
call fcn.00478040
mov r8d, dword [rsp + 0x2c]
mov eax, dword [rsp + 0x28]
cmp r8d, eax
je 0x4af599
mov rdx, qword [rsp + 0x20]
lea r14d, [rax + 1]
xor r11d, r11d
mov r10d, 0x5c
mov rsi, r14
add r14, r14
cmp r8d, esi
lea rcx, [rdx + r14]
mov word [rdx + rax*2], r10w
mov eax, esi
mov word [rcx], r11w
mov dword [rsp + 0x28], esi
je 0x4af5af
add eax, 1
mov r8d, 0x2a
xor r9d, r9d
mov word [rcx], r8w
lea r12, [rsp + 0x30]
mov ecx, eax
mov word [rdx + rcx*2], r9w
lea rcx, [r12 + 8]
mov rdx, rdi
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x30], 0xffffffffffffffff
call fcn.00478040
mov rcx, rbx
call fcn.004b0260
lea rcx, [rbx + 0x28]
call fcn.00477f50
lea r13, [rbx + 0x28]
mov rdx, rbx
mov rcx, r12
call fcn.004b0e30
test al, al
je 0x4af4f0
cmp dword [rsp + 0x28], esi
jbe 0x4af45d
mov rax, qword [rsp + 0x20]
xor edx, edx
mov dword [rsp + 0x28], esi
mov word [rax + r14], dx
mov rdx, r13
mov rcx, rdi
call fcn.00478550
test byte [rsp + 0x70], 0x10
je 0x4af550
mov rcx, rdi
call fcn.004af330
test al, al
jne 0x4af434
nop
mov rcx, qword [rsp + 0x78]
test rcx, rcx
je 0x4af490
call fcn.007da030
nop
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x4af49f
call fcn.007da030
mov rcx, r12
call fcn.004aff70
mov rcx, qword [rsp + 0x20]
test rcx, rcx
jne 0x4af4e5
xor eax, eax
add rsp, 0x98
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov ecx, 0x10b
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rcx, qword [rsp + 0x78]
test rcx, rcx
je 0x4af4b1
call fcn.007da030
jmp 0x4af4b1
mov rcx, qword [rsp + 0x78]
test rcx, rcx
je 0x4af4ff
call fcn.007da030
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x4af50e
call fcn.007da030
mov rcx, r12
call fcn.004aff70
mov rcx, qword [rsp + 0x20]
test rcx, rcx
je 0x4af525
call fcn.007da030
xor edx, edx
mov rcx, qword [r15]
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
je 0x4af4b3
mov rcx, qword [r15]
call qword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
setne al
jmp 0x4af4b3
mov rbp, qword [rsp + 0x20]
mov rcx, rbp
call sub.KERNEL32.dll_GetFileAttributesW
cmp eax, 0xffffffff
je 0x4af56c
mov edx, eax
and edx, 0x11
cmp edx, 1
je 0x4af582
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
je 0x4af480
jmp 0x4af434
and eax, 0xfffffffe
mov rcx, rbp
mov edx, eax
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
jne 0x4af56c
jmp 0x4af480
mov rcx, rdi
call fcn.00477b00
mov eax, dword [rsp + 0x28]
mov r8d, dword [rsp + 0x2c]
jmp 0x4af3b5
mov rcx, rdi
call fcn.00477b00
mov ecx, dword [rsp + 0x28]
mov rdx, qword [rsp + 0x20]
mov rax, rcx
lea rcx, [rdx + rcx*2]
jmp 0x4af3e9