Function at 0x408120
Capabilities:
Copy file
Delete file

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x411ac8
push eax
mov dword fs:[0], esp
sub esp, 0x3c
push ebp
push esi
push edi
mov esi, ecx
call fcn.00407980
mov ebp, eax
test ebp, ebp
jne 0x408164
mov dword [esi + 0x1a9c], 7
pop edi
pop esi
pop ebp
mov ecx, dword [esp + 0x3c]
mov dword fs:[0], ecx
add esp, 0x48
ret
mov eax, dword [esi + 0x4ba8]
mov edi, 3
cmp eax, edi
jne 0x40822c
push ebp
mov ecx, esi
call fcn.004084e0
mov eax, dword [esi + 0x1a9c]
push ebp
test eax, eax
je 0x4081a5
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
pop edi
pop esi
pop ebp
mov ecx, dword [esp + 0x3c]
mov dword fs:[0], ecx
add esp, 0x48
ret
mov ecx, esi
call fcn.00408910
mov eax, dword [esi + 0x1a9c]
test eax, eax
je 0x4081d2
push ebp
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
pop edi
pop esi
pop ebp
mov ecx, dword [esp + 0x3c]
mov dword fs:[0], ecx
add esp, 0x48
ret
mov ecx, esi
call fcn.00408e50
mov eax, dword [esi + 0x1a9c]
test eax, eax
je 0x4081ff
push ebp
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
pop edi
pop esi
pop ebp
mov ecx, dword [esp + 0x3c]
mov dword fs:[0], ecx
add esp, 0x48
ret
mov ecx, esi
call fcn.00409040
mov eax, dword [esi + 0x1a9c]
test eax, eax
je 0x40822c
push ebp
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
pop edi
pop esi
pop ebp
mov ecx, dword [esp + 0x3c]
mov dword fs:[0], ecx
add esp, 0x48
ret
cmp dword [esi + 0x1ae4], edi
jb 0x40823c
push ebp
mov ecx, esi
call fcn.004086c0
push ebp
mov ecx, esi
call fcn.00409230
mov eax, dword [esi + 0x1a9c]
test eax, eax
je 0x40826a
push ebp
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
pop edi
pop esi
pop ebp
mov ecx, dword [esp + 0x3c]
mov dword fs:[0], ecx
add esp, 0x48
ret
lea eax, [esp + 0x18]
push ebx
push eax
mov ecx, esi
call fcn.00408020
lea ecx, [esp + 0x2c]
mov dword [esp + 0x54], 0
call sub.MFC42u.DLL_CString::CString_3
lea ecx, [esp + 0x30]
mov byte [esp + 0x54], 1
call fcn.004106d8
lea ecx, [esp + 0x1c]
push str._submacro_.dll
lea edx, [esp + 0x18]
push ecx
push edx
mov byte [esp + 0x60], 2
call sub.MFC42u.DLL_operator_2
mov eax, dword [esp + 0x14]
push 0
push eax
lea ecx, [esp + 0x38]
mov byte [esp + 0x5c], 3
call sub.MFC42u.DLL_CFileFind::FindFile
test eax, eax
je 0x4082fb
mov ebx, dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea ecx, [esp + 0x30]
call sub.MFC42u.DLL_CFileFind::FindNextFileW
lea ecx, [esp + 0x20]
mov edi, eax
push ecx
lea ecx, [esp + 0x34]
call sub.MFC42u.DLL_CFileFind::GetFilePath
mov edx, dword [esp + 0x20]
push edx
call ebx
lea ecx, [esp + 0x20]
call sub.MFC42u.DLL_CString::CString
test edi, edi
jne 0x4082ce
lea eax, [esi + 0x4ba4]
lea ecx, [esp + 0x10]
push eax
call sub.MFC42u.DLL_CString::CString_2
push 0x5c
lea ecx, [esp + 0x14]
mov byte [esp + 0x58], 4
call sub.MFC42u.DLL_CString::ReverseFind
lea ecx, [esp + 0x18]
mov edi, eax
call sub.MFC42u.DLL_CString::CString_3
mov ecx, dword [esi + 0x1dc4]
lea edx, [esp + 0x18]
push ecx
mov bl, 5
push str._tarHMI_d
push edx
mov byte [esp + 0x60], bl
call sub.MFC42u.DLL_CString::Format
add esp, 0xc
lea eax, [esp + 0x24]
lea ecx, [esp + 0x10]
push edi
push eax
call sub.MFC42u.DLL_CString::Left
lea ecx, [esp + 0x18]
lea edx, [esp + 0x28]
push ecx
push eax
push edx
mov byte [esp + 0x60], 6
call sub.MFC42u.DLL_operator_1
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x58], 7
call sub.MFC42u.DLL_CString::operator
lea ecx, [esp + 0x28]
mov byte [esp + 0x54], 6
call sub.MFC42u.DLL_CString::CString
lea ecx, [esp + 0x24]
mov byte [esp + 0x54], bl
call sub.MFC42u.DLL_CString::CString
lea eax, [esp + 0x10]
push str._submacro_.dll
lea ecx, [esp + 0x2c]
push eax
push ecx
call sub.MFC42u.DLL_operator_2
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x58], 8
call sub.MFC42u.DLL_CString::operator
lea ecx, [esp + 0x28]
mov byte [esp + 0x54], bl
call sub.MFC42u.DLL_CString::CString
mov edx, dword [esp + 0x14]
push 0
push edx
lea ecx, [esp + 0x38]
call sub.MFC42u.DLL_CFileFind::FindFile
test eax, eax
je 0x40845c
mov edi, dword [sym.imp.KERNEL32.dll_CopyFileW]
lea ecx, [esp + 0x30]
call sub.MFC42u.DLL_CFileFind::FindNextFileW
mov esi, eax
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x34]
call sub.MFC42u.DLL_CFileFind::GetFilePath
lea ecx, [esp + 0x24]
mov byte [esp + 0x54], 9
push ecx
lea ecx, [esp + 0x34]
call sub.MFC42u.DLL_CFileFind::GetFileName
lea edx, [esp + 0x24]
lea eax, [esp + 0x1c]
push edx
lea ecx, [esp + 0x24]
push eax
push ecx
mov byte [esp + 0x60], 0xa
call sub.MFC42u.DLL_operator_1
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x28]
push 0
push edx
push eax
call edi
lea ecx, [esp + 0x20]
call sub.MFC42u.DLL_CString::CString
lea ecx, [esp + 0x24]
mov byte [esp + 0x54], 9
call sub.MFC42u.DLL_CString::CString
lea ecx, [esp + 0x28]
mov byte [esp + 0x54], bl
call sub.MFC42u.DLL_CString::CString
test esi, esi
jne 0x4083e1
lea ecx, [esp + 0x30]
call sub.MFC42u.DLL_CFileFind::Close
push ebp
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
lea ecx, [esp + 0x18]
mov byte [esp + 0x54], 4
call sub.MFC42u.DLL_CString::CString
lea ecx, [esp + 0x10]
mov byte [esp + 0x54], 3
call sub.MFC42u.DLL_CString::CString
lea ecx, [esp + 0x14]
mov byte [esp + 0x54], 2
call sub.MFC42u.DLL_CString::CString
lea ecx, [esp + 0x30]
mov byte [esp + 0x54], 1
call sub.MFC42u.DLL_CFileFind::CFileFind
lea ecx, [esp + 0x2c]
mov byte [esp + 0x54], 0
call sub.MFC42u.DLL_CString::CString
lea ecx, [esp + 0x1c]
mov dword [esp + 0x54], 0xffffffff
call sub.MFC42u.DLL_CString::CString
mov ecx, dword [esp + 0x4c]
pop ebx
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
add esp, 0x48
ret