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

Disassembly:
mov eax, 0x5239b6
call fcn.004f70e4
sub esp, 0x3c
push ebx
push esi
push edi
mov edi, ecx
mov ecx, 0x562835
call fcn.004f6dfd
mov eax, dword [ebp + 8]
mov ecx, edi
mov dword [edi + 4], eax
lea eax, [ebp - 0x48]
push eax
call fcn.0040ddab
push eax
lea ecx, [edi + 0x24]
call fcn.004030bf
lea ecx, [ebp - 0x48]
call fcn.00402a3c
mov ecx, edi
call fcn.0040ce94
mov ecx, edi
call fcn.0040def4
mov eax, dword [edi]
lea ecx, [ebp - 0x18]
push str.GInstallerPkg
cmp byte [eax + 6], 0
je 0x40f36b
call fcn.00404194
mov eax, dword [edi + 4]
xor ebx, ebx
add eax, 4
mov dword [ebp - 4], ebx
push 0x529994
push eax
lea eax, [ebp - 0x24]
push eax
call fcn.00404829
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 1
push ecx
push eax
lea eax, [ebp - 0x14]
push eax
call fcn.004047c7
add esp, 0x18
mov ecx, dword [ebp - 0x24]
lea ecx, [ecx - 0x10]
call fcn.00405e10
mov ecx, dword [ebp - 0x18]
add ecx, 0xfffffff0
mov byte [ebp - 4], 4
call fcn.00405e10
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov eax, dword [edi + 4]
mov esi, dword [sym.imp.USER32.dll_PostMessageW]
push ebx
push ebx
push 0x46d
push dword [eax]
call esi
push ecx
mov ecx, esp
lea eax, [ebp - 0x14]
push eax
mov dword [ebp - 0x30], ecx
call fcn.0040406a
mov ecx, edi
call fcn.0040d83a
mov ecx, dword [ebp - 0x14]
or dword [ebp - 4], 0xffffffff
lea ecx, [ecx - 0x10]
call fcn.00405e10
mov ecx, edi
call fcn.0040d91e
mov eax, dword [edi + 4]
push ebx
push ebx
push 0x46c
push dword [eax]
call esi
jmp 0x40f52b
call fcn.00404194
mov eax, dword [edi + 4]
mov esi, 0x529994
add eax, 4
mov dword [ebp - 4], 5
push esi
push eax
lea eax, [ebp - 0x24]
push eax
call fcn.00404829
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 6
push ecx
push eax
lea eax, [ebp - 0x20]
push eax
call fcn.004047c7
add esp, 0x18
mov ecx, dword [ebp - 0x24]
lea ecx, [ecx - 0x10]
call fcn.00405e10
mov ecx, dword [ebp - 0x18]
mov byte [ebp - 4], 9
lea ecx, [ecx - 0x10]
call fcn.00405e10
push 0x52b26c
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x10]
push eax
call fcn.00404829
lea eax, [ebp - 0x1c]
mov byte [ebp - 4], 0xa
push eax
call fcn.0040720d
mov eax, dword [edi + 4]
add eax, 4
mov byte [ebp - 4], 0xb
push esi
push eax
lea eax, [ebp - 0x2c]
push eax
call fcn.00404829
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 0xc
push ecx
push eax
lea eax, [ebp - 0x28]
push eax
call fcn.004047c7
push str..exe
push eax
lea eax, [ebp + 8]
mov byte [ebp - 4], 0xd
push eax
call fcn.00404829
add esp, 0x34
mov ecx, dword [ebp - 0x28]
lea ecx, [ecx - 0x10]
call fcn.00405e10
mov ecx, dword [ebp - 0x2c]
add ecx, 0xfffffff0
mov byte [ebp - 4], 0x10
call fcn.00405e10
push dword [ebp - 0x10]
mov esi, dword [sym.imp.KERNEL32.dll_DeleteFileW]
call esi
push dword [ebp + 8]
call esi
push dword [ebp + 8]
mov ebx, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
call ebx
test eax, eax
je 0x40f499
push str..exe
lea ecx, [ebp + 8]
call fcn.00404a8e
push dword [ebp + 8]
call esi
push dword [ebp + 8]
call ebx
test eax, eax
je 0x40f499
push str..exe
lea ecx, [ebp + 8]
call fcn.00404a8e
push dword [ebp + 8]
call esi
push dword [ebp + 8]
call ebx
test eax, eax
je 0x40f499
push str..exe
lea ecx, [ebp + 8]
call fcn.00404a8e
push dword [ebp + 8]
call esi
push ecx
mov ecx, esp
lea eax, [ebp - 0x10]
push eax
mov dword [ebp - 0x30], ecx
call fcn.0040406a
mov ecx, edi
call fcn.0040d4f9
push dword [ebp + 8]
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_MoveFileW]
mov eax, dword [edi + 4]
xor ebx, ebx
mov esi, dword [sym.imp.USER32.dll_PostMessageW]
push ebx
push ebx
push 0x46d
push dword [eax]
call esi
push ecx
mov ecx, esp
lea eax, [ebp + 8]
push eax
mov dword [ebp - 0x30], ecx
call fcn.0040406a
mov ecx, edi
call fcn.0040d709
mov eax, dword [edi + 4]
push ebx
push ebx
push 0x46c
mov dword [eax + 8], 1
mov eax, dword [edi + 4]
push dword [eax]
call esi
mov ecx, dword [ebp + 8]
lea ecx, [ecx - 0x10]
call fcn.00405e10
mov ecx, dword [ebp - 0x1c]
lea ecx, [ecx - 0x10]
call fcn.00405e10
mov ecx, dword [ebp - 0x10]
lea ecx, [ecx - 0x10]
call fcn.00405e10
mov ecx, dword [ebp - 0x20]
lea ecx, [ecx - 0x10]
call fcn.00405e10
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret 4