Function at 0x4022f8
Capabilities:
Check if file exists
Create process on windows
Read .ini file

Disassembly:
mov eax, 0x40b3a0
call fcn.0040adc0
sub esp, 0x33c
push ebx
push esi
push edi
xor ebx, ebx
lea ecx, [ebp - 0x14]
mov dword [ebp - 4], ebx
call sub.MFC42.DLL_CString::CString_2
push dword [ebp + 8]
lea eax, [ebp - 0x14]
mov byte [ebp - 4], 1
push str._sqgiinstall.cfg
push eax
call sub.MFC42.DLL_CString::Format
add esp, 0xc
push dword [ebp - 0x14]
push ebx
push str.UpdateFileNum
push str.VerInfo
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
cmp eax, ebx
mov dword [ebp - 0x38], eax
mov esi, 0x40f7f4
jle 0x402611
xor edi, edi
cmp eax, ebx
jle 0x402611
lea ecx, [ebp - 0x1c]
call sub.MFC42.DLL_CString::CString_2
inc edi
lea eax, [ebp - 0x1c]
push edi
push str.File_d
push eax
mov byte [ebp - 4], 2
mov dword [ebp - 0x3c], edi
call sub.MFC42.DLL_CString::Format
add esp, 0xc
push dword [ebp - 0x14]
push ebx
push str.RegFlag
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
cmp eax, ebx
je 0x4025f9
push 0x40
xor eax, eax
pop ecx
lea edi, [ebp - 0x347]
mov byte [ebp - 0x348], bl
push 0x40
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
pop ecx
xor eax, eax
lea edi, [ebp - 0x243]
mov byte [ebp - 0x244], bl
rep stosd dword es:[edi], eax
push dword [ebp - 0x14]
stosw word es:[edi], ax
stosb byte es:[edi], al
mov edi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
lea eax, [ebp - 0x348]
push 0x104
push eax
push esi
push str.FilePath
push dword [ebp - 0x1c]
call edi
push dword [ebp - 0x14]
lea eax, [ebp - 0x244]
push 0x104
push eax
push esi
push str.FileName
push dword [ebp - 0x1c]
call edi
push esi
lea ecx, [ebp - 0x10]
call fcn.0040abe4
lea eax, [ebp - 0x244]
mov byte [ebp - 4], 3
push eax
lea eax, [ebp - 0x348]
push eax
lea eax, [ebp - 0x10]
push str._s_s
push eax
call sub.MFC42.DLL_CString::Format
mov eax, dword [ebp - 0x10]
add esp, 0x10
lea ecx, [ebp - 0x10]
mov eax, dword [eax - 8]
dec eax
push eax
lea eax, [ebp - 0x2c]
push eax
call sub.MFC42.DLL_CString::Right
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 4
call sub.MFC42.DLL_CString::operator
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 3
call sub.MFC42.DLL_CString::CString
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp + 8]
push eax
lea eax, [ebp - 0x34]
push eax
call sub.MFC42.DLL_operator_1
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 5
call sub.MFC42.DLL_CString::operator
lea ecx, [ebp - 0x34]
mov byte [ebp - 4], 3
call sub.MFC42.DLL_CString::CString
push dword [ebp - 0x10]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
cmp eax, 1
jne 0x4025ed
lea eax, [ebp - 0x20]
push 3
push eax
lea ecx, [ebp - 0x10]
call sub.MFC42.DLL_CString::Right
mov edi, dword [sym.imp.MSVCRT.dll__mbsicmp]
push 0x40f384
push dword [ebp - 0x20]
mov byte [ebp - 4], 6
call edi
pop ecx
test eax, eax
pop ecx
jne 0x402527
push ebx
push esi
push str._regserver
push dword [ebp - 0x10]
push str.open
push ebx
call dword [sym.imp.SHELL32.dll_ShellExecuteA]
lea ecx, [ebp - 0x28]
call sub.MFC42.DLL_CString::CString_2
push dword [ebp - 0x10]
lea eax, [ebp - 0x28]
mov byte [ebp - 4], 7
push 0x40f360
push eax
call sub.MFC42.DLL_CString::Format
add esp, 0xc
lea eax, [ebp - 0x28]
push ebx
push ecx
mov ecx, esp
mov dword [ebp - 0x30], esp
push eax
call sub.MFC42.DLL_CString::CString_1
call fcn.00402ef6
pop ecx
push eax
push 0x40e
push dword [0x40f908]
call dword [sym.imp.USER32.dll_PostMessageA]
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x28]
jmp 0x4025dc
push 0x40f35c
push dword [ebp - 0x20]
call edi
pop ecx
test eax, eax
pop ecx
je 0x40254b
push 0x40f358
push dword [ebp - 0x20]
call edi
pop ecx
test eax, eax
pop ecx
jne 0x4025e1
lea ecx, [ebp - 0x18]
call sub.MFC42.DLL_CString::CString_2
push dword [ebp - 0x10]
lea eax, [ebp - 0x18]
mov byte [ebp - 4], 8
push str._s___s_
push eax
call sub.MFC42.DLL_CString::Format
add esp, 0xc
push ebx
push esi
push dword [ebp - 0x18]
push str.regsvr32
push str.open
push ebx
call dword [sym.imp.SHELL32.dll_ShellExecuteA]
lea ecx, [ebp - 0x24]
call sub.MFC42.DLL_CString::CString_2
push dword [ebp - 0x10]
lea eax, [ebp - 0x24]
mov byte [ebp - 4], 9
push 0x40f360
push eax
call sub.MFC42.DLL_CString::Format
add esp, 0xc
lea eax, [ebp - 0x24]
push ebx
push ecx
mov ecx, esp
mov dword [ebp - 0x30], esp
push eax
call sub.MFC42.DLL_CString::CString_1
call fcn.00402ef6
pop ecx
push eax
push 0x40e
push dword [0x40f908]
call dword [sym.imp.USER32.dll_PostMessageA]
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 8
call sub.MFC42.DLL_CString::CString
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x18]
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 3
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 2
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 1
call sub.MFC42.DLL_CString::CString
mov edi, dword [ebp - 0x3c]
cmp edi, dword [ebp - 0x38]
jl 0x40235e
push 0x40
xor eax, eax
pop ecx
lea edi, [ebp - 0x13f]
mov byte [ebp - 0x140], bl
push ebx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea ecx, [ebp - 0x14]
stosb byte es:[edi], al
call sub.MFC42.DLL_CString::GetBuffer
push eax
lea eax, [ebp - 0x140]
push 0x104
push eax
push esi
push str.ExeName
push str.VerInfo
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
lea eax, [ebp - 0x140]
push eax
call sub.MSVCRT.dll_strlen
test eax, eax
pop ecx
jbe 0x4026a8
lea ecx, [ebp - 0x18]
call sub.MFC42.DLL_CString::CString_2
lea eax, [ebp - 0x140]
mov byte [ebp - 4], 0xa
push eax
lea eax, [ebp - 0x18]
push dword [0x40f824]
push str._s_s
push eax
call sub.MFC42.DLL_CString::Format
add esp, 0x10
push 5
push esi
push esi
push dword [ebp - 0x18]
push str.open
push ebx
call dword [sym.imp.SHELL32.dll_ShellExecuteA]
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 1
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], bl
call sub.MFC42.DLL_CString::CString
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 8]
call sub.MFC42.DLL_CString::CString
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret 4