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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x674
mov eax, dword [0x6403f4]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [ebp + 8], 0
jne 0x406d00
xor eax, eax
jmp 0x406f9a
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x406d15
xor eax, eax
jmp 0x406f9a
mov ecx, dword [ebp + 8]
push ecx
call fcn.005328cf
add esp, 4
cmp eax, 3
ja 0x406d2d
xor eax, eax
jmp 0x406f9a
mov dword [ebp - 0x668], 1
push 0x208
push 0
lea edx, [ebp - 0x20c]
push edx
call fcn.005163e0
add esp, 0xc
push 0x208
push 0
lea eax, [ebp - 0x414]
push eax
call fcn.005163e0
add esp, 0xc
mov ecx, dword [ebp + 8]
push ecx
lea edx, [ebp - 0x414]
push edx
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
push 0x5deb00
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov dword [ebp - 0x66c], eax
cmp dword [ebp - 0x66c], 0xffffffff
je 0x406dca
mov edx, dword [ebp - 0x66c]
and edx, 1
je 0x406dca
mov eax, dword [ebp - 0x66c]
and eax, 0xfffffffe
mov dword [ebp - 0x66c], eax
mov ecx, dword [ebp - 0x66c]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea eax, [ebp - 0x664]
push eax
lea ecx, [ebp - 0x414]
push ecx
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [ebp - 0x674], eax
cmp dword [ebp - 0x674], 0xffffffff
je 0x406f7e
lea edx, [ebp - 0x664]
push edx
mov eax, dword [ebp - 0x674]
push eax
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
je 0x406f71
mov ecx, dword [ebp - 0x664]
and ecx, 0x10
je 0x406ecc
mov edx, 2
imul eax, edx, 0
movzx ecx, word [ebp + eax - 0x638]
cmp ecx, 0x2e
jne 0x406e71
mov edx, 2
shl edx, 0
movzx eax, word [ebp + edx - 0x638]
test eax, eax
je 0x406e6d
mov ecx, 2
shl ecx, 0
movzx edx, word [ebp + ecx - 0x638]
cmp edx, 0x2e
jne 0x406e71
mov eax, 2
shl eax, 1
movzx ecx, word [ebp + eax - 0x638]
test ecx, ecx
jne 0x406e71
jmp 0x406df1
push 0x208
push 0
lea edx, [ebp - 0x20c]
push edx
call fcn.005163e0
add esp, 0xc
mov eax, dword [ebp + 8]
push eax
lea ecx, [ebp - 0x20c]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea edx, [ebp - 0x638]
push edx
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea ecx, [ebp - 0x20c]
push ecx
call fcn.00406ce0
add esp, 4
and eax, dword [ebp - 0x668]
mov dword [ebp - 0x668], eax
jmp 0x406f6c
push 0x208
push 0
lea edx, [ebp - 0x20c]
push edx
call fcn.005163e0
add esp, 0xc
mov eax, dword [ebp + 8]
push eax
lea ecx, [ebp - 0x20c]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea edx, [ebp - 0x638]
push edx
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea ecx, [ebp - 0x20c]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov dword [ebp - 0x670], eax
cmp dword [ebp - 0x670], 0xffffffff
je 0x406f51
mov edx, dword [ebp - 0x670]
and edx, 1
je 0x406f51
mov eax, dword [ebp - 0x670]
and eax, 0xfffffffe
mov dword [ebp - 0x670], eax
mov ecx, dword [ebp - 0x670]
push ecx
lea edx, [ebp - 0x20c]
push edx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x406f6c
mov dword [ebp - 0x668], 0
jmp 0x406df1
mov ecx, dword [ebp - 0x674]
push ecx
call dword [sym.imp.KERNEL32.dll_FindClose]
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
and eax, dword [ebp - 0x668]
mov dword [ebp - 0x668], eax
mov eax, dword [ebp - 0x668]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004742a8
mov esp, ebp
pop ebp
ret