Function at 0x405c70
Capabilities:
Check if file exists
Delete file

Disassembly:
sub esp, 0x278
push ebx
push ebp
push esi
push edi
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x185]
mov byte [esp + 0x184], 0
mov esi, dword [esp + 0x294]
mov ebp, dword [esp + 0x28c]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push esi
push ebp
stosb byte es:[edi], al
call fcn.0040c0f0
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcpynA]
add esp, 4
push eax
lea eax, [esp + 0x18c]
push eax
call ebx
cmp ebp, 0xc
je 0x405ea5
cmp ebp, 0xa
je 0x405ea5
cmp ebp, 0xe
je 0x405ea5
cmp ebp, 0x13
je 0x405ea5
cmp ebp, 9
jne 0x405cf4
call fcn.00403290
test eax, eax
jne 0x405ea5
mov ecx, 0xc
xor eax, eax
lea edi, [esp + 0x19]
mov byte [esp + 0x18], 0
rep stosd dword es:[edi], eax
stosb byte es:[edi], al
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x81]
mov byte [esp + 0x80], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push ebp
xor esi, esi
stosb byte es:[edi], al
call fcn.0040c110
add esp, 4
mov edi, eax
mov dword [esp + 0x10], edi
push edi
call dword [sym.imp.SHLWAPI.dll_PathFindExtensionA]
mov ebp, dword [sym.imp.MSVCRT.dll__snprintf]
mov dword [esp + 0x14], eax
test esi, esi
jne 0x405d57
push 0x32
lea ecx, [esp + 0x1c]
push edi
push ecx
call ebx
jmp 0x405e13
mov ecx, 0xc
xor eax, eax
lea edi, [esp + 0x4d]
mov byte [esp + 0x4c], 0
mov edx, dword [esp + 0x10]
push 0x32
rep stosd dword es:[edi], eax
stosb byte es:[edi], al
lea eax, [esp + 0x50]
push edx
push eax
call ebx
lea ecx, [esp + 0x4c]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathRemoveExtensionA]
lea edx, [esp + 0x4c]
push esi
push edx
push str._s_d
lea eax, [esp + 0x24]
push 0x32
push eax
call ebp
lea edi, [esp + 0x2c]
or ecx, 0xffffffff
xor eax, eax
add esp, 0x14
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, 8
jbe 0x405dfb
lea edi, [esp + 0x18]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x405e98
lea edi, [esp + 0x4c]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
push esi
lea edx, [esp + 0x1c]
mov byte [esp + ecx + 0x4f], al
lea ecx, [esp + 0x50]
push ecx
push str._s_d
push 0x32
push edx
call ebp
lea edi, [esp + 0x2c]
or ecx, 0xffffffff
xor eax, eax
add esp, 0x14
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, 8
ja 0x405dad
mov eax, dword [esp + 0x14]
push 0x32
lea ecx, [esp + 0x1c]
push eax
push ecx
call fcn.004032d0
mov edi, dword [esp + 0x1c]
add esp, 0xc
lea edx, [esp + 0x184]
push 0x104
lea eax, [esp + 0x84]
push edx
push eax
inc esi
call ebx
lea ecx, [esp + 0x18]
lea edx, [esp + 0x80]
push ecx
push edx
call dword [sym.imp.SHLWAPI.dll_PathAppendA]
lea eax, [esp + 0x80]
push 1
push eax
call fcn.004022e0
add esp, 8
lea ecx, [esp + 0x80]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x405e6e
cmp esi, 0x3e8
jl 0x405d44
mov edx, dword [esp + 0x294]
mov ecx, dword [esp + 0x290]
lea eax, [esp + 0x80]
push edx
push eax
push ecx
call ebx
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x278
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x278
ret
push esi
mov esi, dword [esp + 0x294]
lea edx, [esp + 0x188]
push edx
push esi
call ebx
push ebp
call fcn.0040c110
add esp, 4
push eax
push esi
call dword [sym.imp.SHLWAPI.dll_PathAppendA]
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x278
ret