Function at 0x40b220
Capabilities:
Copy file
Delete file
Move file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42b754
mov eax, dword fs:[0]
push eax
sub esp, 0x60
push ebx
push esi
push edi
mov eax, dword [0x4424f8]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov ebx, dword [esi + 0x152c]
sub ebx, dword [esi + 0x1528]
lea ecx, [ebp - 0x6c]
sar ebx, 4
call sub.mfc100u.dll_CStdioFile::CStdioFile
push str.ToolDelFile.key
lea eax, [ebp - 0x1c]
push 0x47642c
xor edi, edi
push eax
mov dword [ebp - 4], edi
call fcn.00401010
add esp, 0xc
push edi
push 0x1002
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 1
call dword [sym.imp.mfc100u.dll_]
push eax
lea ecx, [ebp - 0x6c]
call sub.mfc100u.dll_CStdioFile::Open
mov dword [ebp - 0x28], edi
cmp ebx, edi
jle 0x40b55b
mov dword [ebp - 0x24], ebx
mov eax, dword [esi + 0x1528]
add eax, edi
push eax
lea ecx, [ebp - 0x18]
push 0x47642c
push ecx
call fcn.00408df0
mov eax, dword [esi + 0x1528]
add eax, edi
add eax, 4
push eax
lea edx, [ebp - 0x18]
push edx
lea eax, [ebp - 0x10]
push eax
mov byte [ebp - 4], 2
call fcn.00408df0
push str.UpgradeBackup_P_
lea ecx, [ebp - 0x38]
push 0x47642c
push ecx
mov byte [ebp - 4], 3
call fcn.00401010
mov ecx, dword [esi + 0x1528]
add ecx, edi
push ecx
push eax
lea edx, [ebp - 0x34]
push edx
mov byte [ebp - 4], 4
call fcn.00408df0
mov ecx, dword [esi + 0x1528]
add ecx, edi
add ecx, 4
push ecx
push eax
lea eax, [ebp - 0x30]
push eax
mov byte [ebp - 4], 5
call fcn.00408df0
push 0x4313d0
push eax
lea ecx, [ebp - 0x14]
push ecx
mov byte [ebp - 4], 6
call fcn.00401010
add esp, 0x48
lea ecx, [ebp - 0x30]
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_cla]
lea ecx, [ebp - 0x34]
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_cla]
lea ecx, [ebp - 0x38]
mov byte [ebp - 4], 0xa
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_cla]
lea edx, [ebp - 0x18]
push edx
lea eax, [ebp - 0x3c]
push eax
call fcn.00406a10
mov eax, dword [eax]
add esp, 8
push eax
call dword [sym.imp.dbghelp.dll_MakeSureDirectoryPathExists]
lea ecx, [ebp - 0x3c]
call dword [sym.imp.mfc100u.dll_ATL::CStringT_char_class_StrTraitMFC_DLL_char_class_ATL::ChTraitsCRT_char_____::CStringT_char_class_StrTraitM]
mov ecx, dword [esi + 0x1528]
cmp dword [edi + ecx + 8], 0
je 0x40b45d
push ecx
lea edx, [ebp - 0x18]
mov ecx, esp
mov dword [ebp - 0x40], esp
push edx
call dword [0x42f918]
push ecx
lea eax, [ebp - 0x14]
mov ecx, esp
mov dword [ebp - 0x54], esp
push eax
mov byte [ebp - 4], 0xb
call dword [0x42f918]
mov byte [ebp - 4], 0xa
call fcn.00428d80
add esp, 8
test eax, eax
je 0x40b530
push ecx
lea edx, [ebp - 0x14]
mov ecx, esp
mov dword [ebp - 0x54], esp
push edx
call dword [0x42f918]
lea eax, [ebp - 0x20]
push eax
call fcn.00421b00
push str.fmkey
lea ecx, [ebp - 0x48]
push 0x47642c
push ecx
mov byte [ebp - 4], 0xc
call fcn.00401010
mov ebx, eax
mov edx, dword [esi + 0x1528]
lea eax, [edi + edx]
lea ecx, [eax + 4]
push ecx
push eax
lea edx, [ebp - 0x44]
push edx
mov byte [ebp - 4], 0xd
call fcn.00408df0
add esp, 0x20
mov ecx, ebx
mov dword [ebp - 0x40], eax
call dword [sym.imp.mfc100u.dll_]
push eax
lea ecx, [ebp - 0x20]
call dword [sym.imp.mfc100u.dll_]
mov ecx, dword [ebp - 0x40]
push eax
call dword [sym.imp.mfc100u.dll_]
push eax
push str.value
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
lea ecx, [ebp - 0x44]
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_cla]
lea ecx, [ebp - 0x48]
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_cla]
lea ecx, [ebp - 0x20]
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_cla]
jmp 0x40b530
push 0
lea ecx, [ebp - 0x10]
call dword [sym.imp.mfc100u.dll_]
push eax
lea ecx, [ebp - 0x14]
call dword [sym.imp.mfc100u.dll_]
mov ebx, dword [sym.imp.KERNEL32.dll_CopyFileW]
push eax
call ebx
test eax, eax
jne 0x40b530
push str..del
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp - 0x4c]
push ecx
call fcn.00401010
add esp, 0xc
mov ecx, eax
call dword [sym.imp.mfc100u.dll_]
push eax
lea ecx, [ebp - 0x10]
call dword [sym.imp.mfc100u.dll_]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileW]
lea ecx, [ebp - 0x4c]
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_cla]
push ecx
mov edx, esp
mov dword [ebp - 0x54], esp
push str..del
lea eax, [ebp - 0x10]
push eax
push edx
call fcn.00401010
add esp, 0xc
call fcn.00424990
add esp, 4
test eax, eax
jne 0x40b518
push str..del_n
lea ecx, [ebp - 0x10]
push ecx
lea edx, [ebp - 0x50]
push edx
mov dword [ebp - 0x28], 1
call fcn.00401010
add esp, 0xc
mov ecx, eax
mov byte [ebp - 4], 0xe
call dword [sym.imp.mfc100u.dll_]
push eax
lea ecx, [ebp - 0x6c]
call sub.mfc100u.dll_CStdioFile::WriteString
lea ecx, [ebp - 0x50]
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_cla]
push 0
lea ecx, [ebp - 0x10]
call dword [sym.imp.mfc100u.dll_]
push eax
lea ecx, [ebp - 0x14]
call dword [sym.imp.mfc100u.dll_]
push eax
call ebx
lea ecx, [ebp - 0x14]
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_cla]
lea ecx, [ebp - 0x10]
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_cla]
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 1
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_cla]
add edi, 0x10
dec dword [ebp - 0x24]
jne 0x40b2a6
lea ecx, [ebp - 0x6c]
call sub.mfc100u.dll_CStdioFile::Close
cmp dword [ebp - 0x28], 0
jne 0x40b579
lea ecx, [ebp - 0x1c]
call dword [sym.imp.mfc100u.dll_]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push str.UpgradeBackup_P_
lea eax, [ebp - 0x2c]
push 0x47642c
push eax
call fcn.00401010
add esp, 0xc
push 0
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 0xf
call dword [sym.imp.mfc100u.dll_ATL::CSimpleStringT_wchar_t_1_::GetBuffer]
push ecx
mov ecx, esp
mov dword [ebp - 0x54], esp
push eax
call dword [0x42f908]
call fcn.00424990
add esp, 4
lea ecx, [ebp - 0x2c]
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_cla]
lea ecx, [ebp - 0x1c]
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_cla]
lea ecx, [ebp - 0x6c]
mov dword [ebp - 4], 0xffffffff
call fcn.0040ecbc
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret