https://bugs.winehq.org/show_bug.cgi?id=36628
Bug ID: 36628 Summary: Multiple GFWL (Games For Windows Live) 2.0.0687.0 games fail on startup, reporting 'E_INVALIDARG : XLiveInitialize(&xii)' (Resident Evil 5) Product: Wine Version: 1.7.19 Hardware: x86 OS: Linux Status: NEW Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: focht@gmx.net
Hello folks,
split off from bug 23914
I'm copying my analysis verbatim here. To come this far you have to work around some bugs...
The first issue is bug 36627
--- snip --- $ pwd /home/focht/.wine/drive_c/Program Files/CAPCOM/RESIDENT EVIL 5
$ wine ./Launcher.exe err:module:import_dll Library MSASN1.dll (which is needed by L"C:\windows\system32\xlive.dll") not found err:module:import_dll Library xlive.dll (which is needed by L"C:\Program Files\CAPCOM\RESIDENT EVIL 5\RE5DX9.EXE") not found err:module:LdrInitializeThunk Main exe initialization for L"C:\Program Files\CAPCOM\RESIDENT EVIL 5\RE5DX9.EXE" failed, status c0000135 --- snip ---
The game bundles 'Games For Windows Live 2.0.0687.0' which hard-binds to 'MSASN1.dll'. This can be worked around with: 'winetricks -q msasn1'
The next issue is bug 17195 (SetNamedPipeHandleState implementation, support for named pipe message mode) as indicated by comment #22
The launcher uses named pipe in message mode for IPC with main game process.
--- snip --- $ pwd /home/focht/.wine/drive_c/Program Files/CAPCOM/RESIDENT EVIL 5
$ WINEDEBUG=+tid,+seh,+relay,+snoop,+msvcrt wine ./Launcher.exe >>log.txt 2>&1 ... 002b:Call KERNEL32.CreateNamedPipeW(00dbe080 L"\\.\pipe\0000002a",40080003,00000006,00000001,00000400,00000400,00001388,00dbe054) ret=00403d54 002b:Ret KERNEL32.CreateNamedPipeW() retval=0000006c ret=00403d54 ... 002c:Starting thread proc 0x401490 (arg=0x2413b8) ... 002c:Call KERNEL32.ConnectNamedPipe(0000006c,002413fc) ret=004033ed 002c:Ret KERNEL32.ConnectNamedPipe() retval=00000000 ret=004033ed 002c:Call KERNEL32.GetLastError() ret=004033fa 002c:Ret KERNEL32.GetLastError() retval=000003e5 ret=004033fa 002c:Call KERNEL32.WaitForMultipleObjects(00000002,00241414,00000000,ffffffff) ret=00403a88 ... 002b:Call KERNEL32.CreateProcessW(00000000,00dbcd58 L"RE5DX9.exe -dx9",00000000,00000000,00000000,00000410,00000000,0013ba40 L"C:\Program Files\CAPCOM\RESIDENT EVIL 5\",00dbc410,00dbc400) ret=7e56607a ... 002e:Call KERNEL32.__wine_kernel_init() ret=7bc5a4b2 002b:Ret KERNEL32.CreateProcessW() retval=00000001 ret=7e56607a ... 002e:Call KERNEL32.CreateFileW(0033d78c L"\\.\pipe\0000002a",c0000000,00000000,00000000,00000003,40000000,00000000) ret=00e26522 002e:Ret KERNEL32.CreateFileW() retval=000000b4 ret=00e26522 002e:Call KERNEL32.SetNamedPipeHandleState(000000b4,0033d784,00000000,00000000) ret=00e26547 002e:Ret KERNEL32.SetNamedPipeHandleState() retval=00000000 ret=00e26547 002e:Call KERNEL32.GetLastError() ret=00e26450 002e:Ret KERNEL32.GetLastError() retval=00000000 ret=00e26450 ... 002e:Ret KERNEL32.CloseHandle() retval=00000001 ret=00e265a0 ... 002c:Ret KERNEL32.WaitForMultipleObjects() retval=00000000 ret=00403a88 ... 002e:Call user32.MessageBoxA(00000000,01273d08 "Errorcode:80070507",00f64bfc "InitRpl Failed",00041010) ret=00721f07 --- snip ---
The child closes the other end of pipe after failure to bring the pipe in message mode which also wakes the parent with broken pipe error.
Faking "success" is obviously not a good solution hence I ran the game with a Wine version that carries Adam Martinson's patchset (branch rebased to tip).
This brings the game further - only to run into GFWL init problem:
--- snip --- ... 002e:CALL xlive.5297(<unknown, check return>) ret=0044eb72 002e:Call advapi32.RegisterTraceGuidsA(015e39d7,00000000,01495c5c,00000003,01ab8744,00000000,00000000,01ac85b0) ret=015e3a5c 002e:fixme:advapi:RegisterTraceGuidsA (0x15e39d7, (nil), {d5b9ac76-d546-4891-bb8c-bfd865e5c7d5}, 3, 0x1ab8744, (null), (null), 0x1ac85b0): stub 002e:Ret advapi32.RegisterTraceGuidsA() retval=00000000 ret=015e3a5c ... 002e:Call KERNEL32.LoadLibraryW(0033c0c8 L"C:\Program Files\CAPCOM\RESIDENT EVIL 5\RE5DX9.EXE") ret=01573fd8 002e:Ret KERNEL32.LoadLibraryW() retval=00400000 ret=01573fd8 ... 002e:Call KERNEL32.lstrcmpiW(001ed71c L"xlive.dll",01492e70 L"shimeng.dll") ret=015738f6 002e:Ret KERNEL32.lstrcmpiW() retval=00000001 ret=015738f6 002e:Call KERNEL32.K32GetModuleInformation(ffffffff,00400000,0033c0b0,0000000c) ret=01571ca9 002e:Ret KERNEL32.K32GetModuleInformation() retval=00000001 ret=01571ca9 002e:Call KERNEL32.FreeLibrary(00400000) ret=01573e42 002e:Ret KERNEL32.FreeLibrary() retval=00000001 ret=01573e42 002e:Call KERNEL32.UnmapViewOfFile(13360000) ret=01574ab9 002e:Ret KERNEL32.UnmapViewOfFile() retval=00000001 ret=01574ab9 002e:Call KERNEL32.CloseHandle(00000104) ret=01574ade 002e:Ret KERNEL32.CloseHandle() retval=00000001 ret=01574ade 002e:Call KERNEL32.CloseHandle(00000100) ret=01574afc ... 002e:Call advapi32.RegisterEventSourceW(00000000,01495a2c) ret=015eccbf 002e:fixme:advapi:RegisterEventSourceW ((null),L"XLive"): stub 002e:Ret advapi32.RegisterEventSourceW() retval=cafe4242 ret=015eccbf 002e:Call advapi32.ReportEventW(cafe4242,00000002,00000000,80000002,00000000,00000004,00000000,0033bb24,00000000) ret=015eccff 002e:fixme:advapi:ReportEventW (0xcafe4242,0x0002,0x0000,0x80000002,(nil),0x0004,0x00000000,0x33bb24,(nil)): stub 002e:Ret advapi32.ReportEventW() retval=00000001 ret=015eccff 002e:Call advapi32.DeregisterEventSource(cafe4242) ret=015ecd1f 002e:fixme:advapi:DeregisterEventSource (0xcafe4242) stub 002e:Ret advapi32.DeregisterEventSource() retval=00000001 ret=015ecd1f ... 002e:Call advapi32.UnregisterTraceGuids(00000000,00000000) ret=015e3a6f 002e:fixme:advapi:UnregisterTraceGuids 0: stub 002e:Ret advapi32.UnregisterTraceGuids() retval=00000078 ret=015e3a6f 002e:RET xlive.5297(0033d330,2002af00) retval=80004005 ret=0044eb72 002e:Call KERNEL32.GetLastError() ret=00e31b72 002e:Ret KERNEL32.GetLastError() retval=00000000 ret=00e31b72 002e:Call KERNEL32.FatalAppExitA(00000000,0033cec8 "E_FAIL : XLiveInitialize(&xii)") ret=0042eb7d 002e:warn:seh:FatalAppExitA AppExit 002e:Call user32.MessageBoxA(00000000,0033cec8 "E_FAIL : XLiveInitialize(&xii)",00000000,00001000) ret=7b83bee7 --- snip ---
xlive.5297 API entry = XLiveInitializeEx()
This is bug 33034
After merging my fix on top of named pipe branch it fares better but still fails in the end:
--- snip --- 002e:CALL xlive.5297(<unknown, check return>) ret=0044eb72 ... 002e:CALL sqmapi.SqmStartUpload(<unknown, check return>) ret=015e368f ... 002e:RET sqmapi.SqmStartUpload(0033c9c0,0033c5b0,00000000,00000002,015e2de0) retval=00000000 ret=015e368f ... 002e:CALL sqmapi.SqmGetSession(<unknown, check return>) ret=015e3243 ... 002e:RET sqmapi.SqmGetSession(01495a2c,00008000,00000001) retval=00000001 ret=015e3243 ... 002e:CALL sqmapi.SqmSetAppVersion(<unknown, check return>) ret=015e347a ... 002e:RET sqmapi.SqmSetAppVersion(00000001,00020000,02af0000) retval=00000001 ret=015e347a 002e:CALL sqmapi.SqmReadSharedMachineId(<unknown, check return>) ret=015e348c ... 002e:RET sqmapi.SqmReadSharedMachineId(0033cba4) retval=00000001 ret=015e348c 002e:CALL sqmapi.SqmSetMachineId(<unknown, check return>) ret=015e34b7 ... 002e:RET sqmapi.SqmSetMachineId(00000001,0033cba4) retval=00000001 ret=015e34b7 002e:CALL sqmapi.SqmReadSharedUserId(<unknown, check return>) ret=015e34c5 ... 002e:RET sqmapi.SqmReadSharedUserId(0033cbb4) retval=00000001 ret=015e34c5 002e:CALL sqmapi.SqmSetUserId(<unknown, check return>) ret=015e34f0 ... 002e:RET sqmapi.SqmSetUserId(00000001,0033cbb4) retval=00000001 ret=015e34f0 ... 002e:CALL sqmapi.SqmSetEnabled(<unknown, check return>) ret=015e3087 ... 002e:RET sqmapi.SqmSetEnabled(00000001,00000000) retval=00000001 ret=015e3087 ... 002e:CALL sqmapi.SqmSet(<unknown, check return>) ret=015e2e4a ... 002e:RET sqmapi.SqmSet(00000001,000000c1,0001b5e7) retval=00000000 ret=015e2e4a ... 002e:CALL sqmapi.SqmTimerStart(<unknown, check return>) ret=015e2fcd ... 002e:RET sqmapi.SqmTimerStart(00000001,00000035) retval=00000000 ret=015e2fcd ... 002e:CALL sqmapi.SqmSetBits(<unknown, check return>) ret=015e2eaa ... 002e:RET sqmapi.SqmSetBits(00000001,0000002e,0000000c) retval=00000000 ret=015e2eaa ... <lots of DRM checks/anti-debugging> ... 002e:Call advapi32.RegisterEventSourceW(00000000,01495a2c) ret=015eccbf 002e:fixme:advapi:RegisterEventSourceW ((null),L"XLive"): stub 002e:Ret advapi32.RegisterEventSourceW() retval=cafe4242 ret=015eccbf 002e:Call advapi32.ReportEventW(cafe4242,00000002,00000000,80000002,00000000,00000004,00000000,0033bb24,00000000) ret=015eccff 002e:fixme:advapi:ReportEventW (0xcafe4242,0x0002,0x0000,0x80000002,(nil),0x0004,0x00000000,0x33bb24,(nil)): stub 002e:Ret advapi32.ReportEventW() retval=00000001 ret=015eccff 002e:Call advapi32.DeregisterEventSource(cafe4242) ret=015ecd1f 002e:fixme:advapi:DeregisterEventSource (0xcafe4242) stub 002e:Ret advapi32.DeregisterEventSource() retval=00000001 ret=015ecd1f ... 002e:RET xlive.5297(0033d330,2002af00) retval=80070057 ret=0044eb72 ... 002e:Call KERNEL32.FatalAppExitA(00000000,0033cec8 "E_INVALIDARG : XLiveInitialize(&xii)") ret=0042eb7d 002e:warn:seh:FatalAppExitA AppExit 002e:Call user32.MessageBoxA(00000000,0033cec8 "E_INVALIDARG : XLiveInitialize(&xii)",00000000,00001000) ret=7b83bee7 --- snip ---
$ wine --version wine-1.7.19-70-gd6a59f7
Regards
https://bugs.winehq.org/show_bug.cgi?id=36628
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |obfuscation
https://bugs.winehq.org/show_bug.cgi?id=36628
--- Comment #1 from Austin English austinenglish@gmail.com --- This is your friendly reminder that there has been no bug activity for over a year. Is this still an issue in current (1.7.51 or newer) wine?
https://bugs.winehq.org/show_bug.cgi?id=36628
--- Comment #2 from Anastasius Focht focht@gmx.net --- Hello folks,
still present.
Fortunately various preceding bugs I mentioned here are resolved in the meantime - no patches/workarounds needed anymore.
With more time at hand (read: when I'm bored) I might investigate this. Since that GFWL garbage isn't that widespread/important anymore, its very low priority.
For documentation purpose, ProtectionID scan of 'Resident Evil 5':
--- snip --- -=[ ProtectionID v0.6.6.7 DECEMBER]=- (c) 2003-2015 CDKiLLER & TippeX Build 24/12/14-22:48:13 Ready... Scanning -> C:\Program Files\CAPCOM\RESIDENT EVIL 5\Launcher.exe File Type : 32-Bit Exe (Subsystem : Win GUI / 2), Size : 11007256 (0A7F518h) Byte(s) Compilation TimeStamp : 0x4A4C32EF -> Thu 02nd Jul 2009 04:09:19 (GMT) [TimeStamp] 0x4A4C32EF -> Thu 02nd Jul 2009 04:09:19 (GMT) | PE Header | - | Offset: 0x00000D78 | VA: 0x00400D78 | - [TimeStamp] 0x4A4C32EF -> Thu 02nd Jul 2009 04:09:19 (GMT) | DebugDirectory | - | Offset: 0x0098A004 | VA: 0x012F4004 | - -> File Appears to be Digitally Signed @ Offset 0A7E000h, size : 01518h / 05400 byte(s) [!] Executable uses SEH Tables (/SAFESEH) (19 calculated 19 recorded... 0 invalid addresses) [File Heuristics] -> Flag #1 : 00000100000000000000000000000101 (0x04000005) [Entrypoint Section Entropy] : 6.62 (section #5) "Sitext " | Size : 0x6F90 (28560) byte(s) [DllCharacteristics] -> Flag : (0x0000) -> NONE [SectionCount] 10 (0xA) | ImageSize 0xFE8000 (16678912) byte(s) [VersionInfo] Company Name : CAPCOM CO.. LTD. [VersionInfo] Product Name : RESIDENT EVIL 5 [VersionInfo] Product Version : 1. 0. 0. 129 [VersionInfo] File Description : Launcher [VersionInfo] File Version : 1. 0. 0. 129 [VersionInfo] Legal Copyrights : (C)CAPCOM CO.. LTD. 2009 ALL RIGHTS RESERVED. [Debug Info] (record 1 of 1) (file offset 0x98A000) Characteristics : 0x0 | TimeDateStamp : 0x4A4C32EF (Thu 02nd Jul 2009 04:09:19 (GMT)) | MajorVer : 0 / MinorVer : 0 -> (0.0) Type : 2 (0x2) -> CodeView | Size : 0x5E (94) AddressOfRawData : 0xEF401C | PointerToRawData : 0x98A01C CvSig : 0x53445352 | SigGuid EA8D7318-BAE5-4170-B6CF2F7348A1151B Age : 0x1 | Pdb : e:\bio5\capdev_bio_pc\bh5pc\setup\tools\launcher\release\Launcher.pdb [!] SecuROM Detected - Version 07.40.0006 [CdKeySerial] found "unlock code" @ VA: 0x00C007C4 / Offset: 0x0086E7C4 [CdKeySerial] found "unlock code" @ VA: 0x00C007E4 / Offset: 0x0086E7E4 [CdKeySerial] found "unlock code" @ VA: 0x00C00800 / Offset: 0x0086E800 [CdKeySerial] found "unlock code" @ VA: 0x00C00818 / Offset: 0x0086E818 [CdKeySerial] found "unlock code" @ VA: 0x00C00838 / Offset: 0x0086E838 [CdKeySerial] found "unlock code" @ VA: 0x00C00850 / Offset: 0x0086E850 [CdKeySerial] found "unlock code" @ VA: 0x00C009BE / Offset: 0x0086E9BE [CdKeySerial] found "unlock code" @ VA: 0x00C009E4 / Offset: 0x0086E9E4 [CdKeySerial] found "unlock code" @ VA: 0x00C00A10 / Offset: 0x0086EA10 [CdKeySerial] found "unlock code" @ VA: 0x00C00A40 / Offset: 0x0086EA40 [CdKeySerial] found "unlock code" @ VA: 0x00C00A90 / Offset: 0x0086EA90 [CdKeySerial] found "unlock code" @ VA: 0x00C00AC0 / Offset: 0x0086EAC0 [CdKeySerial] found "unlock code" @ VA: 0x00C00AEC / Offset: 0x0086EAEC [CdKeySerial] found "Invalid serial" @ VA: 0x00C00D0D / Offset: 0x0086ED0D [CdKeySerial] found "unlock code" @ VA: 0x00C00D6A / Offset: 0x0086ED6A [CdKeySerial] found "unlock code" @ VA: 0x00C00DB0 / Offset: 0x0086EDB0 [CdKeySerial] found "Invalid serial" @ VA: 0x00C03450 / Offset: 0x00871450 [CdKeySerial] found "SerialNumber" @ VA: 0x00C0B328 / Offset: 0x00879328 [CdKeySerial] found "Invalid code" @ VA: 0x00EE7ADC / Offset: 0x0097DADC [CompilerDetect] -> Visual C++ 8.0 (Visual Studio 2005) - Scan Took : 2.167 Second(s) [000000B11h (2833) tick(s)] [499 of 573 scan(s) done] --- snip ---
$ wine --version wine-1.7.51-102-ga7e294c
Regards
https://bugs.winehq.org/show_bug.cgi?id=36628
mrdeathjr28@yahoo.es changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |mrdeathjr28@yahoo.es
https://bugs.winehq.org/show_bug.cgi?id=36628
winetest@luukku.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |winetest@luukku.com
--- Comment #3 from winetest@luukku.com --- All the mentioned bugs are fixed in wine-staging (or at least marked so). Let's hope you get bored and find some time to do more digging.
https://bugs.winehq.org/show_bug.cgi?id=36628
tokktokk fdsfgs@krutt.org changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |fdsfgs@krutt.org
https://bugs.winehq.org/show_bug.cgi?id=36628
mirh mirh@protonmail.ch changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |mirh@protonmail.ch
https://bugs.winehq.org/show_bug.cgi?id=36628
Anya animegirl@stronzi.org changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |animegirl@stronzi.org
https://bugs.winehq.org/show_bug.cgi?id=36628
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- URL| |https://web.archive.org/web | |/20120616202854/http://down | |load.microsoft.com/download | |/6/0/a/60af1011-1011-46be-b | |cec-0e6dcd068064/xliveredis | |t.msi Keywords| |download
--- Comment #4 from Anastasius Focht focht@gmx.net --- Hello folks,
adding stable download link via Internet Archive:
https://web.archive.org/web/20120616202854/http://download.microsoft.com/dow...
GFWL v2.0.672.0
It doesn't exactly match v2.0.0687.0 from the game but I haven't found a matching redist package yet at archive.org. Better than nothing.
Additionally I have to search for original RE5 release again because I lost parts of my git-annex repo some years ago (distributed across disks).
Regards
https://bugs.winehq.org/show_bug.cgi?id=36628
temp82@luukku.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |temp82@luukku.com
--- Comment #5 from temp82@luukku.com --- I believe that bug 52919 is duplicate of this bug report.
https://bugs.winehq.org/show_bug.cgi?id=36628
Ken Sharp imwellcushtymelike@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |BOBBLOG@protonmail.com
--- Comment #6 from Ken Sharp imwellcushtymelike@gmail.com --- *** Bug 52919 has been marked as a duplicate of this bug. ***
https://bugs.winehq.org/show_bug.cgi?id=36628
soredake broaden_acid002@simplelogin.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC|broaden_acid002@simplelogin | |.com |