mirror of
https://github.com/SabreTools/BinaryObjectScanner.git
synced 2026-02-11 05:35:15 +00:00
16 lines
469 B
C#
16 lines
469 B
C#
namespace BurnOutSharp.PackerType
|
|
{
|
|
public class PECompact
|
|
{
|
|
public static string CheckContents(byte[] fileContent, bool includePosition = false)
|
|
{
|
|
// "PEC2"
|
|
byte[] check = new byte[] { 0x50, 0x45, 0x43, 0x32 };
|
|
if (fileContent.Contains(check, out int position))
|
|
return "PE Compact 2" + (includePosition ? $" (Index {position})" : string.Empty);
|
|
|
|
return null;
|
|
}
|
|
}
|
|
}
|