Function at 0x40fca0
Capabilities:
Check if file exists
Delete file
Move file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42f378
mov eax, dword fs:[0]
push eax
sub esp, 0x30
mov eax, dword [0x43a050]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x1c], esi
cmp dword [esi + 0x20c], 0
jle 0x40fce0
xor eax, eax
jmp 0x40fefc
lea ecx, [ebp - 0x38]
call fcn.0040ba30
lea ebx, [esi + 4]
mov dword [ebp - 4], 0
test ebx, ebx
je 0x40fd37
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea edi, [eax + 1]
cmp edi, 0x3fffffff
jg 0x40fd37
lea eax, [edi + edi]
call fcn.00425100
mov esi, esp
test esi, esi
je 0x40fd34
push edi
push esi
push 0xffffffffffffffff
xor eax, eax
push ebx
push eax
push 3
mov word [esi], ax
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
neg eax
sbb eax, eax
and eax, esi
mov esi, dword [ebp - 0x1c]
jmp 0x40fd39
mov esi, dword [ebp - 0x1c]
xor eax, eax
push ecx
mov ecx, esp
mov dword [ebp - 0x18], esp
push ecx
mov ecx, eax
call fcn.004012d0
lea ecx, [ebp - 0x20]
call fcn.0040c2b0
mov byte [ebp - 4], 1
mov edx, dword [ebp - 0x20]
push edx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40fd7f
mov eax, dword [ebp - 0x20]
push ecx
add eax, 0xfffffff0
mov dword [ebp - 0x18], esp
mov edi, esp
call fcn.00401710
add eax, 0x10
lea ecx, [ebp - 0x3c]
mov dword [edi], eax
call fcn.0040c6e0
cmp dword [esi + 0x228], 0
je 0x40fe98
mov eax, dword [ebp - 0x20]
push ecx
add eax, 0xfffffff0
mov dword [ebp - 0x18], esp
mov esi, esp
call fcn.00401710
add eax, 0x10
mov dword [esi], eax
lea esi, [ebp - 0x18]
call fcn.0040c900
push 0
push 0
push 0
push 0
push 0xffffffffffffffff
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x18]
push eax
push 0
push 0
mov dword [ebp - 0x14], eax
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edi, eax
push edi
call fcn.00419476
push edi
mov esi, eax
push 0
push esi
call fcn.0041c1a0
mov eax, dword [ebp - 0x14]
add esp, 0x10
push 0
push 0
push edi
push esi
push 0xffffffffffffffff
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ecx + 0x210]
push edx
mov eax, esi
call fcn.00404660
movzx edi, al
test al, al
je 0x40fe66
push 1
push ebx
push esi
mov dword [ebp - 0x14], 0
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
mov edi, eax
test edi, edi
jne 0x40fe66
cmp dword [ebp - 0x14], 0xa
jge 0x40fe47
push 0xa
call dword [sym.imp.KERNEL32.dll_Sleep]
inc dword [ebp - 0x14]
push 1
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
mov edi, eax
test edi, edi
je 0x40fe24
jmp 0x40fe66
test edi, edi
jne 0x40fe66
mov eax, dword [ebp - 0x1c]
mov ecx, dword [eax + 0x210]
push ecx
mov eax, ebx
call fcn.00404660
push esi
movzx edi, al
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test esi, esi
je 0x40fe73
push esi
call fcn.004197c6
add esp, 4
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40fea9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x40fea9
mov ecx, dword [esi + 0x210]
push ecx
mov eax, ebx
call fcn.00404660
movzx edi, al
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x20]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40fecc
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea esi, [ebp - 0x38]
mov dword [ebp - 4], 0xffffffff
call fcn.0040bb20
mov eax, dword [ebp - 0x28]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40fefa
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, edi
lea esp, [ebp - 0x4c]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00418cd4
mov esp, ebp
pop ebp
ret