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 | |