Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SafeDisc 1 games crash #17

Open
NicknineTheEagle opened this issue May 5, 2024 · 4 comments
Open

SafeDisc 1 games crash #17

NicknineTheEagle opened this issue May 5, 2024 · 4 comments

Comments

@NicknineTheEagle
Copy link

NicknineTheEagle commented May 5, 2024

It appears that none of SafeDisc 1 games work for me, ICD always crashes in dplayerx.dll. Tried the following games:

  • Need for Speed: High Stakes
  • Need for Speed: Porsche Unleashed
  • LEGO Racers

Running Windows 10. Using Alcohol 120% to mount Redump disc images. Not an issue with the game code since cracked exe produced by UnSafeDisc works fine. The games do work if Alcohol virtual drive is passed through to Windows XP VM.

Logs:
LEGORacers.exe_SafeDiscShim.log
LEGORacers.ICD_SafeDiscShim.log

Windows event log entries:

Faulting application name: LEGORacers.ICD, version: 0.0.0.0, time stamp: 0x37979360
Faulting module name: dplayerx.DLL, version: 0.0.0.0, time stamp: 0x3729dba5
Exception code: 0xc0000005
Fault offset: 0x00013044
Faulting process id: 0x138c
Faulting application start time: 0x01da9f18bcf2fb97
Faulting application path: C:\Games\LEGORacers\LEGORacers.ICD
Faulting module path: D:\dplayerx.DLL
Report Id: 0882d3a8-0083-41f4-baed-b1dc4d246f80
Faulting package full name: 
Faulting package-relative application ID: 
Faulting application name: LEGORacers.ICD, version: 0.0.0.0, time stamp: 0x37979360
Faulting module name: LEGORacers.ICD, version: 0.0.0.0, time stamp: 0x37979360
Exception code: 0xc0000005
Fault offset: 0x000a867c
Faulting process id: 0x138c
Faulting application start time: 0x01da9f18bcf2fb97
Faulting application path: C:\Games\LEGORacers\LEGORacers.ICD
Faulting module path: C:\Games\LEGORacers\LEGORacers.ICD
Report Id: 89584dd5-b462-46cc-ad53-0f5b8c27a40f
Faulting package full name: 
Faulting package-relative application ID: 
@NicknineTheEagle
Copy link
Author

NicknineTheEagle commented May 7, 2024

Figured out the root cause, it looks like the new injection mechanism involving overwriting the entry point from 8fedebb does not work for SafeDisc 1 ICDs. Simply calling Initialize from DllMain for ICD like in older revisions makes the game work.

@NicknineTheEagle
Copy link
Author

NicknineTheEagle commented May 7, 2024

While initializing from DllMain is unsafe due to loader lock, as far as I can tell, there's literally no other way to do this for ICD specifically. dplayerx.dll seems to be loaded before ICD entry point (from import table?) and it needs Secdrv driver in its own DllMain meaning that the shim must be initialized by this point or dplayerx.dll will crash.

@mirh
Copy link

mirh commented May 8, 2024

My memory aches trying to remember what rule of thumb I must have read in the past, but you might want to take a notice at:
https://www.vogons.org/viewtopic.php?t=51818
https://github.com/ElliotKillick/LdrLockLiberator

@RibShark
Copy link
Owner

RibShark commented May 8, 2024

I have a solution in mind for this; I will work on it once I have completed some other obligations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants