Function at 0x406c80
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, 0x670
cmp dword [ebp + 8], 0
jne 0x406c96
xor eax, eax
jmp 0x406eeb
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x406cab
xor eax, eax
jmp 0x406eeb
mov ecx, dword [ebp + 8]
push ecx
call fcn.00553b5f
add esp, 4
cmp eax, 3
ja 0x406cc3
xor eax, eax
jmp 0x406eeb
mov dword [ebp - 4], 1
push 0x208
push 0
lea edx, [ebp - 0x218]
push edx
call fcn.00537020
add esp, 0xc
push 0x208
push 0
lea eax, [ebp - 0x670]
push eax
call fcn.00537020
add esp, 0xc
mov ecx, dword [ebp + 8]
push ecx
lea edx, [ebp - 0x670]
push edx
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
push 0x5f4ba0
lea eax, [ebp - 0x670]
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 - 8], eax
cmp dword [ebp - 8], 0xffffffff
je 0x406d4b
mov edx, dword [ebp - 8]
and edx, 1
je 0x406d4b
mov eax, dword [ebp - 8]
and eax, 0xfffffffe
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 8]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea eax, [ebp - 0x468]
push eax
lea ecx, [ebp - 0x670]
push ecx
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0xffffffff
je 0x406ed8
lea edx, [ebp - 0x468]
push edx
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
je 0x406ece
mov ecx, dword [ebp - 0x468]
and ecx, 0x10
je 0x406e3e
mov edx, 2
imul eax, edx, 0
movzx ecx, word [ebp + eax - 0x43c]
cmp ecx, 0x2e
jne 0x406de9
mov edx, 2
shl edx, 0
movzx eax, word [ebp + edx - 0x43c]
test eax, eax
je 0x406de5
mov ecx, 2
shl ecx, 0
movzx edx, word [ebp + ecx - 0x43c]
cmp edx, 0x2e
jne 0x406de9
mov eax, 2
shl eax, 1
movzx ecx, word [ebp + eax - 0x43c]
test ecx, ecx
jne 0x406de9
jmp 0x406d6c
push 0x208
push 0
lea edx, [ebp - 0x218]
push edx
call fcn.00537020
add esp, 0xc
mov eax, dword [ebp + 8]
push eax
lea ecx, [ebp - 0x218]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea edx, [ebp - 0x43c]
push edx
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea ecx, [ebp - 0x218]
push ecx
call fcn.00406c80
add esp, 4
and eax, dword [ebp - 4]
mov dword [ebp - 4], eax
jmp 0x406ec9
push 0x208
push 0
lea edx, [ebp - 0x218]
push edx
call fcn.00537020
add esp, 0xc
mov eax, dword [ebp + 8]
push eax
lea ecx, [ebp - 0x218]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea edx, [ebp - 0x43c]
push edx
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea ecx, [ebp - 0x218]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0xffffffff
je 0x406eb1
mov edx, dword [ebp - 0xc]
and edx, 1
je 0x406eb1
mov eax, dword [ebp - 0xc]
and eax, 0xfffffffe
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 0xc]
push ecx
lea edx, [ebp - 0x218]
push edx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x406ec9
mov dword [ebp - 4], 0
jmp 0x406d6c
mov ecx, dword [ebp - 0x10]
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 - 4]
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
mov esp, ebp
pop ebp
ret