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

Disassembly:
push rdi
sub rsp, 0x690
mov rdi, rcx
test rcx, rcx
jne 0x180005bd7
mov ecx, 0x57
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
add rsp, 0x690
pop rdi
ret
movzx eax, word [rcx]
cmp ax, 0x5c
je 0x180005bc1
test ax, ax
je 0x180005bc1
cmp ax, 0x2e
je 0x180005bc1
lea rdx, [0x1800441b0]
call qword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x180005bc1
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x180005bcc
not eax
test al, 0x10
jne 0x180005bc1
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
cmp eax, 1
jne 0x180005c2f
add rsp, 0x690
pop rdi
ret
test eax, eax
jne 0x180005c40
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x91
jne 0x180005bcc
mov rcx, rdi
mov qword [rsp + 0x6a0], rbx
call qword [sym.imp.KERNEL32.dll_lstrlenW]
lea rcx, str..
movsxd rbx, eax
call qword [sym.imp.KERNEL32.dll_lstrlenW]
lea ecx, [rax + 1]
add ecx, ebx
cmp ecx, 0x104
jle 0x180005c81
xor eax, eax
mov rbx, qword [rsp + 0x6a0]
add rsp, 0x690
pop rdi
ret
lea rbx, [rbx*2 - 2]
mov qword [rsp + 0x6a8], rsi
mov r8, rdi
cmp word [rbx + rdi], 0x5c
lea rcx, [rsp + 0x270]
lea rdx, [0x1800441c8]
je 0x180005cb1
lea rdx, str._s.
call qword [sym.imp.USER32.dll_wsprintfW]
lea rdx, [rsp + 0x20]
lea rcx, [rsp + 0x270]
call qword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov rsi, rax
cmp rax, 0xffffffffffffffff
je 0x180005e2a
lea rcx, [rsp + 0x270]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_lstrcpyW]
cmp word [rsp + rbx + 0x270], 0x5c
jne 0x180005d00
xor eax, eax
mov word [rsp + rbx + 0x270], ax
nop dword [rax]
lea rdx, [0x1800441e8]
lea rcx, [rsp + 0x4c]
call qword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x180005dfe
lea rdx, [0x1800441b0]
lea rcx, [rsp + 0x4c]
call qword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x180005dfe
lea rcx, [0x1800441ec]
call qword [sym.imp.KERNEL32.dll_lstrlenW]
lea rcx, [rsp + 0x4c]
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_lstrlenW]
lea rcx, [rsp + 0x270]
add ebx, eax
call qword [sym.imp.KERNEL32.dll_lstrlenW]
lea ecx, [rax + 1]
add ecx, ebx
cmp ecx, 0x104
jg 0x180005dfe
lea r9, [rsp + 0x4c]
lea r8, [rsp + 0x270]
lea rdx, [0x1800441f0]
lea rcx, [rsp + 0x480]
call qword [sym.imp.USER32.dll_wsprintfW]
mov eax, dword [rsp + 0x20]
test al, 0x10
je 0x180005dd5
test al, 1
je 0x180005db8
and eax, 0xfffffffe
lea rcx, [rsp + 0x480]
mov edx, eax
mov dword [rsp + 0x20], eax
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov eax, dword [rsp + 0x20]
lea rcx, [rsp + 0x480]
bt eax, 0xa
jae 0x180005dce
call qword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
jmp 0x180005dfe
call fcn.180005bb0
jmp 0x180005dfe
test al, 1
jne 0x180005ddd
test al, 4
je 0x180005df0
lea rcx, [rsp + 0x480]
mov edx, 0x80
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea rcx, [rsp + 0x480]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
lea rdx, [rsp + 0x20]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x180005d00
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, rsi
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_FindClose]
cmp ebx, 0x12
je 0x180005e2e
xor eax, eax
jmp 0x180005e37
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
mov rsi, qword [rsp + 0x6a8]
mov rbx, qword [rsp + 0x6a0]
add rsp, 0x690
pop rdi
ret