From a1d22923817830d332f89793fe3f71244dcb807e Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Mon, 14 Mar 2022 12:08:35 -0700 Subject: [PATCH] Add content checks for key2AudioXS --- BurnOutSharp/ProtectionType/Key2AudioXS.cs | 21 ++++++++++++++++++++- README.md | 2 +- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/BurnOutSharp/ProtectionType/Key2AudioXS.cs b/BurnOutSharp/ProtectionType/Key2AudioXS.cs index 36298365..3f404f0c 100644 --- a/BurnOutSharp/ProtectionType/Key2AudioXS.cs +++ b/BurnOutSharp/ProtectionType/Key2AudioXS.cs @@ -1,11 +1,30 @@ using System.Collections.Concurrent; using System.Collections.Generic; +using BurnOutSharp.ExecutableType.Microsoft.PE; using BurnOutSharp.Matching; +using BurnOutSharp.Tools; namespace BurnOutSharp.ProtectionType { - public class Key2AudioXS : IPathCheck + public class Key2AudioXS : IPEContentCheck { + /// + public string CheckPEContents(string file, byte[] fileContent, bool includeDebug, PortableExecutable pex) + { + // Get the sections from the executable, if possible + var sections = pex?.SectionTable; + if (sections == null) + return null; + + string name = Utilities.GetFileDescription(pex); + if (!string.IsNullOrWhiteSpace(name) && name.Contains("SDKHM (KEEP)")) + return "key2AudioXS"; + else if (!string.IsNullOrWhiteSpace(name) && name.Contains("SDKHM (KEPT)")) + return "key2AudioXS"; + + return null; + } + /// public ConcurrentQueue CheckDirectoryPath(string path, IEnumerable files) { diff --git a/README.md b/README.md index 5572aa30..079b642b 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ Below is a list of protections detected by BurnOutSharp. The two columns explain | IndyVCD | False | True | Unconfirmed¹ | | ITENIUM Trial & Buy Protection | True | False | | | JoWood X-Prot (v1/v2) / Xtreme-Protector | True | False | | -| Key2Audio XS | False | True | | +| Key2Audio XS | True | True | | | Key-Lock (Dongle) | True | False | Unconfirmed¹ | | LibCrypt | True | False | Separate subfile scan only | | LaserLok | True | True | |