Function at 0x407842
Capabilities:
Delete file
Move file
Read .ini file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x440ffd
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x140
mov dword [ebp - 0x14c], ecx
push str.PROGRAMLOGFILE.OLD
mov eax, dword [ebp - 0x14c]
add eax, 0x1c
push eax
lea ecx, [ebp - 0xe4]
push ecx
call sub.MFC42.DLL_operator_3
mov dword [ebp - 4], 0
push 0x453fe8
lea ecx, [ebp - 0xe4]
call fcn.00402550
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
add esp, 8
mov dword [ebp - 0x74], eax
cmp dword [ebp - 0x74], 0
je 0x407a95
call fcn.00402560
push eax
lea ecx, [ebp - 0x148]
call fcn.00406a80
mov byte [ebp - 4], 1
mov edx, dword [ebp - 0x74]
push edx
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
push 0x453fec
push 0
push str.RemoveLogFile
push 0x454008
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
mov dword [ebp - 0xdc], eax
cmp dword [ebp - 0xdc], 1
jne 0x407911
lea ecx, [ebp - 0xe4]
call fcn.00402550
push eax
call dword [sym.imp.MSVCRT.dll_remove]
add esp, 4
jmp 0x407a86
cmp dword [ebp - 0xdc], 0
jne 0x40792a
lea ecx, [ebp - 0x148]
call sub.MFC42.DLL_CDialog::DoModal
cmp eax, 6
jne 0x407937
cmp dword [ebp - 0xdc], 2
jne 0x407a71
mov dword [ebp - 0xe0], 1
jmp 0x407952
mov eax, dword [ebp - 0xe0]
add eax, 1
mov dword [ebp - 0xe0], eax
cmp dword [ebp - 0xe0], 0x3e8
jge 0x4079b2
mov ecx, dword [ebp - 0xe0]
push ecx
mov ecx, dword [ebp - 0x14c]
add ecx, 0x1c
call fcn.00402550
push eax
push str._sPROGRAMLOGFILE._03d
lea edx, [ebp - 0x70]
push edx
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x10
push 0x454028
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
add esp, 8
mov dword [ebp - 0x74], eax
cmp dword [ebp - 0x74], 0
jne 0x4079a3
jmp 0x4079b2
mov ecx, dword [ebp - 0x74]
push ecx
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
jmp 0x407943
cmp dword [ebp - 0xe0], 0x3e8
je 0x407a5a
cmp dword [ebp - 0xdc], 2
jne 0x4079e6
lea edx, [ebp - 0x70]
push edx
lea ecx, [ebp - 0xe4]
call fcn.00402550
push eax
call dword [sym.imp.MSVCRT.dll_rename]
add esp, 8
jmp 0x407a58
push str.File_LOGFILE.OLD_will_be_saved_as
lea eax, [ebp - 0xd8]
push eax
call sub.MSVCRT.dll_strcpy
add esp, 8
lea ecx, [ebp - 0x70]
push ecx
lea edx, [ebp - 0xd8]
push edx
call sub.MSVCRT.dll_strcat
add esp, 8
push 0
push 0x454050
lea eax, [ebp - 0xd8]
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
cmp eax, 1
jne 0x407a43
lea ecx, [ebp - 0x70]
push ecx
lea ecx, [ebp - 0xe4]
call fcn.00402550
push eax
call dword [sym.imp.MSVCRT.dll_rename]
add esp, 8
jmp 0x407a58
lea ecx, [ebp - 0xe4]
call fcn.00402550
push eax
call dword [sym.imp.MSVCRT.dll_remove]
add esp, 4
jmp 0x407a6f
lea ecx, [ebp - 0xe4]
call fcn.00402550
push eax
call dword [sym.imp.MSVCRT.dll_remove]
add esp, 4
jmp 0x407a86
lea ecx, [ebp - 0xe4]
call fcn.00402550
push eax
call dword [sym.imp.MSVCRT.dll_remove]
add esp, 4
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x148]
call fcn.00406c20
lea ecx, [ebp - 0xe4]
call fcn.00402550
push eax
mov ecx, dword [ebp - 0x14c]
add ecx, 0x20
call fcn.00402550
push eax
call dword [sym.imp.MSVCRT.dll_rename]
add esp, 8
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xe4]
call sub.MFC42.DLL_CString::CString
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret