2022-03-15 15:39:35 -07:00
|
|
|
|
using BurnOutSharp.ExecutableType.Microsoft.PE;
|
2022-05-01 17:41:50 -07:00
|
|
|
|
using BurnOutSharp.Interfaces;
|
2021-09-05 23:31:10 -07:00
|
|
|
|
|
|
|
|
|
|
namespace BurnOutSharp.ProtectionType
|
|
|
|
|
|
{
|
|
|
|
|
|
// TODO: Figure out how versions/version ranges work for this protection
|
2022-05-01 17:17:15 -07:00
|
|
|
|
public class SVKProtector : IPortableExecutableCheck
|
2021-09-05 23:31:10 -07:00
|
|
|
|
{
|
|
|
|
|
|
/// <inheritdoc/>
|
2022-05-01 17:17:15 -07:00
|
|
|
|
public string CheckPortableExecutable(string file, PortableExecutable pex, bool includeDebug)
|
2021-09-05 23:31:10 -07:00
|
|
|
|
{
|
2021-09-10 16:10:15 -07:00
|
|
|
|
// Get the image file header from the executable, if possible
|
2021-09-05 23:31:10 -07:00
|
|
|
|
if (pex?.ImageFileHeader == null)
|
|
|
|
|
|
return null;
|
|
|
|
|
|
|
|
|
|
|
|
// 0x504B5653 is "SVKP"
|
|
|
|
|
|
if (pex.ImageFileHeader.PointerToSymbolTable == 0x504B5653)
|
|
|
|
|
|
return "SVKP (Slovak Protector)";
|
|
|
|
|
|
|
|
|
|
|
|
return null;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|