Function at 0x140008470
Capabilities:
Check if file exists
Delete directory
Delete file
Enumerate files on windows
Enumerate files recursively
Get file attributes
Set file attributes

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x390
mov rax, qword [0x140161f00]
xor rax, rsp
mov qword [rsp + 0x380], rax
mov rdi, rcx
test rcx, rcx
je 0x1400086de
inc rcx
lea rdx, [0x1401405a0]
call qword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x1400086de
movzx eax, byte [rdi]
cmp al, 0x5c
je 0x1400086de
test al, al
je 0x1400086de
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x1400086d7
not eax
test al, 0x10
jne 0x1400086de
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
cmp eax, 1
je 0x1400086d7
test eax, eax
jne 0x140008516
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x91
jne 0x1400086de
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_lstrlenA]
lea rcx, [0x1401405a4]
movsxd rbx, eax
call qword [sym.imp.KERNEL32.dll_lstrlenA]
lea ecx, [rax + 1]
add ecx, ebx
cmp ecx, 0x104
jg 0x1400086de
dec rbx
lea rcx, [rsp + 0x160]
mov r8, rdi
lea rdx, [0x1401405ac]
cmp byte [rbx + rdi], 0x5c
je 0x140008562
lea rdx, str._s.
call qword [sym.imp.USER32.dll_wsprintfA]
lea rdx, [rsp + 0x20]
lea rcx, [rsp + 0x160]
call qword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov rsi, rax
cmp rax, 0xffffffffffffffff
je 0x1400086de
mov rdx, rdi
lea rcx, [rsp + 0x160]
call qword [sym.imp.KERNEL32.dll_lstrcpyA]
cmp byte [rsp + rbx + 0x160], 0x5c
jne 0x1400085c0
cmp rbx, 0x104
jae 0x140008705
mov byte [rsp + rbx + 0x160], 0
nop dword [rax + rax]
lea rdx, [0x14014059c]
lea rcx, [rsp + 0x4c]
call qword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x1400086a0
lea rdx, [0x1401405bc]
lea rcx, [rsp + 0x4c]
call qword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x1400086a0
lea rcx, [0x140140591]
call qword [sym.imp.KERNEL32.dll_lstrlenA]
lea rcx, [rsp + 0x4c]
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_lstrlenA]
lea rcx, [rsp + 0x160]
add ebx, eax
call qword [sym.imp.KERNEL32.dll_lstrlenA]
add eax, ebx
cmp eax, 0x104
jge 0x1400086a0
lea r9, [rsp + 0x4c]
lea r8, [rsp + 0x160]
lea rdx, str._s_s
lea rcx, [rsp + 0x270]
call qword [sym.imp.USER32.dll_wsprintfA]
mov eax, dword [rsp + 0x20]
test al, 0x10
je 0x14000867b
test al, 1
je 0x14000866c
and eax, 0xfffffffe
lea rcx, [rsp + 0x270]
mov edx, eax
mov dword [rsp + 0x20], eax
call qword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea rcx, [rsp + 0x270]
call fcn.140008470
jmp 0x1400086a0
test al, 5
je 0x140008692
mov edx, 0x80
lea rcx, [rsp + 0x270]
call qword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea rcx, [rsp + 0x270]
call qword [sym.imp.KERNEL32.dll_DeleteFileA]
lea rdx, [rsp + 0x20]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x1400085c0
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, rsi
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_FindClose]
cmp ebx, 0x12
jne 0x1400086de
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
jmp 0x1400086e0
mov eax, 1
jmp 0x1400086e0
xor eax, eax
mov rcx, qword [rsp + 0x380]
xor rcx, rsp
call fcn.140108f90
lea r11, [rsp + 0x390]
mov rbx, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rsp, r11
pop rdi
ret
call fcn.140109250
int3