Function at 0x401000
Capabilities:
Get common file path
Set registry value
Terminate process

Disassembly:
sub esp, 0x238
push ebx
push ebp
push esi
push edi
push str.Setting_up_the_registry_...._r_n
call fcn.00401780
add esp, 4
lea eax, [esp + 0x148]
push eax
push 0xff
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
lea ecx, [esp + 0x18]
lea edx, [esp + 0x10]
push ecx
mov edi, dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
push edx
push 0
push 0xf003f
push 0
push 0
push 0
push str.SOFTWAREMicrosoftMicrosoft_GamesAge_of_Empires_Expansion
push 0x80000002
call edi
mov esi, dword [sym.imp.USER32.dll_MessageBoxA]
mov ebx, dword [sym.imp.KERNEL32.dll_ExitProcess]
test eax, eax
je 0x401077
push 0
push str.Error_
push str.Error_creating_key_
push 0
call esi
push 0
call ebx
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [esp + 0x18]
lea edx, [esp + 0x10]
push ecx
push edx
push 0
push 0xf003f
push 0
push 0
push 0
push str.SOFTWAREMicrosoftMicrosoft_GamesAge_of_Empires_Expansion1.0
push 0x80000002
call edi
test eax, eax
je 0x4010bd
push 0
push str.Error_
push str.Error_creating_key_
push 0
call esi
push 0
call ebx
mov edi, 0x406310
or ecx, 0xffffffff
xor eax, eax
mov ebp, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
repne scasb al, byte es:[edi]
not ecx
push ecx
push 0x406310
push 1
push eax
mov eax, dword [esp + 0x20]
push str.Version
push eax
call ebp
test eax, eax
je 0x4010fe
push 0
push str.Error_
push str.Error_setting_value...
push 0
call esi
push 0
call ebx
mov edi, str.http:__www.zone.com_asp_aeepredir.asp
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
push ecx
mov ecx, dword [esp + 0x14]
push str.http:__www.zone.com_asp_aeepredir.asp
push 1
push eax
push str.Zone
push ecx
call ebp
test eax, eax
je 0x401139
push 0
push str.Error_
push str.Error_setting_value...
push 0
call esi
push 0
call ebx
mov edi, 0x4062bc
or ecx, 0xffffffff
xor eax, eax
mov edx, dword [esp + 0x10]
repne scasb al, byte es:[edi]
not ecx
push ecx
push 0x4062bc
push 1
push eax
push str.Launched
push edx
call ebp
test eax, eax
je 0x401174
push 0
push str.Error_
push str.Error_setting_value...
push 0
call esi
push 0
call ebx
mov edi, str.83622_442_7926675_57956
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
push ecx
push str.83622_442_7926675_57956
push 1
push eax
mov eax, dword [esp + 0x20]
push 0x406294
push eax
call ebp
test eax, eax
je 0x4011af
push 0
push str.Error_
push str.Error_setting_value...
push 0
call esi
push 0
call ebx
lea ecx, [esp + 0x148]
lea edx, [esp + 0x1c]
push ecx
push 0x406290
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
lea edi, [esp + 0x28]
or ecx, 0xffffffff
xor eax, eax
add esp, 0xc
repne scasb al, byte es:[edi]
not ecx
lea eax, [esp + 0x1c]
push ecx
mov ecx, dword [esp + 0x14]
push eax
push 1
push 0
push str.EXE_Path
push ecx
call ebp
test eax, eax
je 0x401205
push 0
push str.Error_
push str.Error_setting_value...
push 0
call esi
push 0
call ebx
mov edi, str.RetailVersion
or ecx, 0xffffffff
xor eax, eax
mov edx, dword [esp + 0x10]
repne scasb al, byte es:[edi]
not ecx
push ecx
push str.RetailVersion
push 1
push eax
push str.VersionType
push edx
call ebp
test eax, eax
je 0x401240
push 0
push str.Error_
push str.Error_setting_value...
push 0
call esi
push 0
call ebx
mov edi, 0x406264
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
push ecx
push 0x406264
push 1
push eax
mov eax, dword [esp + 0x20]
push str.InstalledGroup
push eax
call ebp
test eax, eax
je 0x40127b
push 0
push str.Error_
push str.Error_setting_value...
push 0
call esi
push 0
call ebx
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x14]
push 4
push ecx
push 4
push 0
push str.LangID
push edx
mov dword [esp + 0x2c], 9
call ebp
test eax, eax
je 0x4012b2
push 0
push str.Error_
push str.Error_setting_value...
push 0
call esi
push 0
call ebx
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [esp + 0x18]
lea edx, [esp + 0x10]
push ecx
push edx
push 0
push 0xf003f
push 0
push 0
push 0
push str.SOFTWAREMicrosoftDirectPlayApplicationsAge_of_Empires_Expansion
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
je 0x4012fc
push 0
push str.Error_
push str.Error_creating_key_
push 0
call esi
push 0
call ebx
mov edi, str.8701C5C1_337B_11d2_839B_00609707F508
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
push ecx
push str.8701C5C1_337B_11d2_839B_00609707F508
push 1
push eax
mov eax, dword [esp + 0x20]
push str.Guid
push eax
call ebp
test eax, eax
je 0x401337
push 0
push str.Error_
push str.Error_setting_value...
push 0
call esi
push 0
call ebx
mov edi, str.EmpiresX.Exe
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
push ecx
mov ecx, dword [esp + 0x14]
push str.EmpiresX.Exe
push 1
push eax
push str.File
push ecx
call ebp
test eax, eax
je 0x401372
push 0
push str.Error_
push str.Error_setting_value...
push 0
call esi
push 0
call ebx
mov edi, str.lobby
or ecx, 0xffffffff
xor eax, eax
mov edx, dword [esp + 0x10]
repne scasb al, byte es:[edi]
not ecx
push ecx
push str.lobby
push 1
push eax
push str.CommandLine
push edx
call ebp
test eax, eax
je 0x4013ad
push 0
push str.Error_
push str.Error_setting_value...
push 0
call esi
push 0
call ebx
lea eax, [esp + 0x148]
lea ecx, [esp + 0x1c]
push eax
push 0x406290
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
lea edi, [esp + 0x28]
or ecx, 0xffffffff
xor eax, eax
add esp, 0xc
repne scasb al, byte es:[edi]
not ecx
lea edx, [esp + 0x1c]
push ecx
push edx
push 1
push eax
mov eax, dword [esp + 0x20]
push str.CurrentDirectory
push eax
call ebp
test eax, eax
je 0x401402
push 0
push str.Error_
push str.Error_setting_value...
push 0
call esi
push 0
call ebx
lea ecx, [esp + 0x148]
lea edx, [esp + 0x1c]
push ecx
push 0x406290
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
lea edi, [esp + 0x28]
or ecx, 0xffffffff
xor eax, eax
add esp, 0xc
repne scasb al, byte es:[edi]
not ecx
lea eax, [esp + 0x1c]
push ecx
mov ecx, dword [esp + 0x14]
push eax
push 1
push 0
push str.Path
push ecx
call ebp
test eax, eax
je 0x401458
push 0
push str.Error_
push str.Error_setting_value...
push 0
call esi
push 0
call ebx
mov edx, dword [esp + 0x10]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edx
call edi
lea eax, [esp + 0x18]
lea ecx, [esp + 0x10]
push eax
push ecx
push 0
push 0xf003f
push 0
push 0
push 0
push str.SOFTWAREMicrosoftGames
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
je 0x4014a4
push 0
push str.Error_
push str.Error_creating_key_
push 0
call esi
push 0
call ebx
mov edx, dword [esp + 0x10]
push edx
call edi
lea eax, [esp + 0x18]
lea ecx, [esp + 0x10]
push eax
push ecx
push 0
push 0xf003f
push 0
push 0
push 0
push str.SOFTWAREMicrosoftGamesAge_of_Empires
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
je 0x4014ea
push 0
push str.Error_
push str.Error_creating_key_
push 0
call esi
push 0
call ebx
mov edx, dword [esp + 0x10]
push edx
call edi
lea eax, [esp + 0x18]
lea ecx, [esp + 0x10]
push eax
xor edi, edi
push ecx
push edi
push 0xf003f
push edi
push edi
push edi
push str.SOFTWAREMicrosoftGamesAge_of_Empires1.00
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
je 0x40152b
push edi
push str.Error_
push str.Error_creating_key_
push edi
call esi
push edi
call ebx
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x14]
push 4
push edx
push 4
push edi
push str.Custom_Mouse
push eax
mov dword [esp + 0x2c], edi
call ebp
test eax, eax
je 0x40155a
push edi
push str.Error_
push str.Error_setting_value...
push edi
call esi
push edi
call ebx
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x14]
push 4
push ecx
push 4
push edi
push str.Game_File_Number
push edx
mov dword [esp + 0x2c], edi
call ebp
test eax, eax
je 0x401589
push edi
push str.Error_
push str.Error_setting_value...
push edi
call esi
push edi
call ebx
lea eax, [esp + 0x148]
lea ecx, [esp + 0x1c]
push eax
push 0x4060f4
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
lea edi, [esp + 0x28]
or ecx, 0xffffffff
xor eax, eax
add esp, 0xc
repne scasb al, byte es:[edi]
not ecx
lea edx, [esp + 0x1c]
push ecx
push edx
push 1
push eax
mov eax, dword [esp + 0x20]
push str.CDPath
push eax
call ebp
test eax, eax
je 0x4015de
push 0
push str.Error_
push str.Error_setting_value...
push 0
call esi
push 0
call ebx
mov edi, str.00000_000_0000000_00000
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
push ecx
mov ecx, dword [esp + 0x14]
push str.00000_000_0000000_00000
push 1
push eax
push 0x406294
push ecx
call ebp
test eax, eax
je 0x401619
push 0
push str.Error_
push str.Error_setting_value...
push 0
call esi
push 0
call ebx
mov edi, 0x406264
or ecx, 0xffffffff
xor eax, eax
mov edx, dword [esp + 0x10]
repne scasb al, byte es:[edi]
not ecx
push ecx
push 0x406264
push 1
push eax
push str.InstallType
push edx
call ebp
test eax, eax
je 0x401654
push 0
push str.Error_
push str.Error_setting_value...
push 0
call esi
push 0
call ebx
lea eax, [esp + 0x148]
lea ecx, [esp + 0x1c]
push eax
push 0x406290
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
lea edi, [esp + 0x28]
or ecx, 0xffffffff
xor eax, eax
add esp, 0xc
repne scasb al, byte es:[edi]
not ecx
lea edx, [esp + 0x1c]
push ecx
push edx
push 1
push eax
mov eax, dword [esp + 0x20]
push str.InstallationDirectory
push eax
call ebp
test eax, eax
je 0x4016a9
push 0
push str.Error_
push str.Error_setting_value...
push 0
call esi
push 0
call ebx
mov edi, str.http:__www.zone.com_asp_aoferedir.asp
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
push ecx
mov ecx, dword [esp + 0x14]
push str.http:__www.zone.com_asp_aoferedir.asp
push 1
push eax
push str.Zone
push ecx
call ebp
test eax, eax
je 0x4016e4
push 0
push str.Error_
push str.Error_setting_value...
push 0
call esi
push 0
call ebx
mov edi, 0x4062bc
or ecx, 0xffffffff
xor eax, eax
mov edx, dword [esp + 0x10]
repne scasb al, byte es:[edi]
not ecx
push ecx
push 0x4062bc
push 1
push eax
push str.Launched
push edx
call ebp
test eax, eax
je 0x40171f
push 0
push str.Error_
push str.Error_setting_value...
push 0
call esi
push 0
call ebx
mov edi, str.RetailVersion
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
push ecx
push str.RetailVersion
push 1
push eax
mov eax, dword [esp + 0x20]
push str.VersionType
push eax
call ebp
test eax, eax
je 0x40175a
push 0
push str.Error_
push str.Error_setting_value...
push 0
call esi
push 0
call ebx
push str.Registry_successfully_updated_r_nSetup.exe_was_created_using_RegLex__c__brainski_1998_r_n
call fcn.00401780
add esp, 4
push 0xbb8
call dword [sym.imp.KERNEL32.dll_Sleep]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x238
ret