Function at 0x40c140
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, 0x680
mov eax, dword [0x469340]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [ebp + 8], 0
jne 0x40c160
xor eax, eax
jmp 0x40c3e9
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40c175
xor eax, eax
jmp 0x40c3e9
mov ecx, dword [ebp + 8]
push ecx
call fcn.0042b51b
add esp, 4
cmp eax, 3
ja 0x40c18d
xor eax, eax
jmp 0x40c3e9
mov dword [ebp - 0x46c], 1
xor edx, edx
mov word [ebp - 0x210], dx
push 0x206
push 0
lea eax, [ebp - 0x20e]
push eax
call fcn.0042b460
add esp, 0xc
xor ecx, ecx
mov word [ebp - 0x678], cx
push 0x206
push 0
lea edx, [ebp - 0x676]
push edx
call fcn.0042b460
add esp, 0xc
mov eax, dword [ebp + 8]
push eax
lea ecx, [ebp - 0x678]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
push 0x45c49c
lea edx, [ebp - 0x678]
push edx
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov dword [ebp - 0x67c], eax
cmp dword [ebp - 0x67c], 0xffffffff
je 0x40c23c
mov ecx, dword [ebp - 0x67c]
and ecx, 1
je 0x40c23c
mov edx, dword [ebp - 0x67c]
and edx, 0xfffffffe
mov dword [ebp - 0x67c], edx
mov eax, dword [ebp - 0x67c]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea edx, [ebp - 0x468]
push edx
lea eax, [ebp - 0x678]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [ebp - 0x214], eax
cmp dword [ebp - 0x214], 0xffffffff
je 0x40c3cd
lea ecx, [ebp - 0x468]
push ecx
mov edx, dword [ebp - 0x214]
push edx
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
je 0x40c3c0
mov eax, dword [ebp - 0x468]
and eax, 0x10
je 0x40c31b
movzx ecx, word [ebp - 0x43c]
cmp ecx, 0x2e
jne 0x40c2c0
movzx edx, word [ebp - 0x43a]
test edx, edx
je 0x40c2bc
movzx eax, word [ebp - 0x43a]
cmp eax, 0x2e
jne 0x40c2c0
movzx ecx, word [ebp - 0x438]
test ecx, ecx
jne 0x40c2c0
jmp 0x40c263
push 0x208
push 0
lea edx, [ebp - 0x210]
push edx
call fcn.0042b460
add esp, 0xc
mov eax, dword [ebp + 8]
push eax
lea ecx, [ebp - 0x210]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea edx, [ebp - 0x43c]
push edx
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea ecx, [ebp - 0x210]
push ecx
call fcn.0040c140
add esp, 4
and eax, dword [ebp - 0x46c]
mov dword [ebp - 0x46c], eax
jmp 0x40c3bb
push 0x208
push 0
lea edx, [ebp - 0x210]
push edx
call fcn.0042b460
add esp, 0xc
mov eax, dword [ebp + 8]
push eax
lea ecx, [ebp - 0x210]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea edx, [ebp - 0x43c]
push edx
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea ecx, [ebp - 0x210]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov dword [ebp - 0x680], eax
cmp dword [ebp - 0x680], 0xffffffff
je 0x40c3a0
mov edx, dword [ebp - 0x680]
and edx, 1
je 0x40c3a0
mov eax, dword [ebp - 0x680]
and eax, 0xfffffffe
mov dword [ebp - 0x680], eax
mov ecx, dword [ebp - 0x680]
push ecx
lea edx, [ebp - 0x210]
push edx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x40c3bb
mov dword [ebp - 0x46c], 0
jmp 0x40c263
mov ecx, dword [ebp - 0x214]
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 - 0x46c]
mov dword [ebp - 0x46c], eax
mov eax, dword [ebp - 0x46c]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042b4da
mov esp, ebp
pop ebp
ret