Function at 0x40cdf8
Capabilities:
Check if file exists
Delete file
Get common file path
Move file

Disassembly:
push ebp
sub esp, 0x480
lea ebp, [esp - 4]
mov eax, dword [0x581de4]
xor eax, ebp
mov dword [ebp + 0x480], eax
push 0x20
mov eax, 0x529451
call fcn.0043ca31
mov ebx, dword [ebp + 0x48c]
push ebx
mov dword [ebp - 0x10], ebx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40d058
push ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
xor esi, esi
cmp eax, esi
jne 0x40d058
mov edi, 0x206
push edi
lea eax, [ebp + 0x72]
push esi
push eax
mov word [ebp + 0x70], si
call fcn.0043d050
push edi
lea eax, [ebp + 0x27a]
push esi
push eax
mov word [ebp + 0x278], si
call fcn.0043d050
add esp, 0x18
mov edi, 0x5741b8
push edi
lea ecx, [ebp + 0x38]
call fcn.00401130
lea eax, [ebp + 0x278]
push eax
push 0x104
mov dword [ebp - 4], esi
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
lea eax, [ebp + 0x70]
push eax
push ebx
call fcn.0040b8b2
lea eax, [ebp]
push ebx
push eax
call fcn.0040c3f9
lea eax, [ebp + 0x278]
push eax
lea eax, [ebp + 0x1c]
push eax
mov byte [ebp - 4], 1
call fcn.0040c3f9
lea eax, [ebp]
push eax
mov byte [ebp - 4], 2
call fcn.0040c027
lea eax, [ebp + 0x1c]
push eax
call fcn.0040c027
add esp, 0x20
lea eax, [ebp]
push eax
lea ecx, [ebp + 0x1c]
call fcn.00402c42
test eax, eax
jne 0x40cef6
lea eax, [ebp + 0x278]
push eax
lea ecx, [ebp + 0x38]
call fcn.00401300
jmp 0x40cf21
lea eax, [ebp + 0x54]
push ebx
push eax
call fcn.0040c478
pop ecx
pop ecx
push 0xffffffffffffffff
push esi
push eax
lea ecx, [ebp + 0x38]
mov byte [ebp - 4], 3
call fcn.004018a0
push esi
push 1
lea ecx, [ebp + 0x54]
mov byte [ebp - 4], 2
call fcn.00401330
xor ebx, ebx
push edi
lea ecx, [ebp + 0x54]
call fcn.00401130
push 0xffffffffffffffff
push esi
lea eax, [ebp + 0x38]
push eax
lea ecx, [ebp + 0x54]
mov byte [ebp - 4], 4
call fcn.004018a0
lea eax, [ebp + 0x70]
push eax
lea ecx, [ebp + 0x54]
call fcn.00401ef0
push str..del
lea ecx, [ebp + 0x54]
call fcn.00401ef0
cmp ebx, esi
jle 0x40cf8c
mov eax, ebx
cdq
push edx
push eax
lea eax, [ebp - 0x2c]
push eax
call fcn.0040c5bc
add esp, 0xc
push 0xffffffffffffffff
push esi
push eax
lea ecx, [ebp + 0x54]
mov byte [ebp - 4], 5
call fcn.00402180
push esi
push 1
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 4
call fcn.00401330
cmp dword [ebp + 0x6c], 8
mov eax, dword [ebp + 0x58]
jae 0x40cf98
lea eax, [ebp + 0x58]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40cfd4
cmp dword [ebp + 0x6c], 8
mov eax, dword [ebp + 0x58]
jae 0x40cfaf
lea eax, [ebp + 0x58]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp eax, esi
jne 0x40cfd4
cmp ebx, 0xa
push esi
lea ecx, [ebp + 0x54]
jge 0x40d031
push 1
inc ebx
mov byte [ebp - 4], 2
call fcn.00401330
jmp 0x40cf23
cmp dword [ebp + 0x6c], 8
mov eax, dword [ebp + 0x58]
jae 0x40cfe0
lea eax, [ebp + 0x58]
push eax
push dword [ebp - 0x10]
call fcn.0043fdc1
cmp dword [ebp + 0x6c], 8
mov eax, dword [ebp + 0x58]
pop ecx
pop ecx
jae 0x40cff7
lea eax, [ebp + 0x58]
mov ebx, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
push eax
call ebx
test eax, eax
mov edi, dword [sym.imp.KERNEL32.dll_MoveFileExW]
je 0x40d01c
cmp dword [ebp + 0x6c], 8
mov eax, dword [ebp + 0x58]
jae 0x40d016
lea eax, [ebp + 0x58]
push 5
push esi
push eax
call edi
push dword [ebp - 0x10]
call ebx
test eax, eax
je 0x40d02d
push 5
push esi
push dword [ebp - 0x10]
call edi
push esi
lea ecx, [ebp + 0x54]
xor edi, edi
inc edi
push edi
call fcn.00401330
push esi
push edi
lea ecx, [ebp + 0x1c]
call fcn.00401330
push esi
push edi
lea ecx, [ebp]
call fcn.00401330
push esi
push edi
lea ecx, [ebp + 0x38]
call fcn.00401330
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x480]
xor ecx, ebp
call fcn.0043ca22
add ebp, 0x484
leave
ret