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

Disassembly:
push 0xffffffffffffffff
push 0x40d2b8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x428
push ebx
push ebp
push esi
push edi
push 0x104
lea eax, [esp + 0x22c]
push eax
mov edi, ecx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
push 0x104
lea ecx, [esp + 0x334]
push ecx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
mov esi, dword [edi + 0x74]
xor eax, eax
test esi, esi
mov dword [esp + 0x18], esi
mov dword [esp + 0x1c], eax
jle 0x407a81
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov ebp, dword [sym.imp.SHLWAPI.dll_PathAppendA]
test eax, eax
jl 0x407bd4
cmp eax, dword [edi + 0x74]
jge 0x407bd4
mov edx, dword [edi + 0x70]
mov esi, dword [edx + eax*4]
test esi, esi
je 0x407a6e
lea ecx, [edi + 0x34]
call dword [sym.imp.MFC71.DLL_ATL::CSimpleStringT::operator_char_const_]
push eax
lea eax, [esp + 0x128]
push eax
call ebx
mov ecx, esi
call dword [sym.imp.MFC71.DLL_ATL::CSimpleStringT::operator_char_const_]
push eax
lea ecx, [esp + 0x128]
push ecx
call ebp
lea edx, [esp + 0x124]
push edx
lea eax, [esp + 0x24]
push 0x40f2c4
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
mov eax, dword [esi + 0x20]
add esp, 0xc
test eax, eax
je 0x4079d2
lea ecx, [esp + 0x124]
push ecx
lea edx, [esp + 0x24]
push edx
call fcn.00409de0
add esp, 8
lea eax, [esp + 0x124]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x128]
push edx
call ebx
lea eax, [esp + 0x124]
push eax
push esi
mov ecx, edi
call fcn.00407450
lea ecx, [esi + 0x10]
call dword [sym.imp.MFC71.DLL_ATL::CSimpleStringT::operator_char_const_]
push eax
lea ecx, [esp + 0x24]
push ecx
call ebx
lea ecx, [esi + 4]
call dword [sym.imp.MFC71.DLL_ATL::CSimpleStringT::operator_char_const_]
push eax
lea edx, [esp + 0x24]
push edx
call ebp
lea eax, [esp + 0x20]
push 1
push eax
call fcn.00407340
add esp, 8
lea ecx, [esp + 0x20]
push ecx
lea ecx, [esi + 0x44]
call dword [sym.imp.MFC71.DLL_ATL::CStringT::operator_1]
lea edx, [esp + 0x20]
push edx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x407a55
lea eax, [esp + 0x20]
push 0x40f2c0
push eax
call dword [sym.imp.MSVCR71.dll_fopen]
add esp, 8
test eax, eax
je 0x407b4a
push eax
call dword [sym.imp.MSVCR71.dll_fclose]
add esp, 4
push 3
lea edx, [esp + 0x24]
push edx
lea eax, [esp + 0x12c]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x18]
inc eax
cmp eax, ecx
mov dword [esp + 0x1c], eax
jl 0x407938
mov esi, ecx
lea ecx, [esp + 0x14]
call dword [sym.imp.MFC71.DLL_ATL::CStringT::CStringT_3]
xor ebx, ebx
test esi, esi
mov dword [esp + 0x440], 1
jle 0x407b06
lea esp, [esp]
test ebx, ebx
jl 0x407bd4
cmp ebx, dword [edi + 0x74]
jge 0x407bd4
mov ecx, dword [edi + 0x70]
mov esi, dword [ecx + ebx*4]
test esi, esi
je 0x407afd
lea ebp, [esi + 0x24]
mov ecx, ebp
call dword [sym.imp.MFC71.DLL_ATL::CSimpleStringT::IsEmpty]
test al, al
jne 0x407afd
mov edx, dword [esp + 0x448]
mov eax, dword [edx]
push eax
lea ecx, [esi + 0x28]
call dword [sym.imp.MFC71.DLL_ATL::CSimpleStringT::operator_char_const_]
push eax
mov ecx, ebp
call dword [sym.imp.MFC71.DLL_ATL::CSimpleStringT::operator_char_const_]
push eax
lea ecx, [esi + 0x44]
call dword [sym.imp.MFC71.DLL_ATL::CSimpleStringT::operator_char_const_]
push eax
lea ecx, [esp + 0x24]
push ecx
mov ecx, edi
call fcn.00407520
mov eax, dword [esp + 0x18]
inc ebx
cmp ebx, eax
jl 0x407aa0
lea ecx, [esp + 0x14]
call dword [sym.imp.MFC71.DLL_ATL::CSimpleStringT::IsEmpty]
test al, al
jne 0x407b20
lea edx, [esp + 0x14]
push edx
mov ecx, edi
call fcn.004077f0
lea ecx, [esp + 0x14]
call dword [sym.imp.MFC71.DLL_ATL::CStringT::CStringT]
mov ecx, dword [esp + 0x438]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
mov dword fs:[0], ecx
add esp, 0x434
ret 4
lea ecx, [esp + 0x20]
push ecx
lea ecx, [esp + 0x14]
call dword [sym.imp.MFC71.DLL_ATL::CStringT::CStringT_1]
push 0x40f2bc
lea ecx, [esp + 0x14]
mov dword [esp + 0x444], 0
call dword [sym.imp.MFC71.DLL_ATL::CStringT::operator]
push 3
lea ecx, [esp + 0x14]
call dword [sym.imp.MFC71.DLL_ATL::CSimpleStringT::operator_char_const_]
push eax
lea edx, [esp + 0x12c]
push edx
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
mov eax, dword [edi + 0x84]
test eax, eax
jne 0x407bad
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x14]
call dword [sym.imp.MFC71.DLL_ATL::CSimpleStringT::operator_char_const_]
push eax
call fcn.00407150
mov ecx, dword [esp + 0x448]
mov dword [ecx], 1
lea ecx, [esp + 0x10]
mov dword [esp + 0x440], 0xffffffff
call dword [sym.imp.MFC71.DLL_ATL::CStringT::CStringT]
jmp 0x407a6a
call fcn.0040936c
int3