diff --git a/BurnOutSharp/ProtectionType/SVKP.cs b/BurnOutSharp/ProtectionType/SVKP.cs new file mode 100644 index 00000000..b7e443b0 --- /dev/null +++ b/BurnOutSharp/ProtectionType/SVKP.cs @@ -0,0 +1,30 @@ +using System.Collections.Generic; +using System.Linq; +using System.Text; +using BurnOutSharp.ExecutableType.Microsoft; +using BurnOutSharp.Matching; + +namespace BurnOutSharp.ProtectionType +{ + // TODO: Figure out how versions/version ranges work for this protection + public class SVKProtector : IContentCheck + { + /// + public List GetContentMatchSets() => null; + + /// + public string CheckContents(string file, byte[] fileContent, bool includeDebug = false) + { + // Get the sections from the executable, if possible + PortableExecutable pex = PortableExecutable.Deserialize(fileContent, 0); + if (pex?.ImageFileHeader == null) + return null; + + // 0x504B5653 is "SVKP" + if (pex.ImageFileHeader.PointerToSymbolTable == 0x504B5653) + return "SVKP (Slovak Protector)"; + + return null; + } + } +} diff --git a/BurnOutSharp/ProtectionType/SVKProtector.cs b/BurnOutSharp/ProtectionType/SVKProtector.cs deleted file mode 100644 index 77e638e8..00000000 --- a/BurnOutSharp/ProtectionType/SVKProtector.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System.Collections.Generic; -using BurnOutSharp.Matching; - -namespace BurnOutSharp.ProtectionType -{ - public class SVKProtector : IContentCheck - { - /// - public List GetContentMatchSets() - { - return new List - { - // ?SVKP + (char)0x00 + (char)0x00 - new ContentMatchSet(new byte?[] { 0x3F, 0x53, 0x56, 0x4B, 0x50, 0x00, 0x00 }, "SVK Protector"), - }; - } - - /// - public string CheckContents(string file, byte[] fileContent, bool includeDebug = false) => null; - } -}