From 5082c8f705f59ea74ffbf46916bc4d795cf3defe Mon Sep 17 00:00:00 2001 From: TheRogueArchivist Date: Wed, 22 Mar 2023 11:20:22 -0600 Subject: [PATCH] Add RenderWare detection (#244) * Add RenderWare detection. * Remove unneeded note from SafeDisc. * Update README. --- BinaryObjectScanner.GameEngine/RenderWare.cs | 40 +++++++++++++++++++ .../Macrovision.SafeDisc.cs | 1 - README.md | 8 ++++ 3 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 BinaryObjectScanner.GameEngine/RenderWare.cs diff --git a/BinaryObjectScanner.GameEngine/RenderWare.cs b/BinaryObjectScanner.GameEngine/RenderWare.cs new file mode 100644 index 00000000..2e3ed610 --- /dev/null +++ b/BinaryObjectScanner.GameEngine/RenderWare.cs @@ -0,0 +1,40 @@ +using BinaryObjectScanner.Interfaces; +using BinaryObjectScanner.Wrappers; + +namespace BinaryObjectScanner.GameEngine +{ + /// + /// RenderWare (https://web.archive.org/web/20070214132346/http://www.renderware.com/) is an API and graphics engine created by Criterion in 1993. + /// It appears that version 4.X was exclusively used by EA internally, with version 3.X being the final public version (https://sigmaco.org/3782-renderware/). + /// It was available to use on many different platforms, with it being particularly useful for the PS2 (https://en.wikipedia.org/wiki/RenderWare). + /// + /// Additional resources and documentation: + /// RenderWare interview: https://web.archive.org/web/20031208124348/http://www.homelanfed.com/index.php?id=9856 + /// RenderWare V2.1 API reference: http://www.tnlc.com/rw/api/rwdoc.htm + /// RenderWare 2 official docs: https://github.com/electronicarts/RenderWare3Docs + /// RenderWare 3.7 SDK: https://github.com/sigmaco/rwsdk-v37-pc + /// Wikipedia list of RenderWare games: https://en.wikipedia.org/wiki/Category:RenderWare_games + /// + public class RenderWare : IPortableExecutableCheck + { + /// + public string CheckPortableExecutable(string file, PortableExecutable pex, bool includeDebug) + { + // Get the sections from the executable, if possible + var sections = pex?.SectionTable; + if (sections == null) + return null; + + // Found in Redump entries 20138, 55823, and 102493. + bool rwcsegSection = pex.ContainsSection("_rwcseg", exact: true); + // Found in Redump entry 20138. + bool rwdsegSection = pex.ContainsSection("_rwdseg", exact: true); + + // TODO: Check if this indicates a specific version, or if these sections are present in multiple. + if (rwcsegSection || rwdsegSection) + return "RenderWare"; + + return null; + } + } +} diff --git a/BinaryObjectScanner.Protection/Macrovision.SafeDisc.cs b/BinaryObjectScanner.Protection/Macrovision.SafeDisc.cs index dad77c95..73446c58 100644 --- a/BinaryObjectScanner.Protection/Macrovision.SafeDisc.cs +++ b/BinaryObjectScanner.Protection/Macrovision.SafeDisc.cs @@ -83,7 +83,6 @@ namespace BinaryObjectScanner.Protection return "SafeDisc"; // TODO: Investigate various section names: - // "_rwcseg" - Found in Redump entry 55823. // "STLPORT_" - Found in Redump entry 11638. // "PACODE" - Found in Redump entry 9621. // "CSEG" + "DSEG" + "TQIA_DAT" + "GRPOLY_D" - Found in Redump entry 72195. diff --git a/README.md b/README.md index 8c4f6c8a..75f2bda4 100644 --- a/README.md +++ b/README.md @@ -148,6 +148,14 @@ Below is a list of executable packers detected by BurnOutSharp. The three column | WinZip SFX | Yes | No | Yes | | | WISE Installer | Yes | No | Yes | | +## Game Engines Detected + +Below is a list of game engines detected by BurnOutSharp. The two columns explain what sort of checks are performed to determine how the protection is detected. Generally speaking, it's better to have a content check than a path check. + +| Protection Name | Content Check | Path Check | Notes | +| --------------- | ------------- | ---------- | ----- | +| RenderWare | Yes | No | No | | + ## Container Formats Below is a list of container formats that are supported in some way: