Function at 0x402170
Capabilities:
Copy file
Delete file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x402d9e
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xf0
push ebx
push esi
push edi
mov dword [ebp - 0x10], esp
lea esi, [ecx + 0x68]
push str.tmpres.tmp
lea eax, [ebp - 0x1c]
push esi
push eax
mov dword [ebp - 4], 3
call sub.MFC42.DLL_operator
push str.Resource.ini
lea ecx, [ebp - 0x18]
push esi
push ecx
mov byte [ebp - 4], 4
call sub.MFC42.DLL_operator
lea ecx, [ebp - 0x34]
mov byte [ebp - 4], 5
call sub.MFC42.DLL_CFile::CFile
lea ecx, [ebp - 0x4c]
mov byte [ebp - 4], 6
call sub.MFC42.DLL_CFile::CFile
lea ecx, [ebp - 0x74]
mov byte [ebp - 4], 7
call sub.MFC42.DLL_CFileFind::CFileFind
mov edx, dword [ebp - 0x18]
push 0
push edx
lea ecx, [ebp - 0x74]
mov byte [ebp - 4], 8
call sub.MFC42.DLL_CFileFind::FindFile
test eax, eax
push 0
je 0x402204
mov eax, dword [ebp - 0x18]
push 0
push eax
jmp 0x40220d
mov ecx, dword [ebp - 0x18]
push 0x1000
push ecx
lea ecx, [ebp - 0x34]
call sub.MFC42.DLL_CFile::Open
test eax, eax
jne 0x402222
mov byte [ebp - 4], 7
jmp 0x4024a7
mov edx, dword [ebp - 0x1c]
push 0
push 0x1001
push edx
lea ecx, [ebp - 0x4c]
call sub.MFC42.DLL_CFile::Open
test eax, eax
jne 0x402242
mov byte [ebp - 4], 7
jmp 0x4024a7
push 0
push 0x1000
lea eax, [ebp - 0x34]
push 1
push eax
lea ecx, [ebp - 0xfc]
mov byte [ebp - 4], 9
call sub.MFC42.DLL_CArchive::CArchive
push 0
push 0x1000
lea ecx, [ebp - 0x4c]
push 0
push ecx
lea ecx, [ebp - 0xb8]
mov byte [ebp - 4], 0xa
call sub.MFC42.DLL_CArchive::CArchive
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 0xb
call sub.MFC42.DLL_CString::CString_1
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 0xc
xor esi, esi
call sub.MFC42.DLL_CString::CString_1
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 0xd
call sub.MFC42.DLL_CString::CString_1
mov edi, dword [sym.imp.MSVCRT.dll__mbscmp]
mov bl, 0xe
mov byte [ebp - 4], bl
lea edx, [ebp - 0x14]
lea ecx, [ebp - 0xfc]
push edx
call sub.MFC42.DLL_CArchive::ReadString
test eax, eax
je 0x4023e2
mov eax, dword [ebp + 8]
lea ecx, [ebp - 0x14]
push eax
call sub.MFC42.DLL_CString::Find_1
test eax, eax
jl 0x4023ae
mov ecx, dword [ebp + 0x10]
push ecx
lea ecx, [ebp - 0x14]
call sub.MFC42.DLL_CString::Find_1
test eax, eax
jl 0x4023ae
lea ecx, [ebp - 0x24]
mov esi, 1
call sub.MFC42.DLL_CString::Empty
push 0x2c
lea ecx, [ebp - 0x14]
call sub.MFC42.DLL_CString::ReverseFind
cmp eax, 0xffffffff
jle 0x402334
mov edx, dword [ebp - 0x14]
mov ecx, dword [edx - 8]
sub ecx, eax
lea eax, [ebp - 0x50]
dec ecx
push ecx
push eax
lea ecx, [ebp - 0x14]
call sub.MFC42.DLL_CString::Right
push eax
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 0xf
call fcn.0040269c
lea ecx, [ebp - 0x50]
mov byte [ebp - 4], bl
call fcn.00402660
mov ecx, dword [ebp - 0x24]
mov edx, dword [ebp + 0x14]
push ecx
push edx
call edi
add esp, 8
test eax, eax
jle 0x40237a
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp + 0xc]
push eax
mov eax, dword [ebp + 8]
push ecx
push edx
push eax
lea ecx, [ebp - 0x20]
push str.menu_s_s__s__s_r_n
push ecx
call sub.MFC42.DLL_CString::Format
mov edx, dword [ebp - 0x20]
add esp, 0x18
lea ecx, [ebp - 0xb8]
push edx
call sub.MFC42.DLL_CArchive::WriteString
jmp 0x4022ab
lea eax, [ebp - 0x14]
push 0x4041c4
lea ecx, [ebp - 0x3c]
push eax
push ecx
call sub.MFC42.DLL_operator
mov eax, dword [eax]
lea ecx, [ebp - 0xb8]
push eax
mov byte [ebp - 4], 0x10
call sub.MFC42.DLL_CArchive::WriteString
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], bl
call fcn.00402660
jmp 0x4022ab
lea edx, [ebp - 0x14]
push 0x4041c4
lea eax, [ebp - 0x38]
push edx
push eax
call sub.MFC42.DLL_operator
mov eax, dword [eax]
lea ecx, [ebp - 0xb8]
push eax
mov byte [ebp - 4], 0x11
call sub.MFC42.DLL_CArchive::WriteString
lea ecx, [ebp - 0x38]
mov byte [ebp - 4], bl
call fcn.00402660
jmp 0x4022ab
test esi, esi
jne 0x402416
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp + 0xc]
push ecx
mov ecx, dword [ebp + 8]
push edx
push eax
push ecx
lea edx, [ebp - 0x20]
push str.menu_s_s__s__s_r_n
push edx
call sub.MFC42.DLL_CString::Format
mov eax, dword [ebp - 0x20]
add esp, 0x18
lea ecx, [ebp - 0xb8]
push eax
call sub.MFC42.DLL_CArchive::WriteString
lea ecx, [ebp - 0xfc]
call sub.MFC42.DLL_CArchive::Close
lea ecx, [ebp - 0xb8]
call sub.MFC42.DLL_CArchive::Close
lea ecx, [ebp - 0x34]
call sub.MFC42.DLL_CFile::Close
lea ecx, [ebp - 0x4c]
call sub.MFC42.DLL_CFile::Close
mov ecx, dword [ebp - 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_DeleteFileA]
push ecx
call esi
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
push 0
push edx
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileA]
mov ecx, dword [ebp - 0x1c]
push ecx
call esi
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 0xd
call fcn.00402660
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 0xc
call fcn.00402660
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 0xb
call fcn.00402660
lea ecx, [ebp - 0xb8]
mov byte [ebp - 4], 0xa
call fcn.004026c0
lea ecx, [ebp - 0xfc]
mov byte [ebp - 4], 9
call fcn.004026c0
mov dword [ebp - 4], 7
lea ecx, [ebp - 0x74]
call fcn.00402678
lea ecx, [ebp - 0x4c]
mov byte [ebp - 4], 6
call fcn.004026ba
lea ecx, [ebp - 0x34]
mov byte [ebp - 4], 5
call fcn.004026ba
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 4
call fcn.00402660
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 3
call fcn.00402660
lea ecx, [ebp + 8]
mov byte [ebp - 4], 2
call fcn.00402660
lea ecx, [ebp + 0xc]
mov byte [ebp - 4], 1
call fcn.00402660
lea ecx, [ebp + 0x10]
mov byte [ebp - 4], 0
call fcn.00402660
lea ecx, [ebp + 0x14]
mov dword [ebp - 4], 0xffffffff
call fcn.00402660
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 0x10