Function at 0x408060
Capabilities:
Check if file exists
Delete file
Enumerate files on windows
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40cc6b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x158
mov eax, dword [0x415110]
xor eax, dword [ebp + 4]
push ebx
push esi
push edi
mov edi, ecx
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x24], edi
call dword [0x415030]
mov ebx, dword [edi + 0x2c]
test ebx, ebx
mov dword [ebp - 0x20], eax
jne 0x4080a5
xor esi, esi
jmp 0x4080df
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [eax + eax + 2]
mov dword [ebp - 0x18], eax
add eax, 3
and eax, 0xfffffffc
call fcn.0040c210
mov esi, esp
test esi, esi
je 0x4080df
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x20]
push 0
push 0
push eax
push esi
push 0xffffffffffffffff
push ebx
push 0
push ecx
mov byte [esi], 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov eax, dword [edi + 0x2c]
push eax
lea ecx, [ebp - 0x14]
call fcn.00406ec0
push 0x410980
mov dword [ebp - 4], 0
call dword [sym.imp.MSVCR70.dll_wcslen]
add esp, 4
push eax
push 0x410980
lea ecx, [ebp - 0x14]
call fcn.00404840
mov edx, dword [0x415218]
mov ecx, 0x415218
call dword [edx + 0xc]
lea ebx, [eax + 0x10]
mov dword [ebp - 0x18], ebx
push esi
mov byte [ebp - 4], 1
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x4083b4
test al, 0x10
je 0x4083b4
mov eax, dword [ebp - 0x14]
test eax, eax
mov dword [ebp - 0x1c], eax
je 0x408171
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea esi, [eax + eax + 2]
mov eax, esi
add eax, 3
and eax, 0xfffffffc
call fcn.0040c210
mov ecx, dword [ebp - 0x20]
mov edx, dword [ebp - 0x1c]
mov eax, esp
push ecx
push esi
push edx
push eax
call fcn.00401150
lea ecx, [ebp - 0x164]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov esi, eax
test esi, esi
mov dword [ebp - 0x1c], esi
jne 0x4081a0
add ebx, 0xfffffff0
mov byte [ebp - 4], al
lea edx, [ebx + 0xc]
or eax, 0xffffffff
lock xadd dword [edx], eax
dec eax
test eax, eax
jmp 0x4083c8
test byte [ebp - 0x164], 0x10
jne 0x408272
mov edi, dword [edi + 0x2c]
test edi, edi
jne 0x4081b8
xor eax, eax
jmp 0x4081c2
push edi
call dword [sym.imp.MSVCR70.dll_wcslen]
add esp, 4
push eax
push edi
lea ecx, [ebp - 0x18]
call fcn.00404670
lea eax, [ebp - 0x138]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edi, eax
inc edi
lea eax, [edi + edi]
add eax, 3
and eax, 0xfffffffc
call fcn.0040c210
mov esi, esp
test esi, esi
jne 0x4081f4
xor eax, eax
jmp 0x40821a
mov edx, dword [ebp - 0x20]
push edi
push esi
push 0xffffffffffffffff
lea ecx, [ebp - 0x138]
push ecx
push 0
push edx
mov word [esi], 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push esi
call dword [sym.imp.MSVCR70.dll_wcslen]
add esp, 4
push eax
push esi
lea ecx, [ebp - 0x18]
call fcn.00404840
mov ebx, dword [ebp - 0x18]
test ebx, ebx
jne 0x40822f
xor esi, esi
jmp 0x408265
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea edi, [eax + eax + 2]
mov eax, edi
add eax, 3
and eax, 0xfffffffc
call fcn.0040c210
mov esi, esp
test esi, esi
je 0x408265
mov eax, dword [ebp - 0x20]
push 0
push 0
push edi
push esi
push 0xffffffffffffffff
push ebx
push 0
push eax
mov byte [esi], 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov esi, dword [ebp - 0x1c]
mov edi, dword [ebp - 0x24]
lea ecx, [ebp - 0x164]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x4081a0
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [edi + 0x18]
test eax, eax
je 0x4082b3
mov edx, dword [eax - 4]
lea esi, [eax - 4]
push 0x401ec0
push edx
push 0x18
push eax
call fcn.0040c2b2
push esi
call sub.MSVCR70.dll_void___cdecl_operator_delete___void__
add esp, 4
mov esi, dword [edi + 0x30]
lea eax, [esi + esi*2]
lea ecx, [eax*8 + 4]
push ecx
call fcn.0040c14e
add esp, 4
mov dword [ebp - 0x1c], eax
test eax, eax
mov byte [ebp - 4], 2
je 0x4082f4
push 0x401ec0
push 0x401f80
push esi
mov dword [eax], esi
add eax, 4
push 0x18
push eax
mov dword [ebp - 0x24], eax
call fcn.0040c395
mov eax, dword [ebp - 0x24]
jmp 0x4082f6
xor eax, eax
test eax, eax
mov byte [ebp - 4], 1
mov dword [edi + 0x18], eax
jne 0x408359
push eax
push str.CHpodRenditionMgr::CleanCache___Cannot_create_a_new_cache.
mov ecx, edi
call fcn.00402e50
add ebx, 0xfffffff0
mov esi, eax
mov byte [ebp - 4], 0
lea edx, [ebx + 0xc]
or eax, 0xffffffff
lock xadd dword [edx], eax
dec eax
test eax, eax
jg 0x40832e
mov ecx, dword [ebx]
mov edx, dword [ecx]
push ebx
call dword [edx + 4]
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x408352
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, esi
jmp 0x4083f8
mov ecx, dword [edi + 0x30]
xor eax, eax
test ecx, ecx
jle 0x408375
xor ecx, ecx
mov edx, dword [edi + 0x18]
mov dword [ecx + edx], eax
mov edx, dword [edi + 0x30]
inc eax
add ecx, 0x18
cmp eax, edx
jl 0x408364
mov eax, dword [edi + 0x54]
mov ecx, dword [eax + 4]
lea esi, [edi + 0x50]
push ecx
mov ecx, esi
call fcn.00404f00
mov eax, dword [esi + 4]
mov dword [eax + 4], eax
mov eax, dword [esi + 4]
xor ecx, ecx
mov dword [esi + 8], ecx
mov dword [eax], eax
mov esi, dword [esi + 4]
add ebx, 0xfffffff0
mov dword [esi + 8], esi
mov dword [edi + 0x4c], ecx
mov byte [ebp - 4], cl
lea edx, [ebx + 0xc]
or eax, 0xffffffff
lock xadd dword [edx], eax
dec eax
test eax, eax
jmp 0x4083c8
add ebx, 0xfffffff0
mov byte [ebp - 4], 0
lea eax, [ebx + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4083d2
mov ecx, dword [ebx]
mov edx, dword [ecx]
push ebx
call dword [edx + 4]
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4083f6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
xor eax, eax
lea esp, [ebp - 0x170]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x10]
xor ecx, dword [ebp + 4]
call fcn.0040c184
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret