Function at 0x40f840
Capabilities:
Copy file

Disassembly:
push 0xffffffffffffffff
push 0x41bfa1
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x324
push ebx
push esi
mov esi, ecx
push edi
lea ecx, [esp + 0xc]
call sub.MFC42.DLL_CString::CString_2
xor ebx, ebx
lea ecx, [esp + 0x14]
mov dword [esp + 0x338], ebx
call sub.MFC42.DLL_CString::CString_2
mov edi, dword [esp + 0x340]
push 1
push 0x428794
push edi
mov byte [esp + 0x344], 1
call dword [sym.imp.MSVCRT.dll_strncmp]
add esp, 0xc
test eax, eax
jne 0x40f8b6
mov eax, dword [str.XStudioSyncVTRun1.exe]
lea ecx, [esp + 0xc]
push eax
push 0x42a954
push str._s_s
push ecx
jmp 0x40f8cc
mov edx, dword [str.XStudioSyncVTRun2.exe]
lea eax, [esp + 0xc]
push edx
push 0x42a954
push str._s_s
push eax
call sub.MFC42.DLL_CString::Format
mov ecx, dword [esi + 0xd4]
add esp, 0x10
lea edx, [esp + 0x14]
push ecx
push 0x42a954
push str._s_s
push edx
call sub.MFC42.DLL_CString::Format
mov ecx, dword [esp + 0x24]
add esp, 0x10
lea eax, [esp + 0x218]
push eax
push ecx
call sub.MFC42.DLL_CFile::GetStatus
test eax, eax
je 0x40f958
mov eax, dword [esp + 0xc]
lea edx, [esp + 0x18]
push edx
push eax
call sub.MFC42.DLL_CFile::GetStatus
test eax, eax
je 0x40f958
mov ecx, dword [esp + 0x224]
mov eax, dword [esp + 0x24]
cmp ecx, eax
jne 0x40f958
mov edx, dword [esp + 0x1c]
push ecx
mov eax, esp
mov dword [esp + 0x14], esp
lea ecx, [esp + 0x220]
mov dword [eax], edx
lea eax, [esp + 0x14]
push eax
call fcn.00408960
mov eax, dword [eax]
cdq
xor eax, edx
sub eax, edx
cmp eax, 0x3c
jle 0x40fa4e
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 0x14]
push ebx
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
cmp eax, ebx
jne 0x40fa4e
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::CString_2
mov ecx, 0x7f
xor eax, eax
lea edi, [esp + 0x19]
mov byte [esp + 0x18], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov byte [esp + 0x338], 2
stosb byte es:[edi], al
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push ebx
lea eax, [esp + 0x1c]
push 0x200
push eax
push 0x400
push esi
push ebx
push 0x1000
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
cmp eax, ebx
jne 0x40f9d4
push esi
lea ecx, [esp + 0x14]
push 0x428a6c
push ecx
call sub.MFC42.DLL_CString::Format
add esp, 0xc
jmp 0x40f9f0
lea edx, [esp + 0x18]
mov byte [esp + eax + 0x18], bl
push edx
push esi
lea eax, [esp + 0x18]
push 0x428a04
push eax
call sub.MFC42.DLL_CString::Format
add esp, 0x10
cmp esi, 2
jne 0x40fa2f
lea ecx, [esp + 0x10]
mov byte [esp + 0x338], 1
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x14]
mov byte [esp + 0x338], bl
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0xc]
mov dword [esp + 0x338], 0xffffffff
call sub.MFC42.DLL_CString::CString
or eax, 0xffffffff
jmp 0x40fa9b
mov ecx, dword [esp + 0x10]
push ebx
push ebx
push ecx
call sub.MFC42.DLL_AfxMessageBox_1
lea ecx, [esp + 0x10]
mov byte [esp + 0x338], 1
call sub.MFC42.DLL_CString::CString
jmp 0x40fa75
mov ecx, esi
call fcn.0040fac0
cmp eax, 5
push edi
jle 0x40fa69
lea edx, [esp + 0x10]
mov ecx, esi
push edx
call fcn.0040fb90
jmp 0x40fa75
lea eax, [esp + 0x10]
mov ecx, esi
push eax
call fcn.0040fcb0
lea ecx, [esp + 0x14]
mov byte [esp + 0x338], bl
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0xc]
mov dword [esp + 0x338], 0xffffffff
call sub.MFC42.DLL_CString::CString
xor eax, eax
mov ecx, dword [esp + 0x330]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
add esp, 0x330
ret 4