[Bug 36086] Installation of Half-Life Opposing Force fails due to file "ereg.dll" being read-only

wine-bugs at winehq.org wine-bugs at winehq.org
Sun Nov 22 06:55:48 CST 2015


https://bugs.winehq.org/show_bug.cgi?id=36086

Anastasius Focht <focht at gmx.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |Installer
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED
            Summary|Installation of Half-Life   |Installation of Half-Life
                   |Opposing Force fails due to |Opposing Force fails due to
                   |file "ereg.dll"             |file "ereg.dll" being
                   |                            |read-only

--- Comment #2 from Anastasius Focht <focht at gmx.net> ---
Hello folks,

I can't reproduce this, resolving 'FIXED'.

Found a distributed backup, thanks to some people still seeding old stuff.
Problem: The 'Half-Life: Opposing Force' installer requires Half-Life
installation.

Tracing the installer helped to figure out what stuff to fake existing HL
installation.

--- snip ---
...
0029:Call advapi32.RegOpenKeyExA(80000002,0033dae4
"SOFTWARE\\Valve\\Half-Life\\Autorun",00000000,00000001,0033d8c0) ret=10005119
0029:Ret  advapi32.RegOpenKeyExA() retval=00000002 ret=10005119
...
0029:Call user32.DrawTextA(0015002d,0033f17c "Half-Life is not installed on
this system.  Setup is unable to continue.  Please install Half-Life and then
restart the installation of Opposing Force.",ffffffff,0033dc44,00000c50)
ret=10013a7e 
--- snip ---

--- snip ---
0033:Call advapi32.RegQueryValueExA(00000088,0033dbe4
"Installed",00000000,0033d8c4,005322f8,0033d8b4) ret=1000513c
0033:Ret  advapi32.RegQueryValueExA() retval=00000002 ret=1000513c
--- snip ---

-> REG_DWORD = 0x1

--- snip ---
...
0045:Call advapi32.RegOpenKeyExA(80000002,0033dae4
"SOFTWARE\\VALVE\\HALF-LIFE",00000000,00000001,0033d8c0) ret=10005119
0045:Ret  advapi32.RegOpenKeyExA() retval=00000000 ret=10005119
0045:Call advapi32.RegQueryValueExA(00000088,0033dbe4
"INSTALLPATH",00000000,0033d8c4,005322f8,0033d8b4) ret=1000513c
0045:Ret  advapi32.RegQueryValueExA() retval=00000002 ret=1000513c
...
0045:Call user32.DrawTextA(0015002d,0033f17c "The version of Half-Life
installed on this system is not the US ENGLISH LANGUAGE version.  The US
ENGLISH LANGUAGE version of Opposing Force is incompatible with other localized
versions.  Setup is unable to continue.",ffffffff,0033dc44,00000c50)
ret=10013a7e 
--- snip ---

Created REG_SZ 'INSTALLPATH' with some 'C:\Program Files\Half-Life' directory.

--- snip ---
002a:Call KERNEL32.GetPrivateProfileStringA(10024200 "Ident",10023f00
"ShortTitle",10023a9c "",0033dbe8,00000100,10024100 "c:\\program
files\\half-life\\sierra.inf") ret=1000de62
002a:Ret  KERNEL32.GetPrivateProfileStringA() retval=00000000 ret=1000de62
--- snip ---

Created a file named 'Sierra.inf' with reduced content:

--- snip ---
[Ident]
SHORTTITLE=HALFLIFE
TITLE=HALFLIFE
--- snip ---

Now the actual 'HL:OP' installer, starting with 'autorun':

--- snip ---
...
0039:Call KERNEL32.GetFileAttributesA(0033e5e0 "C:\\Program Files\\Sierra
On-Line\\ereg.dll") ret=10013485
0039:Ret  KERNEL32.GetFileAttributesA() retval=ffffffff ret=10013485
...
0039:Call KERNEL32.CreateDirectoryA(0033e5e0 "C:\\Program Files\\Sierra
On-Line",00000000) ret=1000be32
0039:Ret  KERNEL32.CreateDirectoryA() retval=00000001 ret=1000be32
...
0039:Call KERNEL32.CreateFileA(0033ded0
"Z:\\home\\focht\\iso\\ereg.dll",80000000,00000001,00000000,00000003,00000080,00000000)
ret=100131cf
0039:Ret  KERNEL32.CreateFileA() retval=000000a0 ret=100131cf
...
0039:Call KERNEL32.SetFileAttributesA(0033d450 "C:\\Program Files\\Sierra
On-Line\\~GLH0025.TMP",00000000) ret=1000bfed
0039:Ret  KERNEL32.SetFileAttributesA() retval=00000000 ret=1000bfed
0039:Call KERNEL32.CreateFileA(0033d450 "C:\\Program Files\\Sierra
On-Line\\~GLH0025.TMP",40000000,00000000,00000000,00000002,00000080,00000000)
ret=100131cf
0039:Ret  KERNEL32.CreateFileA() retval=000000a8 ret=100131cf
...
0039:Call KERNEL32.DeleteFileA(0033e5e0 "C:\\Program Files\\Sierra
On-Line\\ereg.dll") ret=10006d2f
0039:Ret  KERNEL32.DeleteFileA() retval=00000000 ret=10006d2f
0039:Call KERNEL32.GetFileAttributesA(0033e5e0 "C:\\Program Files\\Sierra
On-Line\\ereg.dll") ret=10013485
0039:Ret  KERNEL32.GetFileAttributesA() retval=ffffffff ret=10013485
0039:Call KERNEL32.MoveFileA(0033ded0 "C:\\Program Files\\Sierra
On-Line\\~GLH0025.TMP",0033e5e0 "C:\\Program Files\\Sierra On-Line\\ereg.dll")
ret=10006d88
0039:Ret  KERNEL32.MoveFileA() retval=00000001 ret=10006d88
...
0039:Call advapi32.RegOpenKeyExA(80000002,10020198
"Software\\Microsoft\\Windows\\CurrentVersion\\SharedDLLs",00000000,00000001,0033d338)
ret=10005119
...
0039:Ret  advapi32.RegOpenKeyExA() retval=00000000 ret=10005119
0039:Call advapi32.RegQueryValueExA(000000a0,0033d360 "C:\\Program
Files\\Sierra On-Line\\ereg.dll",00000000,0033d33c,0033d460,0033d32c)
ret=1000513c
0039:Ret  advapi32.RegQueryValueExA() retval=00000002 ret=1000513c
...
0039:Call KERNEL32.CreateProcessW(00000000,0033c7c0 L"\"rundll32.exe\"
ereg.dll,_StandAloneEreg at 16
C:\\PROG~FBU\\HALF~DAR\\gearbox\\sierra.inf",00000000,00000000,00000000,00000410,00000000,001da508
L"C:\\PROG~FBU\\SIER~ZBI",0033c290,0033c280) ret=7e3b8d3a 
...
0016:Call KERNEL32.__wine_kernel_init() ret=7bc6cd23
0039:Ret  KERNEL32.CreateProcessW() retval=00000001 ret=7e3b8d3a 
...
0016:Call KERNEL32.LoadLibraryW(00135578 L"ereg.dll") ret=7effd33b 
...
0016:Ret  PE DLL (proc=0x100056db,module=0x10000000
L"ereg.dll",reason=PROCESS_ATTACH,res=(nil)) retval=1
0016:Ret  KERNEL32.LoadLibraryW() retval=10000000 ret=7effd33b
...
0016:Call KERNEL32.GetProcAddress(10000000,00148b40 "_StandAloneEreg at 16W")
ret=7effce60
0016:Ret  KERNEL32.GetProcAddress() retval=00000000 ret=7effce60
0016:Call KERNEL32.GetProcAddress(10000000,00148b40 "_StandAloneEreg at 16A")
ret=7effce9d
0016:Ret  KERNEL32.GetProcAddress() retval=00000000 ret=7effce9d
0016:Call KERNEL32.GetProcAddress(10000000,00148b40 "_StandAloneEreg at 16")
ret=7effced1
0016:Ret  KERNEL32.GetProcAddress() retval=1000129a ret=7effced1
...
0016:Call KERNEL32.WritePrivateProfileStringA(100200c8 "Config",100200dc
"MachineID",009a3368 "{15E04998-99C7-42A2-A1BD-7FE26E28508E}",100200d0
"SIERRA.INI") ret=10001282
0016:Ret  KERNEL32.WritePrivateProfileStringA() retval=00000001 ret=10001282
...
0016:Call shell32.ShellExecuteA(00000000,00000000,009aba00
"http://reg.sierra.com/prodreg.htmlw?sku70832",00000000,00000000,00000001)
ret=100014a9 
...
0016:Ret  shell32.ShellExecuteA() retval=00000021 ret=100014a9 
...
0016:Call PE DLL (proc=0x100056db,module=0x10000000
L"ereg.dll",reason=PROCESS_DETACH,res=(nil)) 
...
0016:Call KERNEL32.ExitProcess(00000000) ret=7effd863 
...
0039:Ret  KERNEL32.WaitForSingleObject() retval=00000000 ret=1000c299 
--- snip ---

Everything works as designed.

Source:

--- snip ---
$ ls -l iso/ereg*
-r--r--r--. 1 root root 201728 Jul 14  1997 iso/ereg3201.dll
-r--r--r--. 1 root root 274432 Nov  3  1999 iso/ereg.dll
--- snip ---

Destination:

--- snip ---
$ ls -l .wine/drive_c/Program\ Files/Sierra\ On-Line/ereg*
-rw-rw-r--. 1 focht focht 201728 Jul 14  1997 .wine/drive_c/Program
Files/Sierra On-Line/ereg3201.dll
-rw-rw-r--. 1 focht focht 274432 Nov  3  1999 .wine/drive_c/Program
Files/Sierra On-Line/ereg.dll
--- snip ---

ProtectionID scan:

--- snip ---
-=[ ProtectionID v0.6.6.7 DECEMBER]=-
(c) 2003-2015 CDKiLLER & TippeX
Build 24/12/14-22:48:13
Ready...
Scanning -> C:\Program Files\Sierra On-Line\ereg.dll
File Type : 32-Bit Dll (Subsystem : Win GUI / 2), Size : 274432 (043000h)
Byte(s)
Compilation TimeStamp : 0x37161A80 -> Thu 15th Apr 1999 16:57:36 (GMT)
[TimeStamp] 0x37161A80 -> Thu 15th Apr 1999 16:57:36 (GMT) | PE Header | - |
Offset: 0x00000108 | VA: 0x10000108 | -
[TimeStamp] 0x37161A80 -> Thu 15th Apr 1999 16:57:36 (GMT) | Export | - |
Offset: 0x0001FF54 | VA: 0x1001FF54 | -
[File Heuristics] -> Flag #1 : 00000000000000000000000100000000 (0x00000100)
[Entrypoint Section Entropy] : 6.61 (section #0) ".text   " | Size : 0x18772
(100210) byte(s)
[DllCharacteristics] -> Flag : (0x0000) -> NONE
[SectionCount] 5 (0x5) | ImageSize 0x47000 (290816) byte(s)
[Export] 100% of function(s) (4 of 4) are in file | 0 are forwarded | 4 code |
0 data | 0 uninit data | 0 unknown | 
[VersionInfo] Company Name : Havas Interactive. - Sierra OnLine
[VersionInfo] Product Name : Electronic Product Registration
[VersionInfo] Product Version : 3.01.0076
[VersionInfo] File Description : Electronic Product Registration DLL
[VersionInfo] File Version : 3. 1. 76. 0
[VersionInfo] Original FileName : EREG.DLL
[VersionInfo] Internal Name : EREG32
[VersionInfo] Version Comments : International Electronic Registration for
Win32 Platforms
[VersionInfo] Legal Trademarks : :    OriginalFilename
[VersionInfo] Legal Copyrights : Copyright © 1999 Havas Interactive Inc.
[CompilerDetect] -> Visual C++ 6.0
[!] File appears to have no protection or is using an unknown protection
- Scan Took : 0.409 Second(s) [000000199h (409) tick(s)] [244 of 573 scan(s)
done]
--- snip ---

$ wine --version
wine-1.8-rc1

Regards

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.


More information about the wine-bugs mailing list