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

Minor SafeCast additions #333

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions BinaryObjectScanner/FileType/Textfile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,11 @@ public class Textfile : IDetectable
if (fileContent.Contains("Sentinel Driver Disk"))
protections.Add("Rainbow Sentinel");

// SafeCast
// Found in "AdlmLog.xml" in IA item game-programming-in-c-start-to-finish-2006 after installing "3dsMax8_Demo.zip".
if (fileContent.Contains("<NAME>SAFECAST</NAME>"))
protections.Add("SafeCast");

// SafeDisc
// TODO: Add better version parsing.
// Found in "Info.plist" in Redump entries 23983, 42762, 72713, 73070, and 89603.
Expand Down
3 changes: 3 additions & 0 deletions BinaryObjectScanner/Protection/Macrovision.SafeCast.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
/// <summary>
/// SafeCast is in the same family of protections as SafeDisc, and appears to mainly be for license management, and doesn't appear to affect the mastering of the disc in any way.
/// Although SafeCast is most commonly used in non-game software, there is one game that comes with both SafeDisc and SafeCast protections (Redump entry 83145).
/// SafeCast has been confirmed to be present on some programs, such as AutoDesk 3ds Max (IA items CMCD0204 and game-programming-in-c-start-to-finish-2006), Photoshop CS2 (IA item ccd0605), and Boonty Box (IA items PC_Gamer_Disc_7.55_July_2005 and cdrom-pcgamercd7.58).
/// TODO: Check Boonty Box samples closer for new possible detections, there are at least more checks for FlexLM possible.
/// Macrovision bought the company C-Dilla and created SafeCast based on C-Dilla's existing products (https://web.archive.org/web/20030212040047/http://www.auditmypc.com/freescan/readingroom/cdilla.asp).
/// There are multiple different versions of SafeCast out there.
/// Deep dive of MechWarrior 4 and its expansions, which use SafeDisc, possibly SafeDisc LT, and SafeCast: https://digipres.club/@TheRogueArchivist/110224192068908590
Expand Down Expand Up @@ -56,7 +58,7 @@
}

// TODO: Don't read entire file
var data = nex.ReadArbitraryRange();

Check warning on line 61 in BinaryObjectScanner/Protection/Macrovision.SafeCast.cs

View workflow job for this annotation

GitHub Actions / build

'NewExecutable.ReadArbitraryRange(int, int)' is obsolete
if (data == null)
return null;

Expand All @@ -80,6 +82,7 @@

// TODO: Investigate import hint/name table entry "CdaSysInstall"
// TODO: Investigate string table entries: "CDWP02DG", "CDWP02DG", "CDWS02DG"
// TODO: Invesitgate if the "AdobeLM.dll" file (along with mentions of "AdobeLM" in executables) uniquely identifies SafeCast, or if it can be used with different DRM. (Found in IA item ccd0605)

// Get the import directory table, if it exists
if (pex.Model.ImportTable?.ImportDirectoryTable != null)
Expand Down
8 changes: 8 additions & 0 deletions BinaryObjectScanner/Protection/Macrovision.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ public partial class Macrovision : IPathCheck, INewExecutableCheck, IPortableExe

// The stxt371 and stxt774 sections are found in various newer Macrovision products, including various versions of CDS-300, SafeCast, and SafeDisc.
// They may indicate SafeWrap, but this hasn't been confirmed yet.
// Almost every single sample known has both sections, though one only contains the "stxt371" section. It is unknown if this is intentional, or if the game functions without it.
// It is present in the "Texas HoldEm!" game in "boontybox_PCGamer_DVD.exe" in IA items PC_Gamer_Disc_7.55_July_2005 and cdrom-pcgamercd7.58.
// Other games in this set also aren't functional despite having the normal layout of stxt sections, and the primary program doesn't install at all due to activation servers being down.
bool stxt371Section = pex.ContainsSection("stxt371", exact: true);
bool stxt774Section = pex.ContainsSection("stxt774", exact: true);
if (stxt371Section || stxt774Section)
Expand Down Expand Up @@ -571,6 +574,11 @@ private static string MacrovisionVersionToProductName(string version)

// Source not documented.
or "2.60.030"

// Found in IA item game-programming-in-c-start-to-finish-2006 (tools_install/3dsMax8_Demo.zip).
or "2.66.000"

// Found in Photoshop CS2 in IA item ccd0605.
or "2.67.010" => "SafeCast",

// SafeCast (Unconfirmed)
Expand Down
Loading