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

Disassembly:
sub esp, 0x274
push ebx
push ebp
push esi
push edi
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x181]
mov byte [esp + 0x180], 0
mov esi, dword [esp + 0x290]
mov ebp, dword [esp + 0x288]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push esi
push ebp
stosb byte es:[edi], al
call fcn.004131f0
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcpynA]
add esp, 4
push eax
lea eax, [esp + 0x188]
push eax
call ebx
cmp ebp, 0xc
je 0x40fc57
cmp ebp, 0xa
je 0x40fc57
cmp ebp, 0xe
je 0x40fc57
cmp ebp, 0x13
je 0x40fc57
cmp ebp, 9
jne 0x40fac4
call fcn.00403a40
test eax, eax
jne 0x40fc57
mov ecx, 0xc
xor eax, eax
lea edi, [esp + 0x15]
mov byte [esp + 0x14], 0
rep stosd dword es:[edi], eax
stosb byte es:[edi], al
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x7d]
mov byte [esp + 0x7c], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push ebp
xor esi, esi
stosb byte es:[edi], al
call fcn.00413210
add esp, 4
mov ebp, eax
push ebp
call dword [sym.imp.SHLWAPI.dll_PathFindExtensionA]
mov dword [esp + 0x10], eax
test esi, esi
jne 0x40fb17
push 0x32
lea ecx, [esp + 0x18]
push ebp
push ecx
call ebx
jmp 0x40fbd1
mov ecx, 0xc
xor eax, eax
lea edi, [esp + 0x49]
mov byte [esp + 0x48], 0
rep stosd dword es:[edi], eax
push 0x32
lea edx, [esp + 0x4c]
push ebp
push edx
stosb byte es:[edi], al
call ebx
lea eax, [esp + 0x48]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveExtensionA]
lea ecx, [esp + 0x48]
push esi
push ecx
push str._s_d
lea edx, [esp + 0x20]
push 0x32
push edx
call sub.MSVCRT.dll__snprintf
lea edi, [esp + 0x28]
or ecx, 0xffffffff
xor eax, eax
add esp, 0x14
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, 8
jbe 0x40fbbd
lea edi, [esp + 0x14]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x40fc4a
lea edi, [esp + 0x48]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
push esi
mov byte [esp + ecx + 0x4b], al
lea eax, [esp + 0x4c]
push eax
push str._s_d
lea ecx, [esp + 0x20]
push 0x32
push ecx
call sub.MSVCRT.dll__snprintf
lea edi, [esp + 0x28]
or ecx, 0xffffffff
xor eax, eax
add esp, 0x14
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, 8
ja 0x40fb6c
mov edx, dword [esp + 0x10]
push 0x32
lea eax, [esp + 0x18]
push edx
push eax
call fcn.00404540
add esp, 0xc
lea ecx, [esp + 0x180]
push 0x104
lea edx, [esp + 0x80]
push ecx
push edx
inc esi
call ebx
lea eax, [esp + 0x14]
lea ecx, [esp + 0x7c]
push eax
push ecx
call dword [sym.imp.SHLWAPI.dll_PathAppendA]
lea edx, [esp + 0x7c]
push 1
push edx
call fcn.004023f0
add esp, 8
lea eax, [esp + 0x7c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x40fc23
cmp esi, 0x3e8
jl 0x40fb04
mov ecx, dword [esp + 0x290]
mov eax, dword [esp + 0x28c]
lea edx, [esp + 0x7c]
push ecx
push edx
push eax
call ebx
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x274
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x274
ret
push esi
mov esi, dword [esp + 0x290]
lea ecx, [esp + 0x184]
push ecx
push esi
call ebx
push ebp
call fcn.00413210
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, 0x274
ret