Files
BinaryObjectScanner/BinaryObjectScanner.Protection/CDCheck.cs
2023-09-16 02:04:47 -04:00

34 lines
1.1 KiB
C#

using BinaryObjectScanner.Interfaces;
using SabreTools.Serialization.Wrappers;
namespace BinaryObjectScanner.Protection
{
public class CDCheck : IPortableExecutableCheck
{
/// <inheritdoc/>
public string CheckPortableExecutable(string file, PortableExecutable pex, bool includeDebug)
{
// Get the sections from the executable, if possible
var sections = pex?.Model.SectionTable;
if (sections == null)
return null;
string name = pex.Comments;
if (name?.Contains("CDCheck utlity for Microsoft Game Studios") == true)
return "Microsoft Game Studios CD Check";
// To broad to be of use
//name = pex.InternalName;
//if (name?.Contains("CDCheck") == true)
// return "Microsoft Game Studios CD Check";
// To broad to be of use
//name = pex.OriginalFilename;
//if (name?.Contains("CDCheck.exe") == true)
// return "Microsoft Game Studios CD Check";
return null;
}
}
}