mirror of
https://github.com/SabreTools/BinaryObjectScanner.git
synced 2026-02-14 13:46:03 +00:00
26 lines
867 B
C#
26 lines
867 B
C#
using System.Linq;
|
|
using System.Text;
|
|
using BurnOutSharp.ExecutableType.Microsoft;
|
|
|
|
namespace BurnOutSharp.ProtectionType
|
|
{
|
|
public class CengaProtectDVD : IContentCheck
|
|
{
|
|
/// <inheritdoc/>
|
|
public string CheckContents(string file, byte[] fileContent, bool includeDebug, PortableExecutable pex, NewExecutable nex)
|
|
{
|
|
// Get the sections from the executable, if possible
|
|
var sections = pex?.SectionTable;
|
|
if (sections == null)
|
|
return null;
|
|
|
|
// Get the .cenega section, if it exists -- TODO: Confirm this check with a real disc
|
|
var cenegaSection = sections.FirstOrDefault(s => Encoding.ASCII.GetString(s.Name).StartsWith(".cenega"));
|
|
if (cenegaSection != null)
|
|
return "Cenega ProtectDVD";
|
|
|
|
return null;
|
|
}
|
|
}
|
|
}
|