Function at 0x403470
Capabilities:
Check if file exists
Copy file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4063fa
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x240
push ebx
mov dword [ebp - 0x14], ecx
push esi
push edi
mov ecx, 0x41
xor eax, eax
lea edi, [ebp - 0x24c]
lea edx, [ebp - 0x24c]
rep stosd dword es:[edi], eax
mov ecx, 0x41
lea edi, [ebp - 0x144]
rep stosd dword es:[edi], eax
mov edi, dword [ebp + 0xc]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov dword [ebp - 0x10], esp
mov eax, ecx
mov esi, edi
shr ecx, 2
mov edi, edx
lea edx, [ebp - 0x24c]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
or ecx, 0xffffffff
mov edi, str.midas.dll
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
or ecx, 0xffffffff
mov edi, edx
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [ebp - 0x144]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp + 8]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [ebp - 0x144]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.midas.dll
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [ebp - 0x144]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
lea ecx, [ebp + 8]
call sub.MFC42.DLL_CString::CString_2
mov ecx, dword [ebp + 8]
xor ebx, ebx
push ecx
mov dword [ebp - 4], ebx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x40378c
lea edx, [ebp - 0x144]
push ebx
lea eax, [ebp - 0x24c]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileA]
push ebx
call dword [sym.imp.ole32.dll_CoInitialize]
mov ecx, dword [ebp - 0x14]
add ecx, 0xb0
push ecx
lea ecx, [ebp - 0x14]
call sub.MFC42.DLL_CString::CString_2
push str.midas.dll
lea edx, [ebp + 0xc]
push eax
push edx
mov byte [ebp - 4], 1
call sub.MFC42.DLL_operator_2
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 3
call fcn.00405c42
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
cmp esi, ebx
mov dword [ebp - 0x38], esi
jne 0x4035eb
push ebx
push 0x10
push 0x40a720
jmp 0x403629
push str.DllRegisterServer
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, ebx
mov byte [ebp - 4], 4
je 0x40361a
call eax
cmp eax, ebx
jge 0x40376d
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push ebx
push 0x10
push 0x40a700
jmp 0x403629
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push ebx
push 0x10
push 0x40a6e0
call sub.MFC42.DLL_AfxMessageBox
lea ecx, [ebp + 0xc]
mov byte [ebp - 4], bl
call fcn.00405c42
lea ecx, [ebp + 8]
mov dword [ebp - 4], 0xffffffff
call fcn.00405c42
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
push esi
mov dword [ebp - 4], 3
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
call dword [sym.imp.ole32.dll_CoUninitialize]
lea ecx, [ebp + 0xc]
mov byte [ebp - 4], bl
call fcn.00405c42
lea ecx, [ebp + 8]
mov dword [ebp - 4], 0xffffffff
call fcn.00405c42
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov al, 1
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 8