Function at 0x1800052b0
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 0x1800052d7
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 0x1800052c1
test ax, ax
je 0x1800052c1
cmp ax, 0x2e
je 0x1800052c1
lea rdx, [0x180040bf8]
call qword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x1800052c1
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x1800052cc
not eax
test al, 0x10
jne 0x1800052c1
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
cmp eax, 1
jne 0x18000532f
add rsp, 0x690
pop rdi
ret
test eax, eax
jne 0x180005340
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x91
jne 0x1800052cc
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 0x180005381
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, [0x180040c10]
je 0x1800053b1
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 0x18000552a
lea rcx, [rsp + 0x270]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_lstrcpyW]
cmp word [rsp + rbx + 0x270], 0x5c
jne 0x180005400
xor eax, eax
mov word [rsp + rbx + 0x270], ax
nop dword [rax]
lea rdx, [0x180040c30]
lea rcx, [rsp + 0x4c]
call qword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x1800054fe
lea rdx, [0x180040bf8]
lea rcx, [rsp + 0x4c]
call qword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x1800054fe
lea rcx, [0x180040c34]
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 0x1800054fe
lea r9, [rsp + 0x4c]
lea r8, [rsp + 0x270]
lea rdx, [0x180040c38]
lea rcx, [rsp + 0x480]
call qword [sym.imp.USER32.dll_wsprintfW]
mov eax, dword [rsp + 0x20]
test al, 0x10
je 0x1800054d5
test al, 1
je 0x1800054b8
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 0x1800054ce
call qword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
jmp 0x1800054fe
call fcn.1800052b0
jmp 0x1800054fe
test al, 1
jne 0x1800054dd
test al, 4
je 0x1800054f0
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 0x180005400
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, rsi
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_FindClose]
cmp ebx, 0x12
je 0x18000552e
xor eax, eax
jmp 0x180005537
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