Files
BinaryObjectScanner/BinaryObjectScanner.Protection/SVKP.cs
Matt Nadareski e118418a23 Move protection scans to their own library
This change also removes a couple of things from `BurnOutSharp.Tools.Utilities` that are no longer needed there. Linear executables are included in the scanning classes. Update the guides accordingly.
2023-03-09 23:19:27 -05:00

29 lines
1.2 KiB
C#

using BinaryObjectScanner.Interfaces;
using BinaryObjectScanner.Wrappers;
namespace BinaryObjectScanner.Protection
{
// TODO: Figure out how versions/version ranges work for this protection
// https://raw.githubusercontent.com/wolfram77web/app-peid/master/userdb.txt
// The official website (https://web.archive.org/web/20010301183549/http://www.anticracking.sk/) contains installations for demo versions of SVKP, which themselves are also protected with SVKP.
// The site also contains useful information about various other copy protections from the era.
// Additional info: https://www.cdmediaworld.com/hardware/cdrom/cd_protections_svkp.shtml
public class SVKProtector : IPortableExecutableCheck
{
/// <inheritdoc/>
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;
// 0x504B5653 is "SVKP"
if (pex.PointerToSymbolTable == 0x504B5653)
return "SVKP (Slovak Protector)";
return null;
}
}
}