Function at 0x403320
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 0x403336
xor eax, eax
jmp 0x40358b
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40334b
xor eax, eax
jmp 0x40358b
mov ecx, dword [ebp + 8]
push ecx
call fcn.004bb901
add esp, 4
cmp eax, 3
ja 0x403363
xor eax, eax
jmp 0x40358b
mov dword [ebp - 4], 1
push 0x208
push 0
lea edx, [ebp - 0x218]
push edx
call fcn.0049ed70
add esp, 0xc
push 0x208
push 0
lea eax, [ebp - 0x670]
push eax
call fcn.0049ed70
add esp, 0xc
mov ecx, dword [ebp + 8]
push ecx
lea edx, [ebp - 0x670]
push edx
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
push 0x520920
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 0x4033eb
mov edx, dword [ebp - 8]
and edx, 1
je 0x4033eb
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 0x403578
lea edx, [ebp - 0x468]
push edx
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
je 0x40356e
mov ecx, dword [ebp - 0x468]
and ecx, 0x10
je 0x4034de
mov edx, 2
imul eax, edx, 0
movzx ecx, word [ebp + eax - 0x43c]
cmp ecx, 0x2e
jne 0x403489
mov edx, 2
shl edx, 0
movzx eax, word [ebp + edx - 0x43c]
test eax, eax
je 0x403485
mov ecx, 2
shl ecx, 0
movzx edx, word [ebp + ecx - 0x43c]
cmp edx, 0x2e
jne 0x403489
mov eax, 2
shl eax, 1
movzx ecx, word [ebp + eax - 0x43c]
test ecx, ecx
jne 0x403489
jmp 0x40340c
push 0x208
push 0
lea edx, [ebp - 0x218]
push edx
call fcn.0049ed70
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.00403320
add esp, 4
and eax, dword [ebp - 4]
mov dword [ebp - 4], eax
jmp 0x403569
push 0x208
push 0
lea edx, [ebp - 0x218]
push edx
call fcn.0049ed70
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 0x403551
mov edx, dword [ebp - 0xc]
and edx, 1
je 0x403551
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 0x403569
mov dword [ebp - 4], 0
jmp 0x40340c
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