Function at 0x409efa
Capabilities:
Copy file
Query or enumerate registry value

Disassembly:
mov eax, 0x40f984
call sub.MSVCRT.dll__EH_prolog
sub esp, 0x14c
mov al, byte [0x4168a0]
push ebx
push esi
push edi
mov dword [ebp - 0x2c], ecx
push 0x40
mov byte [ebp - 0x158], al
pop ecx
xor eax, eax
lea edi, [ebp - 0x157]
rep stosd dword es:[edi], eax
and dword [ebp - 0x18], 0
mov esi, 0x104
stosw word es:[edi], ax
lea ecx, [ebp - 0x14]
mov dword [ebp - 0x28], 1
mov dword [ebp - 0x24], esi
stosb byte es:[edi], al
call sub.MFC42.DLL_CString::CString_1
and dword [ebp - 4], 0
lea ecx, [ebp - 0x20]
call sub.MFC42.DLL_CString::CString_1
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 1
call sub.MFC42.DLL_CString::CString_1
mov eax, dword [ebp + 8]
mov edi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
lea ecx, [ebp - 0x18]
mov ebx, 0x80000002
mov eax, dword [eax]
push ecx
push eax
push ebx
mov byte [ebp - 4], 2
call edi
test eax, eax
jne 0x409fee
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x158]
push eax
lea eax, [ebp - 0x28]
push eax
push 0
push str.CurVer
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x409fee
push dword [ebp + 8]
lea ecx, [ebp - 0x1c]
call fcn.0040e3b4
call sub.MFC42.DLL_AfxGetEmptyString
mov eax, dword [eax]
lea ecx, [ebp + 8]
mov dword [ebp + 8], eax
lea eax, [ebp - 0x158]
push eax
call fcn.0040e3ba
lea eax, [ebp + 8]
lea ecx, [ebp - 0x1c]
push eax
mov byte [ebp - 4], 3
call sub.MFC42.DLL_CString::operator_1
lea ecx, [ebp + 8]
mov byte [ebp - 4], 2
call fcn.0040e3ae
push 0x415a2c
lea ecx, [ebp - 0x1c]
call sub.MFC42.DLL_CString::operator
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push esi
lea eax, [ebp - 0x158]
push 0
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
lea eax, [ebp - 0x18]
mov dword [ebp - 0x28], 1
mov dword [ebp - 0x24], esi
push eax
push dword [ebp - 0x1c]
push ebx
call edi
xor edi, edi
cmp eax, edi
jne 0x40a054
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x158]
push eax
lea eax, [ebp - 0x28]
push eax
push edi
push str.InstallDir
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
cmp eax, edi
jne 0x40a054
lea eax, [ebp - 0x158]
lea ecx, [ebp - 0x14]
push eax
call fcn.0040e3ba
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 0x14]
cmp dword [eax - 8], edi
jne 0x40a06c
xor esi, esi
jmp 0x40a23f
lea eax, [ebp + 8]
push 1
push eax
lea ecx, [ebp - 0x14]
call sub.MFC42.DLL_CString::Right
mov eax, dword [eax]
mov esi, 0x415a2c
push esi
push eax
call dword [sym.imp.MSVCRT.dll__mbscmp]
pop ecx
pop ecx
test eax, eax
lea ecx, [ebp + 8]
setne bl
call fcn.0040e3ae
test bl, bl
je 0x40a0a5
push esi
lea ecx, [ebp - 0x14]
call sub.MFC42.DLL_CString::operator
push str.icad.lsp
lea ecx, [ebp - 0x14]
call sub.MFC42.DLL_CString::operator
lea eax, [ebp - 0x14]
lea ecx, [ebp - 0x20]
push eax
call fcn.0040e3b4
push str..bak
lea ecx, [ebp - 0x20]
call sub.MFC42.DLL_CString::operator
push edi
push dword [ebp - 0x20]
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_CopyFileA]
lea ecx, [ebp - 0x54]
call sub.MFC42.DLL_CStdioFile::CStdioFile
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 4
call sub.MFC42.DLL_CString::CString_1
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 5
call sub.MFC42.DLL_CStringArray::CStringArray
push edi
push 0x3000
push dword [ebp - 0x14]
lea ecx, [ebp - 0x54]
mov byte [ebp - 4], 6
call sub.MFC42.DLL_CStdioFile::Open
test eax, eax
je 0x40a219
lea eax, [ebp - 0x10]
lea ecx, [ebp - 0x54]
push eax
call sub.MFC42.DLL_CStdioFile::ReadString
mov edi, str.i2kstdloader.dll
test eax, eax
je 0x40a15f
push edi
lea ecx, [ebp - 0x10]
call sub.MFC42.DLL_CString::Find_1
cmp eax, 0xffffffff
jne 0x40a151
push 0xa
lea ecx, [ebp - 0x10]
call sub.MFC42.DLL_CString::operator_2
lea eax, [ebp - 0x10]
lea ecx, [ebp - 0x40]
push eax
push dword [ebp - 0x38]
call sub.MFC42.DLL_CStringArray::SetAtGrow
lea eax, [ebp - 0x10]
lea ecx, [ebp - 0x54]
push eax
call sub.MFC42.DLL_CStdioFile::ReadString
jmp 0x40a126
push str._xload__
lea ecx, [ebp - 0x10]
call fcn.0040e3ba
mov eax, dword [ebp - 0x2c]
lea ecx, [ebp - 0x10]
add eax, 0x1e0
push eax
call sub.MFC42.DLL_CString::operator_1
push edi
lea ecx, [ebp - 0x10]
call sub.MFC42.DLL_CString::operator
push 0x416788
lea ecx, [ebp - 0x10]
call sub.MFC42.DLL_CString::operator
push 0xa
lea ecx, [ebp - 0x10]
call sub.MFC42.DLL_CString::operator_2
push 0x416784
push esi
lea ecx, [ebp - 0x10]
call sub.MFC42.DLL_CString::Replace
lea eax, [ebp - 0x10]
lea ecx, [ebp - 0x40]
push eax
push dword [ebp - 0x38]
call sub.MFC42.DLL_CStringArray::SetAtGrow
lea ecx, [ebp - 0x54]
call sub.MFC42.DLL_CStdioFile::Close
push 0
push 0x1001
push dword [ebp - 0x14]
lea ecx, [ebp - 0x54]
call sub.MFC42.DLL_CStdioFile::Open
test eax, eax
je 0x40a219
xor esi, esi
cmp dword [ebp - 0x38], esi
jle 0x40a20c
lea eax, [ebp + 8]
push esi
push eax
lea ecx, [ebp - 0x40]
call fcn.00402a7d
push dword [eax]
lea ecx, [ebp - 0x54]
mov byte [ebp - 4], 7
call sub.MFC42.DLL_CStdioFile::WriteString
lea ecx, [ebp + 8]
mov byte [ebp - 4], 6
call fcn.0040e3ae
inc esi
cmp esi, dword [ebp - 0x38]
jl 0x40a1df
lea ecx, [ebp - 0x54]
call sub.MFC42.DLL_CStdioFile::Close
push 1
pop esi
jmp 0x40a21b
xor esi, esi
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 5
call fcn.0040e372
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 4
call fcn.0040e3ae
lea ecx, [ebp - 0x54]
mov byte [ebp - 4], 2
call fcn.0040e5a0
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 1
call fcn.0040e3ae
and byte [ebp - 4], 0
lea ecx, [ebp - 0x20]
call fcn.0040e3ae
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x14]
call fcn.0040e3ae
mov ecx, dword [ebp - 0xc]
mov eax, esi
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 4