mirror of
https://github.com/SabreTools/BinaryObjectScanner.git
synced 2026-04-17 11:42:40 +00:00
Modify array finding, part 2
This commit is contained in:
@@ -12,7 +12,7 @@ namespace BurnOutSharp.FileType
|
||||
/// <inheritdoc/>
|
||||
public bool ShouldScan(byte[] magic)
|
||||
{
|
||||
if (magic.StartsWith(new byte[] { 0x42, 0x46, 0x50, 0x4b }))
|
||||
if (magic.StartsWith(new byte?[] { 0x42, 0x46, 0x50, 0x4b }))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace BurnOutSharp.FileType
|
||||
/// <inheritdoc/>
|
||||
public bool ShouldScan(byte[] magic)
|
||||
{
|
||||
if (magic.StartsWith(new byte[] { 0x42, 0x52, 0x68 }))
|
||||
if (magic.StartsWith(new byte?[] { 0x42, 0x52, 0x68 }))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
||||
@@ -18,31 +18,31 @@ namespace BurnOutSharp.FileType
|
||||
public bool ShouldScan(byte[] magic)
|
||||
{
|
||||
// DOS MZ executable file format (and descendants)
|
||||
if (magic.StartsWith(new byte[] { 0x4d, 0x5a }))
|
||||
if (magic.StartsWith(new byte?[] { 0x4d, 0x5a }))
|
||||
return true;
|
||||
|
||||
// Executable and Linkable Format
|
||||
if (magic.StartsWith(new byte[] { 0x7f, 0x45, 0x4c, 0x46 }))
|
||||
if (magic.StartsWith(new byte?[] { 0x7f, 0x45, 0x4c, 0x46 }))
|
||||
return true;
|
||||
|
||||
// Mach-O binary (32-bit)
|
||||
if (magic.StartsWith(new byte[] { 0xfe, 0xed, 0xfa, 0xce }))
|
||||
if (magic.StartsWith(new byte?[] { 0xfe, 0xed, 0xfa, 0xce }))
|
||||
return true;
|
||||
|
||||
// Mach-O binary (32-bit, reverse byte ordering scheme)
|
||||
if (magic.StartsWith(new byte[] { 0xce, 0xfa, 0xed, 0xfe }))
|
||||
if (magic.StartsWith(new byte?[] { 0xce, 0xfa, 0xed, 0xfe }))
|
||||
return true;
|
||||
|
||||
// Mach-O binary (64-bit)
|
||||
if (magic.StartsWith(new byte[] { 0xfe, 0xed, 0xfa, 0xcf }))
|
||||
if (magic.StartsWith(new byte?[] { 0xfe, 0xed, 0xfa, 0xcf }))
|
||||
return true;
|
||||
|
||||
// Mach-O binary (64-bit, reverse byte ordering scheme)
|
||||
if (magic.StartsWith(new byte[] { 0xcf, 0xfa, 0xed, 0xfe }))
|
||||
if (magic.StartsWith(new byte?[] { 0xcf, 0xfa, 0xed, 0xfe }))
|
||||
return true;
|
||||
|
||||
// Prefrred Executable File Format
|
||||
if (magic.StartsWith(new byte[] { 0x4a, 0x6f, 0x79, 0x21, 0x70, 0x65, 0x66, 0x66 }))
|
||||
if (magic.StartsWith(new byte?[] { 0x4a, 0x6f, 0x79, 0x21, 0x70, 0x65, 0x66, 0x66 }))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace BurnOutSharp.FileType
|
||||
/// <inheritdoc/>
|
||||
public bool ShouldScan(byte[] magic)
|
||||
{
|
||||
if (magic.StartsWith(new byte[] { 0x1f, 0x8b }))
|
||||
if (magic.StartsWith(new byte?[] { 0x1f, 0x8b }))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace BurnOutSharp.FileType
|
||||
/// <inheritdoc/>
|
||||
public bool ShouldScan(byte[] magic)
|
||||
{
|
||||
if (magic.StartsWith(new byte[] { 0x49, 0x53, 0x63 }))
|
||||
if (magic.StartsWith(new byte?[] { 0x49, 0x53, 0x63 }))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BurnOutSharp.FileType
|
||||
/// <inheritdoc/>
|
||||
public bool ShouldScan(byte[] magic)
|
||||
{
|
||||
if (magic.StartsWith(new byte[] { 0x4d, 0x50, 0x51, 0x1a }))
|
||||
if (magic.StartsWith(new byte?[] { 0x4d, 0x50, 0x51, 0x1a }))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BurnOutSharp.FileType
|
||||
/// <inheritdoc/>
|
||||
public bool ShouldScan(byte[] magic)
|
||||
{
|
||||
if (magic.StartsWith(new byte[] { 0xD0, 0xCF, 0x11, 0xE0, 0xA1, 0xB1, 0x1A, 0xE1 }))
|
||||
if (magic.StartsWith(new byte?[] { 0xD0, 0xCF, 0x11, 0xE0, 0xA1, 0xB1, 0x1A, 0xE1 }))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace BurnOutSharp.FileType
|
||||
/// <inheritdoc/>
|
||||
public bool ShouldScan(byte[] magic)
|
||||
{
|
||||
if (magic.StartsWith(new byte[] { 0x4d, 0x53, 0x43, 0x46 }))
|
||||
if (magic.StartsWith(new byte?[] { 0x4d, 0x53, 0x43, 0x46 }))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
||||
@@ -12,15 +12,15 @@ namespace BurnOutSharp.FileType
|
||||
public bool ShouldScan(byte[] magic)
|
||||
{
|
||||
// PKZIP
|
||||
if (magic.StartsWith(new byte[] { 0x50, 0x4b, 0x03, 0x04 }))
|
||||
if (magic.StartsWith(new byte?[] { 0x50, 0x4b, 0x03, 0x04 }))
|
||||
return true;
|
||||
|
||||
// PKZIP (Empty Archive)
|
||||
if (magic.StartsWith(new byte[] { 0x50, 0x4b, 0x05, 0x06 }))
|
||||
if (magic.StartsWith(new byte?[] { 0x50, 0x4b, 0x05, 0x06 }))
|
||||
return true;
|
||||
|
||||
// PKZIP (Spanned Archive)
|
||||
if (magic.StartsWith(new byte[] { 0x50, 0x4b, 0x07, 0x08 }))
|
||||
if (magic.StartsWith(new byte?[] { 0x50, 0x4b, 0x07, 0x08 }))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
||||
@@ -12,11 +12,11 @@ namespace BurnOutSharp.FileType
|
||||
public bool ShouldScan(byte[] magic)
|
||||
{
|
||||
// RAR archive version 1.50 onwards
|
||||
if (magic.StartsWith(new byte[] { 0x52, 0x61, 0x72, 0x21, 0x1a, 0x07, 0x00 }))
|
||||
if (magic.StartsWith(new byte?[] { 0x52, 0x61, 0x72, 0x21, 0x1a, 0x07, 0x00 }))
|
||||
return true;
|
||||
|
||||
// RAR archive version 5.0 onwards
|
||||
if (magic.StartsWith(new byte[] { 0x52, 0x61, 0x72, 0x21, 0x1a, 0x07, 0x01, 0x00 }))
|
||||
if (magic.StartsWith(new byte?[] { 0x52, 0x61, 0x72, 0x21, 0x1a, 0x07, 0x01, 0x00 }))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace BurnOutSharp.FileType
|
||||
/// <inheritdoc/>
|
||||
public bool ShouldScan(byte[] magic)
|
||||
{
|
||||
if (magic.StartsWith(new byte[] { 0x37, 0x7a, 0xbc, 0xaf, 0x27, 0x1c }))
|
||||
if (magic.StartsWith(new byte?[] { 0x37, 0x7a, 0xbc, 0xaf, 0x27, 0x1c }))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
||||
@@ -11,10 +11,10 @@ namespace BurnOutSharp.FileType
|
||||
/// <inheritdoc/>
|
||||
public bool ShouldScan(byte[] magic)
|
||||
{
|
||||
if (magic.StartsWith(new byte[] { 0x75, 0x73, 0x74, 0x61, 0x72, 0x00, 0x30, 0x30 }))
|
||||
if (magic.StartsWith(new byte?[] { 0x75, 0x73, 0x74, 0x61, 0x72, 0x00, 0x30, 0x30 }))
|
||||
return true;
|
||||
|
||||
if (magic.StartsWith(new byte[] { 0x75, 0x73, 0x74, 0x61, 0x72, 0x20, 0x20, 0x00 }))
|
||||
if (magic.StartsWith(new byte?[] { 0x75, 0x73, 0x74, 0x61, 0x72, 0x20, 0x20, 0x00 }))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
||||
@@ -22,19 +22,19 @@ namespace BurnOutSharp.FileType
|
||||
public bool ShouldScan(byte[] magic, string extension)
|
||||
{
|
||||
// Rich Text File
|
||||
if (magic.StartsWith(new byte[] { 0x7b, 0x5c, 0x72, 0x74, 0x66, 0x31 }))
|
||||
if (magic.StartsWith(new byte?[] { 0x7b, 0x5c, 0x72, 0x74, 0x66, 0x31 }))
|
||||
return true;
|
||||
|
||||
// HTML
|
||||
if (magic.StartsWith(new byte[] { 0x3c, 0x68, 0x74, 0x6d, 0x6c }))
|
||||
if (magic.StartsWith(new byte?[] { 0x3c, 0x68, 0x74, 0x6d, 0x6c }))
|
||||
return true;
|
||||
|
||||
// HTML and XML
|
||||
if (magic.StartsWith(new byte[] { 0x3c, 0x21, 0x44, 0x4f, 0x43, 0x54, 0x59, 0x50, 0x45 }))
|
||||
if (magic.StartsWith(new byte?[] { 0x3c, 0x21, 0x44, 0x4f, 0x43, 0x54, 0x59, 0x50, 0x45 }))
|
||||
return true;
|
||||
|
||||
// Microsoft Office File (old)
|
||||
if (magic.StartsWith(new byte[] { 0xd0, 0xcf, 0x11, 0xe0, 0xa1, 0xb1, 0x1a, 0xe1 }))
|
||||
if (magic.StartsWith(new byte?[] { 0xd0, 0xcf, 0x11, 0xe0, 0xa1, 0xb1, 0x1a, 0xe1 }))
|
||||
return true;
|
||||
|
||||
// Generic textfile (no header)
|
||||
|
||||
@@ -11,23 +11,23 @@ namespace BurnOutSharp.FileType
|
||||
public bool ShouldScan(byte[] magic)
|
||||
{
|
||||
// GCF
|
||||
if (magic.StartsWith(new byte[] { 0x01, 0x00, 0x00, 0x00 }))
|
||||
if (magic.StartsWith(new byte?[] { 0x01, 0x00, 0x00, 0x00 }))
|
||||
return true;
|
||||
|
||||
// PAK
|
||||
if (magic.StartsWith(new byte[] { 0x50, 0x41, 0x43, 0x4b }))
|
||||
if (magic.StartsWith(new byte?[] { 0x50, 0x41, 0x43, 0x4b }))
|
||||
return true;
|
||||
|
||||
// SGA
|
||||
if (magic.StartsWith(new byte[] { 0x5f, 0x41, 0x52, 0x43, 0x48, 0x49, 0x56, 0x45 }))
|
||||
if (magic.StartsWith(new byte?[] { 0x5f, 0x41, 0x52, 0x43, 0x48, 0x49, 0x56, 0x45 }))
|
||||
return true;
|
||||
|
||||
// VPK
|
||||
if (magic.StartsWith(new byte[] { 0x55, 0xaa, 0x12, 0x34 }))
|
||||
if (magic.StartsWith(new byte?[] { 0x55, 0xaa, 0x12, 0x34 }))
|
||||
return true;
|
||||
|
||||
// WAD
|
||||
if (magic.StartsWith(new byte[] { 0x57, 0x41, 0x44, 0x33 }))
|
||||
if (magic.StartsWith(new byte?[] { 0x57, 0x41, 0x44, 0x33 }))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BurnOutSharp.FileType
|
||||
/// <inheritdoc/>
|
||||
public bool ShouldScan(byte[] magic)
|
||||
{
|
||||
if (magic.StartsWith(new byte[] { 0xfd, 0x37, 0x7a, 0x58, 0x5a, 0x00 }))
|
||||
if (magic.StartsWith(new byte?[] { 0xfd, 0x37, 0x7a, 0x58, 0x5a, 0x00 }))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
|
||||
{
|
||||
// ".nicode" + (char)0x00
|
||||
byte[] check = new byte[] { 0x2E, 0x6E, 0x69, 0x63, 0x6F, 0x64, 0x65, 0x00 };
|
||||
byte?[] check = new byte?[] { 0x2E, 0x6E, 0x69, 0x63, 0x6F, 0x64, 0x65, 0x00 };
|
||||
if (fileContent.FirstPosition(check, out int position))
|
||||
return $"Armadillo" + (includePosition ? $" (Index {position})" : string.Empty);
|
||||
|
||||
// "ARMDEBUG"
|
||||
check = new byte[] { 0x41, 0x52, 0x4D, 0x44, 0x45, 0x42, 0x55, 0x47 };
|
||||
check = new byte?[] { 0x41, 0x52, 0x4D, 0x44, 0x45, 0x42, 0x55, 0x47 };
|
||||
if (fileContent.FirstPosition(check, out position))
|
||||
return $"Armadillo" + (includePosition ? $" (Index {position})" : string.Empty);
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
|
||||
{
|
||||
// "??[[__[[_" + (char)0x00 + "{{" + (char)0x0 + (char)0x00 + "{{" + (char)0x00 + (char)0x00 + (char)0x00 + (char)0x00 + (char)0x0 + (char)0x00 + (char)0x00 + (char)0x00 + (char)0x00 + "?;??;??"
|
||||
byte[] check = new byte[] { 0x3F, 0x3F, 0x5B, 0x5B, 0x5F, 0x5F, 0x5B, 0x5B, 0x5F, 0x00, 0x7B, 0x7B, 0x00, 0x00, 0x7B, 0x7B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x3F, 0x3B, 0x3F, 0x3F, 0x3B, 0x3F, 0x3F };
|
||||
byte?[] check = new byte?[] { 0x3F, 0x3F, 0x5B, 0x5B, 0x5F, 0x5F, 0x5B, 0x5B, 0x5F, 0x00, 0x7B, 0x7B, 0x00, 0x00, 0x7B, 0x7B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x3F, 0x3B, 0x3F, 0x3F, 0x3B, 0x3F, 0x3F };
|
||||
if (fileContent.FirstPosition(check, out int position))
|
||||
return $"EXE Stealth" + (includePosition ? $" (Index {position})" : string.Empty);
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace BurnOutSharp.PackerType
|
||||
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
|
||||
{
|
||||
// "Inno"
|
||||
byte[] check = new byte[] { 0x49, 0x6E, 0x6E, 0x6F };
|
||||
byte?[] check = new byte?[] { 0x49, 0x6E, 0x6E, 0x6F };
|
||||
if (fileContent.FirstPosition(check, out int position) && position == 0x30)
|
||||
return $"Inno Setup {GetVersion(fileContent)}" + (includePosition ? $" (Index {position})" : string.Empty);
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BurnOutSharp.PackerType
|
||||
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
|
||||
{
|
||||
// Nullsoft Install System
|
||||
byte[] check = new byte[] { 0x4e, 0x75, 0x6c, 0x6c, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x20, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d };
|
||||
byte?[] check = new byte?[] { 0x4e, 0x75, 0x6c, 0x6c, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x20, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d };
|
||||
if (fileContent.FirstPosition(check, out int position))
|
||||
{
|
||||
string version = GetVersion(fileContent, position);
|
||||
@@ -18,7 +18,7 @@ namespace BurnOutSharp.PackerType
|
||||
}
|
||||
|
||||
// NullsoftInst
|
||||
check = new byte[] { 0x4e, 0x75, 0x6c, 0x6c, 0x73, 0x6f, 0x66, 0x74, 0x49, 0x6e, 0x73, 0x74 };
|
||||
check = new byte?[] { 0x4e, 0x75, 0x6c, 0x6c, 0x73, 0x6f, 0x66, 0x74, 0x49, 0x6e, 0x73, 0x74 };
|
||||
if (fileContent.FirstPosition(check, out position))
|
||||
{
|
||||
return $"NSIS" + (includePosition ? $" (Index {position})" : string.Empty);
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
|
||||
{
|
||||
// "PEC2"
|
||||
byte[] check = new byte[] { 0x50, 0x45, 0x43, 0x32 };
|
||||
byte?[] check = new byte?[] { 0x50, 0x45, 0x43, 0x32 };
|
||||
if (fileContent.FirstPosition(check, out int position, end: 2048))
|
||||
return "PE Compact 2" + (includePosition ? $" (Index {position})" : string.Empty);
|
||||
|
||||
|
||||
@@ -17,9 +17,9 @@ namespace BurnOutSharp.PackerType
|
||||
{
|
||||
/* Longer version of the check that can be used if false positves become an issue:
|
||||
"S.e.t.u.p. .F.a.c.t.o.r.y. .i.s. .a. .t.r.a.d.e.m.a.r.k. .o.f. .I.n.d.i.g.o. .R.o.s.e. .C.o.r.p.o.r.a.t.i.o.n"
|
||||
byte[] check = new byte[] { 0x53, 0x00, 0x65, 0x00, 0x74, 0x00, 0x75, 0x00, 0x70, 0x00, 0x20, 0x00, 0x46, 0x00, 0x61, 0x00, 0x63, 0x00, 0x74, 0x00, 0x6F, 0x00, 0x72, 0x00, 0x79, 0x00, 0x20, 0x00, 0x69, 0x00, 0x73, 0x00, 0x20, 0x00, 0x61, 0x00, 0x20, 0x00, 0x74, 0x00, 0x72, 0x00, 0x61, 0x00, 0x64, 0x00, 0x65, 0x00, 0x6D, 0x00, 0x61, 0x00, 0x72, 0x00, 0x6B, 0x00, 0x20, 0x00, 0x6F, 0x00, 0x66, 0x00, 0x20, 0x00, 0x49, 0x00, 0x6E, 0x00, 0x64, 0x00, 0x69, 0x00, 0x67, 0x00, 0x6F, 0x00, 0x20, 0x00, 0x52, 0x00, 0x6F, 0x00, 0x73, 0x00, 0x65, 0x00, 0x20, 0x00, 0x43, 0x00, 0x6F, 0x00, 0x72, 0x00, 0x70, 0x00, 0x6F, 0x00, 0x72, 0x00, 0x61, 0x00, 0x74, 0x00, 0x69, 0x00, 0x6F, 0x00, 0x6E }; */
|
||||
byte?[] check = new byte?[] { 0x53, 0x00, 0x65, 0x00, 0x74, 0x00, 0x75, 0x00, 0x70, 0x00, 0x20, 0x00, 0x46, 0x00, 0x61, 0x00, 0x63, 0x00, 0x74, 0x00, 0x6F, 0x00, 0x72, 0x00, 0x79, 0x00, 0x20, 0x00, 0x69, 0x00, 0x73, 0x00, 0x20, 0x00, 0x61, 0x00, 0x20, 0x00, 0x74, 0x00, 0x72, 0x00, 0x61, 0x00, 0x64, 0x00, 0x65, 0x00, 0x6D, 0x00, 0x61, 0x00, 0x72, 0x00, 0x6B, 0x00, 0x20, 0x00, 0x6F, 0x00, 0x66, 0x00, 0x20, 0x00, 0x49, 0x00, 0x6E, 0x00, 0x64, 0x00, 0x69, 0x00, 0x67, 0x00, 0x6F, 0x00, 0x20, 0x00, 0x52, 0x00, 0x6F, 0x00, 0x73, 0x00, 0x65, 0x00, 0x20, 0x00, 0x43, 0x00, 0x6F, 0x00, 0x72, 0x00, 0x70, 0x00, 0x6F, 0x00, 0x72, 0x00, 0x61, 0x00, 0x74, 0x00, 0x69, 0x00, 0x6F, 0x00, 0x6E }; */
|
||||
// "S.e.t.u.p. .F.a.c.t.o.r.y."
|
||||
byte[] check = new byte[] { 0x53, 0x00, 0x65, 0x00, 0x74, 0x00, 0x75, 0x00, 0x70, 0x00, 0x20, 0x00, 0x46, 0x00, 0x61, 0x00, 0x63, 0x00, 0x74, 0x00, 0x6F, 0x00, 0x72, 0x00, 0x79, 0x00 };
|
||||
byte?[] check = new byte?[] { 0x53, 0x00, 0x65, 0x00, 0x74, 0x00, 0x75, 0x00, 0x70, 0x00, 0x20, 0x00, 0x46, 0x00, 0x61, 0x00, 0x63, 0x00, 0x74, 0x00, 0x6F, 0x00, 0x72, 0x00, 0x79, 0x00 };
|
||||
if (fileContent.FirstPosition(check, out int position))
|
||||
{
|
||||
// Check the manifest version first
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace BurnOutSharp.PackerType
|
||||
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
|
||||
{
|
||||
// UPX!
|
||||
byte[] check = new byte[] { 0x55, 0x50, 0x58, 0x21 };
|
||||
byte?[] check = new byte?[] { 0x55, 0x50, 0x58, 0x21 };
|
||||
if (fileContent.FirstPosition(check, out int position))
|
||||
{
|
||||
string version = GetVersion(fileContent, position);
|
||||
@@ -16,7 +16,7 @@ namespace BurnOutSharp.PackerType
|
||||
}
|
||||
|
||||
// NOS
|
||||
check = new byte[] { 0x55, 0x50, 0x58, 0x21 };
|
||||
check = new byte?[] { 0x55, 0x50, 0x58, 0x21 };
|
||||
if (fileContent.FirstPosition(check, out position))
|
||||
{
|
||||
string version = GetVersion(fileContent, position);
|
||||
@@ -24,11 +24,11 @@ namespace BurnOutSharp.PackerType
|
||||
}
|
||||
|
||||
// UPX0
|
||||
check = new byte[] { 0x55, 0x50, 0x58, 0x30 };
|
||||
check = new byte?[] { 0x55, 0x50, 0x58, 0x30 };
|
||||
if (fileContent.FirstPosition(check, out position, end: 2048))
|
||||
{
|
||||
// UPX1
|
||||
byte[] check2 = new byte[] { 0x55, 0x50, 0x58, 0x31 };
|
||||
byte?[] check2 = new byte?[] { 0x55, 0x50, 0x58, 0x31 };
|
||||
if (fileContent.FirstPosition(check2, out int position2, end: 2048))
|
||||
{
|
||||
return $"UPX (Unknown Version)" + (includePosition ? $" (Index {position}, {position2})" : string.Empty);
|
||||
@@ -36,11 +36,11 @@ namespace BurnOutSharp.PackerType
|
||||
}
|
||||
|
||||
// NOS0
|
||||
check = new byte[] { 0x4E, 0x4F, 0x53, 0x30 };
|
||||
check = new byte?[] { 0x4E, 0x4F, 0x53, 0x30 };
|
||||
if (fileContent.FirstPosition(check, out position, end: 2048))
|
||||
{
|
||||
// NOS1
|
||||
byte[] check2 = new byte[] { 0x4E, 0x4F, 0x53, 0x31 };
|
||||
byte?[] check2 = new byte?[] { 0x4E, 0x4F, 0x53, 0x31 };
|
||||
if (fileContent.FirstPosition(check2, out int position2, end: 2048))
|
||||
{
|
||||
return $"UPX (NOS Variant) (Unknown Version)" + (includePosition ? $" (Index {position}, {position2})" : string.Empty);
|
||||
|
||||
@@ -17,12 +17,12 @@ namespace BurnOutSharp.PackerType
|
||||
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
|
||||
{
|
||||
// WinZip Self-Extractor
|
||||
byte[] check = new byte[] { 0x57, 0x69, 0x6E, 0x5A, 0x69, 0x70, 0x20, 0x53, 0x65, 0x6C, 0x66, 0x2D, 0x45, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x6F, 0x72 };
|
||||
byte?[] check = new byte?[] { 0x57, 0x69, 0x6E, 0x5A, 0x69, 0x70, 0x20, 0x53, 0x65, 0x6C, 0x66, 0x2D, 0x45, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x6F, 0x72 };
|
||||
if (fileContent.FirstPosition(check, out int position))
|
||||
return $"WinZip SFX {GetVersion(fileContent)}" + (includePosition ? $" (Index {position})" : string.Empty);
|
||||
|
||||
// _winzip_
|
||||
check = new byte[] { 0x5F, 0x77, 0x69, 0x6E, 0x7A, 0x69, 0x70, 0x5F };
|
||||
check = new byte?[] { 0x5F, 0x77, 0x69, 0x6E, 0x7A, 0x69, 0x70, 0x5F };
|
||||
if (fileContent.FirstPosition(check, out position))
|
||||
return $"WinZip SFX {GetVersion(fileContent)}" + (includePosition ? $" (Index {position})" : string.Empty);
|
||||
|
||||
@@ -104,7 +104,7 @@ namespace BurnOutSharp.PackerType
|
||||
{
|
||||
#region 16-bit NE Header Checks
|
||||
|
||||
byte[] check = new byte[]
|
||||
byte?[] check = new byte?[]
|
||||
{
|
||||
0x4E, 0x45, 0x11, 0x20, 0x86, 0x00, 0x02, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x0A, 0x03, 0x03, 0x00,
|
||||
@@ -118,7 +118,7 @@ namespace BurnOutSharp.PackerType
|
||||
if (fileContent.FirstPosition(check, out _))
|
||||
return "2.0 (MS-DOS/16-bit)";
|
||||
|
||||
check = new byte[]
|
||||
check = new byte?[]
|
||||
{
|
||||
0x4E, 0x45, 0x11, 0x20, 0x86, 0x00, 0x02, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x0A, 0x03, 0x03, 0x00,
|
||||
@@ -132,7 +132,7 @@ namespace BurnOutSharp.PackerType
|
||||
if (fileContent.FirstPosition(check, out _))
|
||||
return "2.0 (16-bit)";
|
||||
|
||||
check = new byte[]
|
||||
check = new byte?[]
|
||||
{
|
||||
0x4E, 0x45, 0x11, 0x20, 0x80, 0x00, 0x02, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x0A, 0x03, 0x03, 0x00,
|
||||
@@ -146,7 +146,7 @@ namespace BurnOutSharp.PackerType
|
||||
if (fileContent.FirstPosition(check, out _))
|
||||
return "Compact 2.0 (16-bit)";
|
||||
|
||||
check = new byte[]
|
||||
check = new byte?[]
|
||||
{
|
||||
0x4E, 0x45, 0x11, 0x20, 0xCD, 0x00, 0x02, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x02, 0x03, 0x03, 0x00,
|
||||
@@ -160,7 +160,7 @@ namespace BurnOutSharp.PackerType
|
||||
if (fileContent.FirstPosition(check, out _))
|
||||
return "Software Installation 2.0 (16-bit)";
|
||||
|
||||
check = new byte[]
|
||||
check = new byte?[]
|
||||
{
|
||||
0x4E, 0x45, 0x11, 0x20, 0x86, 0x00, 0x02, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x0A, 0x03, 0x03, 0x00,
|
||||
@@ -174,7 +174,7 @@ namespace BurnOutSharp.PackerType
|
||||
if (fileContent.FirstPosition(check, out _))
|
||||
return "2.1 RC2 (MS-DOS/16-bit)";
|
||||
|
||||
check = new byte[]
|
||||
check = new byte?[]
|
||||
{
|
||||
0x4E, 0x45, 0x11, 0x20, 0xBE, 0x00, 0x02, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x02, 0x03, 0x03, 0x00,
|
||||
@@ -188,7 +188,7 @@ namespace BurnOutSharp.PackerType
|
||||
if (fileContent.FirstPosition(check, out _))
|
||||
return "2.1 RC2 (16-bit)";
|
||||
|
||||
check = new byte[]
|
||||
check = new byte?[]
|
||||
{
|
||||
0x4E, 0x45, 0x11, 0x20, 0x80, 0x00, 0x02, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x0A, 0x03, 0x03, 0x00,
|
||||
@@ -202,7 +202,7 @@ namespace BurnOutSharp.PackerType
|
||||
if (fileContent.FirstPosition(check, out _))
|
||||
return "Compact 2.1 RC2 (16-bit)";
|
||||
|
||||
check = new byte[]
|
||||
check = new byte?[]
|
||||
{
|
||||
0x4E, 0x45, 0x11, 0x20, 0xBE, 0x00, 0x02, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x02, 0x03, 0x03, 0x00,
|
||||
@@ -216,7 +216,7 @@ namespace BurnOutSharp.PackerType
|
||||
if (fileContent.FirstPosition(check, out _))
|
||||
return "Software Installation 2.1 RC2 (16-bit)";
|
||||
|
||||
check = new byte[]
|
||||
check = new byte?[]
|
||||
{
|
||||
0x4E, 0x45, 0x11, 0x20, 0x86, 0x00, 0x02, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x0A, 0x03, 0x03, 0x00,
|
||||
@@ -230,7 +230,7 @@ namespace BurnOutSharp.PackerType
|
||||
if (fileContent.FirstPosition(check, out _))
|
||||
return "2.1 (MS-DOS/16-bit)";
|
||||
|
||||
check = new byte[]
|
||||
check = new byte?[]
|
||||
{
|
||||
0x4E, 0x45, 0x11, 0x20, 0xBE, 0x00, 0x02, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x02, 0x03, 0x03, 0x00,
|
||||
@@ -244,7 +244,7 @@ namespace BurnOutSharp.PackerType
|
||||
if (fileContent.FirstPosition(check, out _))
|
||||
return "2.1 (16-bit)";
|
||||
|
||||
check = new byte[]
|
||||
check = new byte?[]
|
||||
{
|
||||
0x4E, 0x45, 0x11, 0x20, 0x80, 0x00, 0x02, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x0A, 0x03, 0x03, 0x00,
|
||||
@@ -258,7 +258,7 @@ namespace BurnOutSharp.PackerType
|
||||
if (fileContent.FirstPosition(check, out _))
|
||||
return "Compact 2.1 (16-bit)";
|
||||
|
||||
check = new byte[]
|
||||
check = new byte?[]
|
||||
{
|
||||
0x4E, 0x45, 0x11, 0x20, 0xBE, 0x00, 0x02, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x02, 0x03, 0x03, 0x00,
|
||||
@@ -278,7 +278,7 @@ namespace BurnOutSharp.PackerType
|
||||
#region 32-bit SFX Header Checks
|
||||
|
||||
// .............8<EFBFBD>92....<2E>P..............<2E>P..<2E>P..<2E>P..VW95SE.SFX
|
||||
check = new byte[]
|
||||
check = new byte?[]
|
||||
{
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x9C, 0x39,
|
||||
@@ -293,7 +293,7 @@ namespace BurnOutSharp.PackerType
|
||||
return "2.0 (32-bit)";
|
||||
|
||||
// .............]<5D>92....<2E>P..............<2E>P..<2E>P..<2E>P..VW95SRE.SFX
|
||||
check = new byte[]
|
||||
check = new byte?[]
|
||||
{
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x5D, 0x9C, 0x39,
|
||||
@@ -308,7 +308,7 @@ namespace BurnOutSharp.PackerType
|
||||
return "Software Installation 2.0 (32-bit)";
|
||||
|
||||
// .............<2E><><EFBFBD>3....<2E>P..............<2E>P..<2E>P..<2E>P..VW95SE.SFX
|
||||
check = new byte[]
|
||||
check = new byte?[]
|
||||
{
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x84, 0x82, 0x94,
|
||||
@@ -323,7 +323,7 @@ namespace BurnOutSharp.PackerType
|
||||
return "2.1 RC2 (32-bit)";
|
||||
|
||||
// .............<2E><><EFBFBD>3....<2E>P..............<2E>P..<2E>P..<2E>P..VW95SRE.SFX
|
||||
check = new byte[]
|
||||
check = new byte?[]
|
||||
{
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0xB0, 0x82, 0x94,
|
||||
@@ -338,7 +338,7 @@ namespace BurnOutSharp.PackerType
|
||||
return "Software Installation 2.1 RC2 (32-bit)";
|
||||
|
||||
// .............U<><55>3....<2E>P..............<2E>P..<2E>P..<2E>P..VW95SE.SFX
|
||||
check = new byte[]
|
||||
check = new byte?[]
|
||||
{
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0xCD, 0xCC,
|
||||
@@ -353,7 +353,7 @@ namespace BurnOutSharp.PackerType
|
||||
return "2.1 (32-bit)";
|
||||
|
||||
// .............{<7B><>3....<2E>P..............<2E>P..<2E>P..<2E>P..VW95SRE.SFX
|
||||
check = new byte[]
|
||||
check = new byte?[]
|
||||
{
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x7B, 0xCD, 0xCC,
|
||||
@@ -372,7 +372,7 @@ namespace BurnOutSharp.PackerType
|
||||
#region 32-bit PE Header Checks
|
||||
|
||||
// PE..L...i.[:........<2E>........J...*......<2E>9.......`....@.
|
||||
check = new byte[]
|
||||
check = new byte?[]
|
||||
{
|
||||
0x50, 0x45, 0x00, 0x00, 0x4C, 0x01, 0x05, 0x00,
|
||||
0x69, 0x1B, 0x5B, 0x3A, 0x00, 0x00, 0x00, 0x00,
|
||||
@@ -386,7 +386,7 @@ namespace BurnOutSharp.PackerType
|
||||
return "2.2.4003";
|
||||
|
||||
// PE..L.....[:........<2E>........V...*.......?.......p....@.
|
||||
check = new byte[]
|
||||
check = new byte?[]
|
||||
{
|
||||
0x50, 0x45, 0x00, 0x00, 0x4C, 0x01, 0x05, 0x00,
|
||||
0x81, 0x1B, 0x5B, 0x3A, 0x00, 0x00, 0x00, 0x00,
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace BurnOutSharp.PackerType
|
||||
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
|
||||
{
|
||||
// WiseMain
|
||||
byte[] check = new byte[] { 0x57, 0x69, 0x73, 0x65, 0x4D, 0x61, 0x69, 0x6E };
|
||||
byte?[] check = new byte?[] { 0x57, 0x69, 0x73, 0x65, 0x4D, 0x61, 0x69, 0x6E };
|
||||
if (fileContent.FirstPosition(check, out int position))
|
||||
return "Wise Installation Wizard Module" + (includePosition ? $" (Index {position})" : string.Empty);
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
|
||||
{
|
||||
// "DotfuscatorAttribute"
|
||||
byte[] check = new byte[] { 0x44, 0x6F, 0x74, 0x66, 0x75, 0x73, 0x63, 0x61, 0x74, 0x6F, 0x72, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65 };
|
||||
byte?[] check = new byte?[] { 0x44, 0x6F, 0x74, 0x66, 0x75, 0x73, 0x63, 0x61, 0x74, 0x6F, 0x72, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65 };
|
||||
if (fileContent.FirstPosition(check, out int position))
|
||||
return "dotFuscator" + (includePosition ? $" (Index {position})" : string.Empty);
|
||||
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
|
||||
{
|
||||
// "TMSAMVOF"
|
||||
byte[] check = new byte[] { 0x54, 0x4D, 0x53, 0x41, 0x4D, 0x56, 0x4F, 0x46 };
|
||||
byte?[] check = new byte?[] { 0x54, 0x4D, 0x53, 0x41, 0x4D, 0x56, 0x4F, 0x46 };
|
||||
if (fileContent.FirstPosition(check, out int position))
|
||||
return "ActiveMARK" + (includePosition ? $" (Index {position})" : string.Empty);
|
||||
|
||||
// " " + (char)0xC2 + (char)0x16 + (char)0x00 + (char)0xA8 + (char)0xC1 + (char)0x16 + (char)0x00 + (char)0xB8 + (char)0xC1 + (char)0x16 + (char)0x00 + (char)0x86 + (char)0xC8 + (char)0x16 + (char)0x0 + (char)0x9A + (char)0xC1 + (char)0x16 + (char)0x00 + (char)0x10 + (char)0xC2 + (char)0x16 + (char)0x00
|
||||
check = new byte[] { 0x20, 0xC2, 0x16, 0x00, 0xA8, 0xC1, 0x16, 0x00, 0xB8, 0xC1, 0x16, 0x00, 0x86, 0xC8, 0x16, 0x0, 0x9A, 0xC1, 0x16, 0x00, 0x10, 0xC2, 0x16, 0x00 };
|
||||
check = new byte?[] { 0x20, 0xC2, 0x16, 0x00, 0xA8, 0xC1, 0x16, 0x00, 0xB8, 0xC1, 0x16, 0x00, 0x86, 0xC8, 0x16, 0x0, 0x9A, 0xC1, 0x16, 0x00, 0x10, 0xC2, 0x16, 0x00 };
|
||||
if (fileContent.FirstPosition(check, out position))
|
||||
return "ActiveMARK 5" + (includePosition ? $" (Index {position})" : string.Empty);
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
|
||||
{
|
||||
// "SETTEC"
|
||||
byte[] check = new byte[] { 0x53, 0x45, 0x54, 0x54, 0x45, 0x43 };
|
||||
byte?[] check = new byte?[] { 0x53, 0x45, 0x54, 0x54, 0x45, 0x43 };
|
||||
if (fileContent.FirstPosition(check, out int position))
|
||||
return "Alpha-ROM" + (includePosition ? $" (Index {position})" : string.Empty);
|
||||
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
|
||||
{
|
||||
// MGS CDCheck
|
||||
byte[] check = new byte[] { 0x4D, 0x47, 0x53, 0x20, 0x43, 0x44, 0x43, 0x68, 0x65, 0x63, 0x6B };
|
||||
byte?[] check = new byte?[] { 0x4D, 0x47, 0x53, 0x20, 0x43, 0x44, 0x43, 0x68, 0x65, 0x63, 0x6B };
|
||||
if (fileContent.FirstPosition(check, out int position))
|
||||
return "Microsoft Game Studios CD Check" + (includePosition ? $" (Index {position})" : string.Empty);
|
||||
|
||||
// CDCheck
|
||||
check = new byte[] { 0x43, 0x44, 0x43, 0x68, 0x65, 0x63, 0x6B };
|
||||
check = new byte?[] { 0x43, 0x44, 0x43, 0x68, 0x65, 0x63, 0x6B };
|
||||
if (fileContent.FirstPosition(check, out position))
|
||||
return "Executable-Based CD Check" + (includePosition ? $" (Index {position})" : string.Empty);
|
||||
|
||||
@@ -22,12 +22,12 @@
|
||||
private static string CheckContentsBroad(byte[] fileContent, bool includePosition = false)
|
||||
{
|
||||
// GetDriveType
|
||||
byte[] check = new byte[] { 0x47, 0x65, 0x74, 0x44, 0x72, 0x69, 0x76, 0x65, 0x54, 0x79, 0x70, 0x65 };
|
||||
byte?[] check = new byte?[] { 0x47, 0x65, 0x74, 0x44, 0x72, 0x69, 0x76, 0x65, 0x54, 0x79, 0x70, 0x65 };
|
||||
if (fileContent.FirstPosition(check, out int position))
|
||||
return "CD Check" + (includePosition ? $" (Index {position})" : string.Empty);
|
||||
|
||||
// GetVolumeInformation
|
||||
check = new byte[] { 0x47, 0x65, 0x74, 0x56, 0x6F, 0x6C, 0x75, 0x6D, 0x65, 0x49, 0x6E, 0x66, 0x6F, 0x72, 0x6D, 0x61, 0x74, 0x69, 0x6F, 0x6E };
|
||||
check = new byte?[] { 0x47, 0x65, 0x74, 0x56, 0x6F, 0x6C, 0x75, 0x6D, 0x65, 0x49, 0x6E, 0x66, 0x6F, 0x72, 0x6D, 0x61, 0x74, 0x69, 0x6F, 0x6E };
|
||||
if (fileContent.FirstPosition(check, out position))
|
||||
return "CD Check" + (includePosition ? $" (Index {position})" : string.Empty);
|
||||
|
||||
|
||||
@@ -11,12 +11,12 @@ namespace BurnOutSharp.ProtectionType
|
||||
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
|
||||
{
|
||||
// "CD-Cops, ver. "
|
||||
byte[] check = new byte[] { 0x43, 0x44, 0x2D, 0x43, 0x6F, 0x70, 0x73, 0x2C, 0x20, 0x20, 0x76, 0x65, 0x72, 0x2E, 0x20 };
|
||||
byte?[] check = new byte?[] { 0x43, 0x44, 0x2D, 0x43, 0x6F, 0x70, 0x73, 0x2C, 0x20, 0x20, 0x76, 0x65, 0x72, 0x2E, 0x20 };
|
||||
if (fileContent.FirstPosition(check, out int position))
|
||||
return $"CD-Cops {GetVersion(fileContent, position)}" + (includePosition ? $" (Index {position})" : string.Empty);
|
||||
|
||||
// ".grand" + (char)0x00
|
||||
check = new byte[] { 0x2E, 0x67, 0x72, 0x61, 0x6E, 0x64, 0x00};
|
||||
check = new byte?[] { 0x2E, 0x67, 0x72, 0x61, 0x6E, 0x64, 0x00};
|
||||
if (fileContent.FirstPosition(check, out position))
|
||||
return "CD-Cops" + (includePosition ? $" (Index {position})" : string.Empty);
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace BurnOutSharp.ProtectionType
|
||||
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
|
||||
{
|
||||
// "2" + (char)0xF2 + (char)0x02 + (char)0x82 + (char)0xC3 + (char)0xBC + (char)0x0B + "$" + (char)0x99 + (char)0xAD + "'C" + (char)0xE4 + (char)0x9D + "st" + (char)0x99 + (char)0xFA + "2$" + (char)0x9D + ")4" + (char)0xFF + "t"
|
||||
byte[] check = new byte[] { 0x32, 0xF2, 0x02, 0x82, 0xC3, 0xBC, 0x0B, 0x24, 0x99, 0xAD, 0x27, 0x43, 0xE4, 0x9D, 0x73, 0x74, 0x99, 0xFA, 0x32, 0x24, 0x9D, 0x29, 0x34, 0xFF, 0x74 };
|
||||
byte?[] check = new byte?[] { 0x32, 0xF2, 0x02, 0x82, 0xC3, 0xBC, 0x0B, 0x24, 0x99, 0xAD, 0x27, 0x43, 0xE4, 0x9D, 0x73, 0x74, 0x99, 0xFA, 0x32, 0x24, 0x9D, 0x29, 0x34, 0xFF, 0x74 };
|
||||
if (fileContent.FirstPosition(check, out int position))
|
||||
return "CD-Lock" + (includePosition ? $" (Index {position})" : string.Empty);
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
|
||||
{
|
||||
// "~0017.tmp"
|
||||
byte[] check = new byte[] { 0x7E, 0x30, 0x30, 0x31, 0x37, 0x2E, 0x74, 0x6D, 0x70 };
|
||||
byte?[] check = new byte?[] { 0x7E, 0x30, 0x30, 0x31, 0x37, 0x2E, 0x74, 0x6D, 0x70 };
|
||||
if (fileContent.FirstPosition(check, out int position))
|
||||
return "CDSHiELD SE" + (includePosition ? $" (Index {position})" : string.Empty);
|
||||
|
||||
|
||||
@@ -12,17 +12,17 @@ namespace BurnOutSharp.ProtectionType
|
||||
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
|
||||
{
|
||||
// DATA.CDS
|
||||
byte[] check = new byte[] { 0x44, 0x41, 0x54, 0x41, 0x2E, 0x43, 0x44, 0x53 };
|
||||
byte?[] check = new byte?[] { 0x44, 0x41, 0x54, 0x41, 0x2E, 0x43, 0x44, 0x53 };
|
||||
if (fileContent.FirstPosition(check, out int position))
|
||||
return "Cactus Data Shield 200" + (includePosition ? $" (Index {position})" : string.Empty);
|
||||
|
||||
// \*.CDS
|
||||
check = new byte[] { 0x5C, 0x2A, 0x2E, 0x43, 0x44, 0x53 };
|
||||
check = new byte?[] { 0x5C, 0x2A, 0x2E, 0x43, 0x44, 0x53 };
|
||||
if (fileContent.FirstPosition(check, out position))
|
||||
return "Cactus Data Shield 200" + (includePosition ? $" (Index {position})" : string.Empty);
|
||||
|
||||
// CDSPlayer
|
||||
check = new byte[] { 0x43, 0x44, 0x53, 0x50, 0x6C, 0x61, 0x79, 0x65, 0x72 };
|
||||
check = new byte?[] { 0x43, 0x44, 0x53, 0x50, 0x6C, 0x61, 0x79, 0x65, 0x72 };
|
||||
if (fileContent.FirstPosition(check, out position))
|
||||
return "Cactus Data Shield 200" + (includePosition ? $" (Index {position})" : string.Empty);
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
|
||||
{
|
||||
// ".cenega"
|
||||
byte[] check = new byte[] { 0x2E, 0x63, 0x65, 0x6E, 0x65, 0x67, 0x61 };
|
||||
byte?[] check = new byte?[] { 0x2E, 0x63, 0x65, 0x6E, 0x65, 0x67, 0x61 };
|
||||
if (fileContent.FirstPosition(check, out int position))
|
||||
return "Cenega ProtectDVD" + (includePosition ? $" (Index {position})" : string.Empty);
|
||||
|
||||
|
||||
@@ -7,17 +7,17 @@
|
||||
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
|
||||
{
|
||||
// "icd1" + (char)0x00
|
||||
byte[] check = new byte[] { 0x69, 0x63, 0x64, 0x31, 0x00 };
|
||||
byte?[] check = new byte?[] { 0x69, 0x63, 0x64, 0x31, 0x00 };
|
||||
if (fileContent.FirstPosition(check, out int position))
|
||||
return "Code Lock" + (includePosition ? $" (Index {position})" : string.Empty);
|
||||
|
||||
// "icd2" + (char)0x00
|
||||
check = new byte[] { 0x69, 0x63, 0x64, 0x32, 0x00 };
|
||||
check = new byte?[] { 0x69, 0x63, 0x64, 0x32, 0x00 };
|
||||
if (fileContent.FirstPosition(check, out position))
|
||||
return "Code Lock" + (includePosition ? $" (Index {position})" : string.Empty);
|
||||
|
||||
// "CODE-LOCK.OCX"
|
||||
check = new byte[] { 0x43, 0x4F, 0x44, 0x45, 0x2D, 0x4C, 0x4F, 0x43, 0x4B, 0x2E, 0x4F, 0x43, 0x58 };
|
||||
check = new byte?[] { 0x43, 0x4F, 0x44, 0x45, 0x2D, 0x4C, 0x4F, 0x43, 0x4B, 0x2E, 0x4F, 0x43, 0x58 };
|
||||
if (fileContent.FirstPosition(check, out position))
|
||||
return "Code Lock" + (includePosition ? $" (Index {position})" : string.Empty);
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace BurnOutSharp.ProtectionType
|
||||
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
|
||||
{
|
||||
// "Tom Commander"
|
||||
byte[] check = new byte[] { 0x54, 0x6F, 0x6D, 0x20, 0x43, 0x6F, 0x6D, 0x6D, 0x61, 0x6E, 0x64, 0x65, 0x72 };
|
||||
byte?[] check = new byte?[] { 0x54, 0x6F, 0x6D, 0x20, 0x43, 0x6F, 0x6D, 0x6D, 0x61, 0x6E, 0x64, 0x65, 0x72 };
|
||||
if (fileContent.FirstPosition(check, out int position))
|
||||
return "CopyKiller" + (includePosition ? $" (Index {position})" : string.Empty);
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace BurnOutSharp.ProtectionType
|
||||
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
|
||||
{
|
||||
// "DVD-Cops, ver. "
|
||||
byte[] check = new byte[] { 0x44, 0x56, 0x44, 0x2D, 0x43, 0x6F, 0x70, 0x73, 0x2C, 0x20, 0x20, 0x76, 0x65, 0x72, 0x2E, 0x20 };
|
||||
byte?[] check = new byte?[] { 0x44, 0x56, 0x44, 0x2D, 0x43, 0x6F, 0x70, 0x73, 0x2C, 0x20, 0x20, 0x76, 0x65, 0x72, 0x2E, 0x20 };
|
||||
if (fileContent.FirstPosition(check, out int position))
|
||||
return $"DVD-Cops {GetVersion(fileContent, position)}" + (includePosition ? $" (Index {position})" : string.Empty);
|
||||
|
||||
|
||||
@@ -10,52 +10,52 @@
|
||||
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
|
||||
{
|
||||
// EASTL
|
||||
// byte[] check = new byte[] { 0x45, 0x41, 0x53, 0x54, 0x4C };
|
||||
// byte?[] check = new byte?[] { 0x45, 0x41, 0x53, 0x54, 0x4C };
|
||||
// if (fileContent.Contains(check, out int position))
|
||||
// return "Cucko (EA Custom)" + (includePosition ? $" (Index {position})" : string.Empty);
|
||||
|
||||
// R + (char)0x00 + e + (char)0x00 + g + (char)0x00 + i + (char)0x00 + s + (char)0x00 + t + (char)0x00 + r + (char)0x00 + a + (char)0x00 + t + (char)0x00 + i + (char)0x00 + o + (char)0x00 + n + (char)0x00 + + (char)0x00 + C + (char)0x00 + o + (char)0x00 + d + (char)0x00 + e + (char)0x00 + + (char)0x00 + i + (char)0x00 + n + (char)0x00 + s + (char)0x00 + t + (char)0x00 + a + (char)0x00 + l + (char)0x00 + l + (char)0x00 + e + (char)0x00 + r + (char)0x00 + + (char)0x00 + p + (char)0x00 + r + (char)0x00 + o + (char)0x00 + g + (char)0x00 + r + (char)0x00 + a + (char)0x00 + m + (char)0x00
|
||||
byte[] check = new byte[] { 0x52, 0x00, 0x65, 0x00, 0x67, 0x00, 0x69, 0x00, 0x73, 0x00, 0x74, 0x00, 0x72, 0x00, 0x61, 0x00, 0x74, 0x00, 0x69, 0x00, 0x6F, 0x00, 0x6E, 0x00, 0x20, 0x00, 0x43, 0x00, 0x6F, 0x00, 0x64, 0x00, 0x65, 0x00, 0x20, 0x00, 0x69, 0x00, 0x6E, 0x00, 0x73, 0x00, 0x74, 0x00, 0x61, 0x00, 0x6C, 0x00, 0x6C, 0x00, 0x65, 0x00, 0x72, 0x00, 0x20, 0x00, 0x70, 0x00, 0x72, 0x00, 0x6F, 0x00, 0x67, 0x00, 0x72, 0x00, 0x61, 0x00, 0x6D, 0x00 };
|
||||
byte?[] check = new byte?[] { 0x52, 0x00, 0x65, 0x00, 0x67, 0x00, 0x69, 0x00, 0x73, 0x00, 0x74, 0x00, 0x72, 0x00, 0x61, 0x00, 0x74, 0x00, 0x69, 0x00, 0x6F, 0x00, 0x6E, 0x00, 0x20, 0x00, 0x43, 0x00, 0x6F, 0x00, 0x64, 0x00, 0x65, 0x00, 0x20, 0x00, 0x69, 0x00, 0x6E, 0x00, 0x73, 0x00, 0x74, 0x00, 0x61, 0x00, 0x6C, 0x00, 0x6C, 0x00, 0x65, 0x00, 0x72, 0x00, 0x20, 0x00, 0x70, 0x00, 0x72, 0x00, 0x6F, 0x00, 0x67, 0x00, 0x72, 0x00, 0x61, 0x00, 0x6D, 0x00 };
|
||||
if (fileContent.FirstPosition(check, out int position))
|
||||
return $"EA CdKey Registration Module {Utilities.GetFileVersion(file)}" + (includePosition ? $" (Index {position})" : string.Empty);
|
||||
|
||||
// R + (char)0x00 + e + (char)0x00 + g + (char)0x00 + i + (char)0x00 + s + (char)0x00 + t + (char)0x00 + r + (char)0x00 + a + (char)0x00 + t + (char)0x00 + i + (char)0x00 + o + (char)0x00 + n + (char)0x00 + + (char)0x00 + c + (char)0x00 + o + (char)0x00 + d + (char)0x00 + e + (char)0x00 + + (char)0x00 + i + (char)0x00 + n + (char)0x00 + s + (char)0x00 + t + (char)0x00 + a + (char)0x00 + l + (char)0x00 + l + (char)0x00 + e + (char)0x00 + r + (char)0x00 + + (char)0x00 + p + (char)0x00 + r + (char)0x00 + o + (char)0x00 + g + (char)0x00 + r + (char)0x00 + a + (char)0x00 + m + (char)0x00
|
||||
check = new byte[] { 0x52, 0x00, 0x65, 0x00, 0x67, 0x00, 0x69, 0x00, 0x73, 0x00, 0x74, 0x00, 0x72, 0x00, 0x61, 0x00, 0x74, 0x00, 0x69, 0x00, 0x6F, 0x00, 0x6E, 0x00, 0x20, 0x00, 0x63, 0x00, 0x6F, 0x00, 0x64, 0x00, 0x65, 0x00, 0x20, 0x00, 0x69, 0x00, 0x6E, 0x00, 0x73, 0x00, 0x74, 0x00, 0x61, 0x00, 0x6C, 0x00, 0x6C, 0x00, 0x65, 0x00, 0x72, 0x00, 0x20, 0x00, 0x70, 0x00, 0x72, 0x00, 0x6F, 0x00, 0x67, 0x00, 0x72, 0x00, 0x61, 0x00, 0x6D, 0x00 };
|
||||
check = new byte?[] { 0x52, 0x00, 0x65, 0x00, 0x67, 0x00, 0x69, 0x00, 0x73, 0x00, 0x74, 0x00, 0x72, 0x00, 0x61, 0x00, 0x74, 0x00, 0x69, 0x00, 0x6F, 0x00, 0x6E, 0x00, 0x20, 0x00, 0x63, 0x00, 0x6F, 0x00, 0x64, 0x00, 0x65, 0x00, 0x20, 0x00, 0x69, 0x00, 0x6E, 0x00, 0x73, 0x00, 0x74, 0x00, 0x61, 0x00, 0x6C, 0x00, 0x6C, 0x00, 0x65, 0x00, 0x72, 0x00, 0x20, 0x00, 0x70, 0x00, 0x72, 0x00, 0x6F, 0x00, 0x67, 0x00, 0x72, 0x00, 0x61, 0x00, 0x6D, 0x00 };
|
||||
if (fileContent.FirstPosition(check, out position))
|
||||
return $"EA CdKey Registration Module {Utilities.GetFileVersion(file)}" + (includePosition ? $" (Index {position})" : string.Empty);
|
||||
|
||||
// A + (char)0x00 + b + (char)0x00 + o + (char)0x00 + u + (char)0x00 + t + (char)0x00 + + (char)0x00 + C + (char)0x00 + D + (char)0x00 + K + (char)0x00 + e + (char)0x00 + y + (char)0x00
|
||||
check = new byte[] { 0x41, 0x00, 0x62, 0x00, 0x6F, 0x00, 0x75, 0x00, 0x74, 0x00, 0x20, 0x00, 0x43, 0x00, 0x44, 0x00, 0x4B, 0x00, 0x65, 0x00, 0x79, 0x00 };
|
||||
check = new byte?[] { 0x41, 0x00, 0x62, 0x00, 0x6F, 0x00, 0x75, 0x00, 0x74, 0x00, 0x20, 0x00, 0x43, 0x00, 0x44, 0x00, 0x4B, 0x00, 0x65, 0x00, 0x79, 0x00 };
|
||||
if (fileContent.FirstPosition(check, out position))
|
||||
return $"EA CdKey Registration Module {Utilities.GetFileVersion(file)}" + (includePosition ? $" (Index {position})" : string.Empty);
|
||||
|
||||
// I + (char)0x00 + n + (char)0x00 + t + (char)0x00 + e + (char)0x00 + r + (char)0x00 + n + (char)0x00 + a + (char)0x00 + l + (char)0x00 + N + (char)0x00 + a + (char)0x00 + m + (char)0x00 + e + (char)0x00 + + (char)0x00 + + (char)0x00 + C + (char)0x00 + D + (char)0x00 + K + (char)0x00 + e + (char)0x00 + y + (char)0x00
|
||||
check = new byte[] { 0x49, 0x00, 0x6E, 0x00, 0x74, 0x00, 0x65, 0x00, 0x72, 0x00, 0x6E, 0x00, 0x61, 0x00, 0x6C, 0x00, 0x4E, 0x00, 0x61, 0x00, 0x6D, 0x00, 0x65, 0x00, 0x00, 0x00, 0x43, 0x00, 0x44, 0x00, 0x4B, 0x00, 0x65, 0x00, 0x79, 0x00 };
|
||||
check = new byte?[] { 0x49, 0x00, 0x6E, 0x00, 0x74, 0x00, 0x65, 0x00, 0x72, 0x00, 0x6E, 0x00, 0x61, 0x00, 0x6C, 0x00, 0x4E, 0x00, 0x61, 0x00, 0x6D, 0x00, 0x65, 0x00, 0x00, 0x00, 0x43, 0x00, 0x44, 0x00, 0x4B, 0x00, 0x65, 0x00, 0x79, 0x00 };
|
||||
if (fileContent.FirstPosition(check, out position))
|
||||
return $"EA CdKey Registration Module {Utilities.GetFileVersion(file)}" + (includePosition ? $" (Index {position})" : string.Empty);
|
||||
|
||||
// I + (char)0x00 + n + (char)0x00 + t + (char)0x00 + e + (char)0x00 + r + (char)0x00 + n + (char)0x00 + a + (char)0x00 + l + (char)0x00 + N + (char)0x00 + a + (char)0x00 + m + (char)0x00 + e + (char)0x00 + + (char)0x00 + + (char)0x00 + C + (char)0x00 + D + (char)0x00 + C + (char)0x00 + o + (char)0x00 + d + (char)0x00 + e + (char)0x00
|
||||
check = new byte[] { 0x49, 0x00, 0x6E, 0x00, 0x74, 0x00, 0x65, 0x00, 0x72, 0x00, 0x6E, 0x00, 0x61, 0x00, 0x6C, 0x00, 0x4E, 0x00, 0x61, 0x00, 0x6D, 0x00, 0x65, 0x00, 0x00, 0x00, 0x43, 0x00, 0x44, 0x00, 0x43, 0x00, 0x6F, 0x00, 0x64, 0x00, 0x65, 0x00 };
|
||||
check = new byte?[] { 0x49, 0x00, 0x6E, 0x00, 0x74, 0x00, 0x65, 0x00, 0x72, 0x00, 0x6E, 0x00, 0x61, 0x00, 0x6C, 0x00, 0x4E, 0x00, 0x61, 0x00, 0x6D, 0x00, 0x65, 0x00, 0x00, 0x00, 0x43, 0x00, 0x44, 0x00, 0x43, 0x00, 0x6F, 0x00, 0x64, 0x00, 0x65, 0x00 };
|
||||
if (fileContent.FirstPosition(check, out position))
|
||||
return $"EA CdKey Registration Module {Utilities.GetFileVersion(file)}" + (includePosition ? $" (Index {position})" : string.Empty);
|
||||
|
||||
// EReg Config Form
|
||||
check = new byte[] { 0x45, 0x52, 0x65, 0x67, 0x20, 0x43, 0x6F, 0x6E, 0x66, 0x69, 0x67, 0x20, 0x46, 0x6F, 0x72, 0x6D };
|
||||
check = new byte?[] { 0x45, 0x52, 0x65, 0x67, 0x20, 0x43, 0x6F, 0x6E, 0x66, 0x69, 0x67, 0x20, 0x46, 0x6F, 0x72, 0x6D };
|
||||
if (fileContent.FirstPosition(check, out position))
|
||||
return $"EA CdKey Registration Module {Utilities.GetFileVersion(file)}" + (includePosition ? $" (Index {position})" : string.Empty);
|
||||
|
||||
// ereg.ea-europe.com
|
||||
check = new byte[] { 0x65, 0x72, 0x65, 0x67, 0x2E, 0x65, 0x61, 0x2D, 0x65, 0x75, 0x72, 0x6F, 0x70, 0x65, 0x2E, 0x63, 0x6F, 0x6D };
|
||||
check = new byte?[] { 0x65, 0x72, 0x65, 0x67, 0x2E, 0x65, 0x61, 0x2D, 0x65, 0x75, 0x72, 0x6F, 0x70, 0x65, 0x2E, 0x63, 0x6F, 0x6D };
|
||||
if (fileContent.FirstPosition(check, out position))
|
||||
return $"EA CdKey Registration Module {Utilities.GetFileVersion(file)}" + (includePosition ? $" (Index {position})" : string.Empty);
|
||||
|
||||
// GenericEA + (char)0x00 + (char)0x00 + (char)0x00 + Activation
|
||||
check = new byte[] { 0x47, 0x65, 0x6E, 0x65, 0x72, 0x69, 0x63, 0x45, 0x41, 0x00, 0x00, 0x00, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6F, 0x6E };
|
||||
check = new byte?[] { 0x47, 0x65, 0x6E, 0x65, 0x72, 0x69, 0x63, 0x45, 0x41, 0x00, 0x00, 0x00, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6F, 0x6E };
|
||||
if (fileContent.FirstPosition(check, out position))
|
||||
return "EA DRM Protection" + (includePosition ? $" (Index {position})" : string.Empty);
|
||||
|
||||
// E + (char)0x00 + A + (char)0x00 + + (char)0x00 + D + (char)0x00 + R + (char)0x00 + M + (char)0x00 + + (char)0x00 + H + (char)0x00 + e + (char)0x00 + l + (char)0x00 + p + (char)0x00 + e + (char)0x00 + r + (char)0x00
|
||||
check = new byte[] { 0x45, 0x00, 0x41, 0x00, 0x20, 0x00, 0x44, 0x00, 0x52, 0x00, 0x4D, 0x00, 0x20, 0x00, 0x48, 0x00, 0x65, 0x00, 0x6C, 0x00, 0x70, 0x00, 0x65, 0x00, 0x72, 0x00 };
|
||||
check = new byte?[] { 0x45, 0x00, 0x41, 0x00, 0x20, 0x00, 0x44, 0x00, 0x52, 0x00, 0x4D, 0x00, 0x20, 0x00, 0x48, 0x00, 0x65, 0x00, 0x6C, 0x00, 0x70, 0x00, 0x65, 0x00, 0x72, 0x00 };
|
||||
if (fileContent.FirstPosition(check, out position))
|
||||
return "EA DRM Protection" + (includePosition ? $" (Index {position})" : string.Empty);
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace BurnOutSharp.ProtectionType
|
||||
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
|
||||
{
|
||||
// "xlive.dll"
|
||||
byte[] check = new byte[] { 0x78, 0x6C, 0x69, 0x76, 0x65, 0x2E, 0x64, 0x6C, 0x6C };
|
||||
byte?[] check = new byte?[] { 0x78, 0x6C, 0x69, 0x76, 0x65, 0x2E, 0x64, 0x6C, 0x6C };
|
||||
if (fileContent.FirstPosition(check, out int position))
|
||||
return "Games for Windows - Live" + (includePosition ? $" (Index {position})" : string.Empty);
|
||||
|
||||
|
||||
@@ -11,11 +11,11 @@ namespace BurnOutSharp.ProtectionType
|
||||
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
|
||||
{
|
||||
// "CVPInitializeClient"
|
||||
byte[] check = new byte[] { 0x43, 0x56, 0x50, 0x49, 0x6E, 0x69, 0x74, 0x69, 0x61, 0x6C, 0x69, 0x7A, 0x65, 0x43, 0x6C, 0x69, 0x65, 0x6E, 0x74 };
|
||||
byte?[] check = new byte?[] { 0x43, 0x56, 0x50, 0x49, 0x6E, 0x69, 0x74, 0x69, 0x61, 0x6C, 0x69, 0x7A, 0x65, 0x43, 0x6C, 0x69, 0x65, 0x6E, 0x74 };
|
||||
if (fileContent.FirstPosition(check, out int position))
|
||||
{
|
||||
// "A" + (char)0x00 + "T" + (char)0x00 + "T" + (char)0x00 + "L" + (char)0x00 + "I" + (char)0x00 + "S" + (char)0x00 + "T" + (char)0x00 + (char)0x00 + (char)0x00 + "E" + (char)0x00 + "L" + (char)0x00 + "E" + (char)0x00 + "M" + (char)0x00 + "E" + (char)0x00 + "N" + (char)0x00 + "T" + (char)0x00 + (char)0x00 + (char)0x00 + "N" + (char)0x00 + "O" + (char)0x00 + "T" + (char)0x00 + "A" + (char)0x00 + "T" + (char)0x00 + "I" + (char)0x00 + "O" + (char)0x00 + "N"
|
||||
byte[] check2 = new byte[] { 0x41, 0x00, 0x54, 0x00, 0x54, 0x00, 0x4C, 0x00, 0x49, 0x00, 0x53, 0x00, 0x54, 0x00, 0x00, 0x00, 0x45, 0x00, 0x4C, 0x00, 0x45, 0x00, 0x4D, 0x00, 0x45, 0x00, 0x4E, 0x00, 0x54, 0x00, 0x00, 0x00, 0x4E, 0x00, 0x4F, 0x00, 0x54, 0x00, 0x41, 0x00, 0x54, 0x00, 0x49, 0x00, 0x4F, 0x00, 0x4E };
|
||||
byte?[] check2 = new byte?[] { 0x41, 0x00, 0x54, 0x00, 0x54, 0x00, 0x4C, 0x00, 0x49, 0x00, 0x53, 0x00, 0x54, 0x00, 0x00, 0x00, 0x45, 0x00, 0x4C, 0x00, 0x45, 0x00, 0x4D, 0x00, 0x45, 0x00, 0x4E, 0x00, 0x54, 0x00, 0x00, 0x00, 0x4E, 0x00, 0x4F, 0x00, 0x54, 0x00, 0x41, 0x00, 0x54, 0x00, 0x49, 0x00, 0x4F, 0x00, 0x4E };
|
||||
if (fileContent.FirstPosition(check2, out int position2))
|
||||
return $"Impulse Reactor {Utilities.GetFileVersion(file)}" + (includePosition ? $" (Index {position}, {position2})" : string.Empty);
|
||||
else
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
|
||||
{
|
||||
// Trial + (char)0x00 + P
|
||||
byte[] check = new byte[] { 0x54, 0x72, 0x69, 0x61, 0x6C, 0x00, 0x50 };
|
||||
byte?[] check = new byte?[] { 0x54, 0x72, 0x69, 0x61, 0x6C, 0x00, 0x50 };
|
||||
if (fileContent.FirstPosition(check, out int position))
|
||||
return "INTENIUM Trial & Buy Protection" + (includePosition ? $" (Index {position})" : string.Empty);
|
||||
|
||||
|
||||
@@ -9,11 +9,11 @@ namespace BurnOutSharp.ProtectionType
|
||||
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
|
||||
{
|
||||
// ".ext "
|
||||
byte[] check = new byte[] { 0x2E, 0x65, 0x78, 0x74, 0x20, 0x20, 0x20, 0x20 };
|
||||
byte?[] check = new byte?[] { 0x2E, 0x65, 0x78, 0x74, 0x20, 0x20, 0x20, 0x20 };
|
||||
if (fileContent.FirstPosition(check, out int position))
|
||||
{
|
||||
// "kernel32.dll" + (char)0x00 + (char)0x00 + (char)0x00 + "VirtualProtect"
|
||||
byte[] check2 = new byte[] { 0x6B, 0x65, 0x72, 0x6E, 0x65, 0x6C, 0x33, 0x32, 0x2E, 0x64, 0x6C, 0x6C, 0x00, 0x00, 0x00, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6C, 0x50, 0x72, 0x6F, 0x74, 0x65, 0x63, 0x74 };
|
||||
byte?[] check2 = new byte?[] { 0x6B, 0x65, 0x72, 0x6E, 0x65, 0x6C, 0x33, 0x32, 0x2E, 0x64, 0x6C, 0x6C, 0x00, 0x00, 0x00, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6C, 0x50, 0x72, 0x6F, 0x74, 0x65, 0x63, 0x74 };
|
||||
if (fileContent.FirstPosition(check2, out int position2))
|
||||
return $"JoWooD X-Prot {GetVersion(fileContent, --position2)}" + (includePosition ? $" (Index {position}, {position2})" : string.Empty);
|
||||
else
|
||||
@@ -21,7 +21,7 @@ namespace BurnOutSharp.ProtectionType
|
||||
}
|
||||
|
||||
// "@HC09 "
|
||||
check = new byte[] { 0x40, 0x48, 0x43, 0x30, 0x39, 0x20, 0x20, 0x20, 0x20 };
|
||||
check = new byte?[] { 0x40, 0x48, 0x43, 0x30, 0x39, 0x20, 0x20, 0x20, 0x20 };
|
||||
if (fileContent.FirstPosition(check, out position))
|
||||
return $"JoWooD X-Prot v2" + (includePosition ? $" (Index {position})" : string.Empty);
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
|
||||
{
|
||||
// "KEY-LOCK COMMAND"
|
||||
byte[] check = new byte[] { 0x4B, 0x45, 0x59, 0x2D, 0x4C, 0x4F, 0x43, 0x4B, 0x20, 0x43, 0x4F, 0x4D, 0x4D, 0x41, 0x4E, 0x44 };
|
||||
byte?[] check = new byte?[] { 0x4B, 0x45, 0x59, 0x2D, 0x4C, 0x4F, 0x43, 0x4B, 0x20, 0x43, 0x4F, 0x4D, 0x4D, 0x41, 0x4E, 0x44 };
|
||||
if (fileContent.FirstPosition(check, out int position))
|
||||
return $"Key-Lock (Dongle)" + (includePosition ? $" (Index {position})" : string.Empty);
|
||||
|
||||
|
||||
@@ -11,11 +11,11 @@ namespace BurnOutSharp.ProtectionType
|
||||
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
|
||||
{
|
||||
// "Packed by SPEEnc V2 Asterios Parlamentas.PE"
|
||||
byte[] check = new byte[] { 0x50, 0x61, 0x63, 0x6B, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x53, 0x50, 0x45, 0x45, 0x6E, 0x63, 0x20, 0x56, 0x32, 0x20, 0x41, 0x73, 0x74, 0x65, 0x72, 0x69, 0x6F, 0x73, 0x20, 0x50, 0x61, 0x72, 0x6C, 0x61, 0x6D, 0x65, 0x6E, 0x74, 0x61, 0x73, 0x2E, 0x50, 0x45 };
|
||||
byte?[] check = new byte?[] { 0x50, 0x61, 0x63, 0x6B, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x53, 0x50, 0x45, 0x45, 0x6E, 0x63, 0x20, 0x56, 0x32, 0x20, 0x41, 0x73, 0x74, 0x65, 0x72, 0x69, 0x6F, 0x73, 0x20, 0x50, 0x61, 0x72, 0x6C, 0x61, 0x6D, 0x65, 0x6E, 0x74, 0x61, 0x73, 0x2E, 0x50, 0x45 };
|
||||
bool containsCheck = fileContent.FirstPosition(check, out int position);
|
||||
|
||||
// "GetModuleHandleA" + (char)0x00 + (char)0x00 + (char)0x00 + (char)0x00 + "GetProcAddress" + (char)0x00 + (char)0x00 + (char)0x00 + (char)0x00 + "LoadLibraryA" + (char)0x00 + (char)0x00 + "KERNEL32.dll" + (char)0x00 + "ëy" + (char)0x01 + "SNIF"
|
||||
byte[] check2 = { 0x47, 0x65, 0x74, 0x4D, 0x6F, 0x64, 0x75, 0x6C, 0x65, 0x48, 0x61, 0x6E, 0x64, 0x6C, 0x65, 0x41, 0x00, 0x00, 0x00, 0x00, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6F, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x00, 0x00, 0x00, 0x00, 0x4C, 0x6F, 0x61, 0x64, 0x4C, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x41, 0x00, 0x00, 0x4B, 0x45, 0x52, 0x4E, 0x45, 0x4C, 0x33, 0x32, 0x2E, 0x64, 0x6C, 0x6C, 0x00, 0xEB, 0x79, 0x01, 0x53, 0x4E, 0x49, 0x46 };
|
||||
byte?[] check2 = { 0x47, 0x65, 0x74, 0x4D, 0x6F, 0x64, 0x75, 0x6C, 0x65, 0x48, 0x61, 0x6E, 0x64, 0x6C, 0x65, 0x41, 0x00, 0x00, 0x00, 0x00, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6F, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x00, 0x00, 0x00, 0x00, 0x4C, 0x6F, 0x61, 0x64, 0x4C, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x41, 0x00, 0x00, 0x4B, 0x45, 0x52, 0x4E, 0x45, 0x4C, 0x33, 0x32, 0x2E, 0x64, 0x6C, 0x6C, 0x00, 0xEB, 0x79, 0x01, 0x53, 0x4E, 0x49, 0x46 };
|
||||
bool containsCheck2 = fileContent.FirstPosition(check2, out int position2);
|
||||
|
||||
if (containsCheck && containsCheck2)
|
||||
@@ -29,12 +29,12 @@ namespace BurnOutSharp.ProtectionType
|
||||
return $"LaserLock {GetVersion16Bit(fileContent)}" + (includePosition ? $" (Index 71)" : string.Empty);
|
||||
|
||||
// ":\\LASERLOK\\LASERLOK.IN" + (char)0x00 + "C:\\NOMOUSE.SP"
|
||||
check = new byte[] { 0x3A, 0x5C, 0x5C, 0x4C, 0x41, 0x53, 0x45, 0x52, 0x4C, 0x4F, 0x4B, 0x5C, 0x5C, 0x4C, 0x41, 0x53, 0x45, 0x52, 0x4C, 0x4F, 0x4B, 0x2E, 0x49, 0x4E, 0x00, 0x43, 0x3A, 0x5C, 0x5C, 0x4E, 0x4F, 0x4D, 0x4F, 0x55, 0x53, 0x45, 0x2E, 0x53, 0x50 };
|
||||
check = new byte?[] { 0x3A, 0x5C, 0x5C, 0x4C, 0x41, 0x53, 0x45, 0x52, 0x4C, 0x4F, 0x4B, 0x5C, 0x5C, 0x4C, 0x41, 0x53, 0x45, 0x52, 0x4C, 0x4F, 0x4B, 0x2E, 0x49, 0x4E, 0x00, 0x43, 0x3A, 0x5C, 0x5C, 0x4E, 0x4F, 0x4D, 0x4F, 0x55, 0x53, 0x45, 0x2E, 0x53, 0x50 };
|
||||
if (fileContent.FirstPosition(check, out position))
|
||||
return "LaserLock 3" + (includePosition ? $" (Index {position})" : string.Empty);
|
||||
|
||||
// "LASERLOK_INIT" + (char)0xC + "LASERLOK_RUN" + (char)0xE + "LASERLOK_CHECK" + (char)0xF + "LASERLOK_CHECK2" + (char)0xF + "LASERLOK_CHECK3"
|
||||
check = new byte[] { 0x4C, 0x41, 0x53, 0x45, 0x52, 0x4C, 0x4F, 0x4B, 0x5F, 0x49, 0x4E, 0x49, 0x54, 0x0C, 0x4C, 0x41, 0x53, 0x45, 0x52, 0x4C, 0x4F, 0x4B, 0x5F, 0x52, 0x55, 0x4E, 0x0E, 0x4C, 0x41, 0x53, 0x45, 0x52, 0x4C, 0x4F, 0x4B, 0x5F, 0x43, 0x48, 0x45, 0x43, 0x4B, 0x0F, 0x4C, 0x41, 0x53, 0x45, 0x52, 0x4C, 0x4F, 0x4B, 0x5F, 0x43, 0x48, 0x45, 0x43, 0x4B, 0x32, 0x0F, 0x4C, 0x41, 0x53, 0x45, 0x52, 0x4C, 0x4F, 0x4B, 0x5F, 0x43, 0x48, 0x45, 0x43, 0x4B, 0x33 };
|
||||
check = new byte?[] { 0x4C, 0x41, 0x53, 0x45, 0x52, 0x4C, 0x4F, 0x4B, 0x5F, 0x49, 0x4E, 0x49, 0x54, 0x0C, 0x4C, 0x41, 0x53, 0x45, 0x52, 0x4C, 0x4F, 0x4B, 0x5F, 0x52, 0x55, 0x4E, 0x0E, 0x4C, 0x41, 0x53, 0x45, 0x52, 0x4C, 0x4F, 0x4B, 0x5F, 0x43, 0x48, 0x45, 0x43, 0x4B, 0x0F, 0x4C, 0x41, 0x53, 0x45, 0x52, 0x4C, 0x4F, 0x4B, 0x5F, 0x43, 0x48, 0x45, 0x43, 0x4B, 0x32, 0x0F, 0x4C, 0x41, 0x53, 0x45, 0x52, 0x4C, 0x4F, 0x4B, 0x5F, 0x43, 0x48, 0x45, 0x43, 0x4B, 0x33 };
|
||||
if (fileContent.FirstPosition(check, out position))
|
||||
return "LaserLock 5" + (includePosition ? $" (Index {position})" : string.Empty);
|
||||
|
||||
@@ -85,7 +85,7 @@ namespace BurnOutSharp.ProtectionType
|
||||
private static string GetBuild(byte[] fileContent, bool versionTwo)
|
||||
{
|
||||
// "Unkown" + (char)0x00 + "Unkown" // TODO: Is this supposed to be "Unknown"?
|
||||
byte[] check = new byte[] { 0x55, 0x6E, 0x6B, 0x6F, 0x77, 0x6E, 0x00, 0x55, 0x6E, 0x6B, 0x6F, 0x77, 0x6E };
|
||||
byte?[] check = new byte?[] { 0x55, 0x6E, 0x6B, 0x6F, 0x77, 0x6E, 0x00, 0x55, 0x6E, 0x6B, 0x6F, 0x77, 0x6E };
|
||||
fileContent.FirstPosition(check, out int position);
|
||||
string year, month, day;
|
||||
if (versionTwo)
|
||||
|
||||
@@ -11,12 +11,12 @@ namespace BurnOutSharp.ProtectionType
|
||||
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
|
||||
{
|
||||
// Cd3Ctl
|
||||
byte[] check = new byte[] { 0x43, 0x64, 0x33, 0x43, 0x74, 0x6C };
|
||||
byte?[] check = new byte?[] { 0x43, 0x64, 0x33, 0x43, 0x74, 0x6C };
|
||||
if (fileContent.FirstPosition(check, out int position))
|
||||
return "MediaMax CD-3" + (includePosition ? $" (Index {position})" : string.Empty);
|
||||
|
||||
// DllInstallSbcp
|
||||
check = new byte[] { 0x44, 0x6C, 0x6C, 0x49, 0x6E, 0x73, 0x74, 0x61, 0x6C, 0x6C, 0x53, 0x62, 0x63, 0x70 };
|
||||
check = new byte?[] { 0x44, 0x6C, 0x6C, 0x49, 0x6E, 0x73, 0x74, 0x61, 0x6C, 0x6C, 0x53, 0x62, 0x63, 0x70 };
|
||||
if (fileContent.FirstPosition(check, out position))
|
||||
return "MediaMax CD-3" + (includePosition ? $" (Index {position})" : string.Empty);
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
|
||||
{
|
||||
// I + (char)0x00 + n + (char)0x00 + t + (char)0x00 + e + (char)0x00 + r + (char)0x00 + n + (char)0x00 + a + (char)0x00 + l + (char)0x00 + N + (char)0x00 + a + (char)0x00 + m + (char)0x00 + e + (char)0x00 + + (char)0x00 + + (char)0x00 + E + (char)0x00 + R + (char)0x00 + e + (char)0x00 + g + (char)0x00
|
||||
byte[] check = new byte[] { 0x49, 0x00, 0x6E, 0x00, 0x74, 0x00, 0x65, 0x00, 0x72, 0x00, 0x6E, 0x00, 0x61, 0x00, 0x6C, 0x00, 0x4E, 0x00, 0x61, 0x00, 0x6D, 0x00, 0x65, 0x00, 0x00, 0x00, 0x45, 0x00, 0x52, 0x00, 0x65, 0x00, 0x67, 0x00 };
|
||||
byte?[] check = new byte?[] { 0x49, 0x00, 0x6E, 0x00, 0x74, 0x00, 0x65, 0x00, 0x72, 0x00, 0x6E, 0x00, 0x61, 0x00, 0x6C, 0x00, 0x4E, 0x00, 0x61, 0x00, 0x6D, 0x00, 0x65, 0x00, 0x00, 0x00, 0x45, 0x00, 0x52, 0x00, 0x65, 0x00, 0x67, 0x00 };
|
||||
if (fileContent.FirstPosition(check, out int position))
|
||||
return $"EA CdKey Registration Module {Utilities.GetFileVersion(file)}" + (includePosition ? $" (Index {position})" : string.Empty);
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace BurnOutSharp.ProtectionType
|
||||
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
|
||||
{
|
||||
// O + (char)0x00 + r + (char)0x00 + i + (char)0x00 + g + (char)0x00 + i + (char)0x00 + n + (char)0x00 + S + (char)0x00 + e + (char)0x00 + t + (char)0x00 + u + (char)0x00 + p + (char)0x00 + . + (char)0x00 + e + (char)0x00 + x + (char)0x00 + e + (char)0x00
|
||||
byte[] check = new byte[] { 0x4F, 0x00, 0x72, 0x00, 0x69, 0x00, 0x67, 0x00, 0x69, 0x00, 0x6E, 0x00, 0x53, 0x00, 0x65, 0x00, 0x74, 0x00, 0x75, 0x00, 0x70, 0x00, 0x2E, 0x00, 0x65, 0x00, 0x78, 0x00, 0x65, 0x00 };
|
||||
byte?[] check = new byte?[] { 0x4F, 0x00, 0x72, 0x00, 0x69, 0x00, 0x67, 0x00, 0x69, 0x00, 0x6E, 0x00, 0x53, 0x00, 0x65, 0x00, 0x74, 0x00, 0x75, 0x00, 0x70, 0x00, 0x2E, 0x00, 0x65, 0x00, 0x78, 0x00, 0x65, 0x00 };
|
||||
if (fileContent.FirstPosition(check, out int position))
|
||||
return "Origin" + (includePosition ? $" (Index {position})" : string.Empty);
|
||||
|
||||
|
||||
@@ -8,12 +8,12 @@
|
||||
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
|
||||
{
|
||||
// " SOFTWARE TERMINATED\nCONSOLE MAY HAVE BEEN MODIFIED\n CALL 1-888-780-7690"
|
||||
byte[] check = new byte[] { 0x20, 0x20, 0x20, 0x20, 0x20, 0x53, 0x4F, 0x46, 0x54, 0x57, 0x41, 0x52, 0x45, 0x20, 0x54, 0x45, 0x52, 0x4D, 0x49, 0x4E, 0x41, 0x54, 0x45, 0x44, 0x5C, 0x6E, 0x43, 0x4F, 0x4E, 0x53, 0x4F, 0x4C, 0x45, 0x20, 0x4D, 0x41, 0x59, 0x20, 0x48, 0x41, 0x56, 0x45, 0x20, 0x42, 0x45, 0x45, 0x4E, 0x20, 0x4D, 0x4F, 0x44, 0x49, 0x46, 0x49, 0x45, 0x44, 0x5C, 0x6E, 0x20, 0x20, 0x20, 0x20, 0x20, 0x43, 0x41, 0x4C, 0x4C, 0x20, 0x31, 0x2D, 0x38, 0x38, 0x38, 0x2D, 0x37, 0x38, 0x30, 0x2D, 0x37, 0x36, 0x39, 0x30 };
|
||||
byte?[] check = new byte?[] { 0x20, 0x20, 0x20, 0x20, 0x20, 0x53, 0x4F, 0x46, 0x54, 0x57, 0x41, 0x52, 0x45, 0x20, 0x54, 0x45, 0x52, 0x4D, 0x49, 0x4E, 0x41, 0x54, 0x45, 0x44, 0x5C, 0x6E, 0x43, 0x4F, 0x4E, 0x53, 0x4F, 0x4C, 0x45, 0x20, 0x4D, 0x41, 0x59, 0x20, 0x48, 0x41, 0x56, 0x45, 0x20, 0x42, 0x45, 0x45, 0x4E, 0x20, 0x4D, 0x4F, 0x44, 0x49, 0x46, 0x49, 0x45, 0x44, 0x5C, 0x6E, 0x20, 0x20, 0x20, 0x20, 0x20, 0x43, 0x41, 0x4C, 0x4C, 0x20, 0x31, 0x2D, 0x38, 0x38, 0x38, 0x2D, 0x37, 0x38, 0x30, 0x2D, 0x37, 0x36, 0x39, 0x30 };
|
||||
if (fileContent.FirstPosition(check, out int position))
|
||||
return $"PlayStation Anti-modchip (English)" + (includePosition ? $"(Index {position})" : string.Empty);
|
||||
|
||||
// "強制終了しました。\n本体が改造されている\nおそれがあります。"
|
||||
check = new byte[] { 0x5F, 0x37, 0x52, 0x36, 0x7D, 0x42, 0x4E, 0x86, 0x30, 0x57, 0x30, 0x7E, 0x30, 0x57, 0x30, 0x5F, 0x30, 0x02, 0x5C, 0x6E, 0x67, 0x2C, 0x4F, 0x53, 0x30, 0x4C, 0x65, 0x39, 0x90, 0x20, 0x30, 0x55, 0x30, 0x8C, 0x30, 0x66, 0x30, 0x44, 0x30, 0x8B, 0x5C, 0x6E, 0x30, 0x4A, 0x30, 0x5D, 0x30, 0x8C, 0x30, 0x4C, 0x30, 0x42, 0x30, 0x8A, 0x30, 0x7E, 0x30, 0x59, 0x30, 0x02 };
|
||||
check = new byte?[] { 0x5F, 0x37, 0x52, 0x36, 0x7D, 0x42, 0x4E, 0x86, 0x30, 0x57, 0x30, 0x7E, 0x30, 0x57, 0x30, 0x5F, 0x30, 0x02, 0x5C, 0x6E, 0x67, 0x2C, 0x4F, 0x53, 0x30, 0x4C, 0x65, 0x39, 0x90, 0x20, 0x30, 0x55, 0x30, 0x8C, 0x30, 0x66, 0x30, 0x44, 0x30, 0x8B, 0x5C, 0x6E, 0x30, 0x4A, 0x30, 0x5D, 0x30, 0x8C, 0x30, 0x4C, 0x30, 0x42, 0x30, 0x8A, 0x30, 0x7E, 0x30, 0x59, 0x30, 0x02 };
|
||||
if (fileContent.FirstPosition(check, out position))
|
||||
return $"PlayStation Anti-modchip (Japanese)" + (includePosition ? $"(Index {position})" : string.Empty);
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace BurnOutSharp.ProtectionType
|
||||
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
|
||||
{
|
||||
// "HúMETINF"
|
||||
byte[] check = new byte[] { 0x48, 0xFA, 0x4D, 0x45, 0x54, 0x49, 0x4E, 0x46 };
|
||||
byte?[] check = new byte?[] { 0x48, 0xFA, 0x4D, 0x45, 0x54, 0x49, 0x4E, 0x46 };
|
||||
if (fileContent.FirstPosition(check, out int position))
|
||||
{
|
||||
string version = SearchProtectDiscVersion(file, fileContent);
|
||||
@@ -32,7 +32,7 @@ namespace BurnOutSharp.ProtectionType
|
||||
}
|
||||
|
||||
// "ACE-PCD"
|
||||
check = new byte[] { 0x41, 0x43, 0x45, 0x2D, 0x50, 0x43, 0x44 };
|
||||
check = new byte?[] { 0x41, 0x43, 0x45, 0x2D, 0x50, 0x43, 0x44 };
|
||||
if (fileContent.FirstPosition(check, out position))
|
||||
{
|
||||
string version = SearchProtectDiscVersion(file, fileContent);
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
|
||||
{
|
||||
// (char)0x00 + "Allocator" + (char)0x00 + (char)0x00 + (char)0x00 + (char)0x00
|
||||
byte[] check = new byte[] { 0x00, 0x41, 0x6C, 0x6C, 0x6F, 0x63, 0x61, 0x74, 0x6F, 0x72, 0x00, 0x00, 0x00, 0x00 };
|
||||
byte?[] check = new byte?[] { 0x00, 0x41, 0x6C, 0x6C, 0x6F, 0x63, 0x61, 0x74, 0x6F, 0x72, 0x00, 0x00, 0x00, 0x00 };
|
||||
if (fileContent.FirstPosition(check, out int position))
|
||||
return "Ring PROTECH [Check disc for physical ring]" + (includePosition ? $" (Index {position})" : string.Empty);
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
|
||||
{
|
||||
// "?SVKP" + (char)0x00 + (char)0x00
|
||||
byte[] check = new byte[] { 0x3F, 0x53, 0x56, 0x4B, 0x50, 0x00, 0x00 };
|
||||
byte?[] check = new byte?[] { 0x3F, 0x53, 0x56, 0x4B, 0x50, 0x00, 0x00 };
|
||||
if (fileContent.FirstPosition(check, out int position))
|
||||
return "SVK Protector" + (includePosition ? $" (Index {position})" : string.Empty);
|
||||
|
||||
|
||||
@@ -13,11 +13,11 @@ namespace BurnOutSharp.ProtectionType
|
||||
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
|
||||
{
|
||||
// "BoG_ *90.0&!! Yy>"
|
||||
byte[] check = new byte[] { 0x42, 0x6F, 0x47, 0x5F, 0x20, 0x2A, 0x39, 0x30, 0x2E, 0x30, 0x26, 0x21, 0x21, 0x20, 0x20, 0x59, 0x79, 0x3E };
|
||||
byte?[] check = new byte?[] { 0x42, 0x6F, 0x47, 0x5F, 0x20, 0x2A, 0x39, 0x30, 0x2E, 0x30, 0x26, 0x21, 0x21, 0x20, 0x20, 0x59, 0x79, 0x3E };
|
||||
if (fileContent.FirstPosition(check, out int position))
|
||||
{
|
||||
// "product activation library"
|
||||
byte[] check2 = new byte[] { 0x70, 0x72, 0x6F, 0x64, 0x75, 0x63, 0x74, 0x20, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6F, 0x6E, 0x20, 0x6C, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79 };
|
||||
byte?[] check2 = new byte?[] { 0x70, 0x72, 0x6F, 0x64, 0x75, 0x63, 0x74, 0x20, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6F, 0x6E, 0x20, 0x6C, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79 };
|
||||
if (fileContent.FirstPosition(check2, out int position2))
|
||||
return $"SafeCast {GetVersion(fileContent, position)}" + (includePosition ? $" (Index {position}, {position2})" : string.Empty);
|
||||
else
|
||||
@@ -25,7 +25,7 @@ namespace BurnOutSharp.ProtectionType
|
||||
}
|
||||
|
||||
// (char)0x00 + (char)0x00 + "BoG_"
|
||||
check = new byte[] { 0x00, 0x00, 0x42, 0x6F, 0x47, 0x5F };
|
||||
check = new byte?[] { 0x00, 0x00, 0x42, 0x6F, 0x47, 0x5F };
|
||||
if (fileContent.FirstPosition(check, out position))
|
||||
{
|
||||
string version = SearchSafeDiscVersion(file, fileContent);
|
||||
@@ -36,7 +36,7 @@ namespace BurnOutSharp.ProtectionType
|
||||
}
|
||||
|
||||
// "stxt774"
|
||||
check = new byte[] { 0x73, 0x74, 0x78, 0x74, 0x37, 0x37, 0x34 };
|
||||
check = new byte?[] { 0x73, 0x74, 0x78, 0x74, 0x37, 0x37, 0x34 };
|
||||
if (fileContent.FirstPosition(check, out position))
|
||||
{
|
||||
string version = SearchSafeDiscVersion(file, fileContent);
|
||||
@@ -47,7 +47,7 @@ namespace BurnOutSharp.ProtectionType
|
||||
}
|
||||
|
||||
// "stxt371"
|
||||
check = new byte[] { 0x73, 0x74, 0x78, 0x74, 0x33, 0x37, 0x31 };
|
||||
check = new byte?[] { 0x73, 0x74, 0x78, 0x74, 0x33, 0x37, 0x31 };
|
||||
if (fileContent.FirstPosition(check, out position))
|
||||
{
|
||||
string version = SearchSafeDiscVersion(file, fileContent);
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace BurnOutSharp.ProtectionType
|
||||
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
|
||||
{
|
||||
// "SafeLock"
|
||||
byte[] check = new byte[] { 0x53, 0x61, 0x66, 0x65, 0x4C, 0x6F, 0x63, 0x6B };
|
||||
byte?[] check = new byte?[] { 0x53, 0x61, 0x66, 0x65, 0x4C, 0x6F, 0x63, 0x6B };
|
||||
if (fileContent.FirstPosition(check, out int position))
|
||||
return "SafeLock" + (includePosition ? $" (Index {position})" : string.Empty);
|
||||
|
||||
|
||||
@@ -12,37 +12,37 @@ namespace BurnOutSharp.ProtectionType
|
||||
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
|
||||
{
|
||||
// "AddD" + (char)0x03 + (char)0x00 + (char)0x00 + (char)0x00)
|
||||
byte[] check = new byte[] { 0x41, 0x64, 0x64, 0x44, 0x03, 0x00, 0x00, 0x00 };
|
||||
byte?[] check = new byte?[] { 0x41, 0x64, 0x64, 0x44, 0x03, 0x00, 0x00, 0x00 };
|
||||
if (fileContent.FirstPosition(check, out int position))
|
||||
return $"SecuROM {GetV4Version(fileContent, position)}" + (includePosition ? $" (Index {position})" : string.Empty);
|
||||
|
||||
// (char)0xCA + (char)0xDD + (char)0xDD + (char)0xAC + (char)0x03
|
||||
check = new byte[] { 0xCA, 0xDD, 0xDD, 0xAC, 0x03 };
|
||||
check = new byte?[] { 0xCA, 0xDD, 0xDD, 0xAC, 0x03 };
|
||||
if (fileContent.FirstPosition(check, out position))
|
||||
return $"SecuROM {GetV5Version(fileContent, position)}" + (includePosition ? $" (Index {position})" : string.Empty);
|
||||
|
||||
// ".securom" + (char)0xE0 + (char)0xC0
|
||||
check = new byte[] { 0x2E, 0x73, 0x65, 0x63, 0x75, 0x72, 0x6F, 0x6D, 0xE0, 0xC0 };
|
||||
check = new byte?[] { 0x2E, 0x73, 0x65, 0x63, 0x75, 0x72, 0x6F, 0x6D, 0xE0, 0xC0 };
|
||||
if (fileContent.FirstPosition(check, out position) && position == 0)
|
||||
return $"SecuROM {GetV7Version(fileContent)}" + (includePosition ? $" (Index {position})" : string.Empty);
|
||||
|
||||
// ".securom"
|
||||
check = new byte[] { 0x2E, 0x73, 0x65, 0x63, 0x75, 0x72, 0x6F, 0x6D };
|
||||
check = new byte?[] { 0x2E, 0x73, 0x65, 0x63, 0x75, 0x72, 0x6F, 0x6D };
|
||||
if (fileContent.FirstPosition(check, out position))
|
||||
return $"SecuROM {GetV7Version(fileContent)}" + (includePosition ? $" (Index {position})" : string.Empty);
|
||||
|
||||
// "_and_play.dll" + (char)0x00 + "drm_pagui_doit"
|
||||
check = new byte[] { 0x5F, 0x61, 0x6E, 0x64, 0x5F, 0x70, 0x6C, 0x61, 0x79, 0x2E, 0x64, 0x6C, 0x6C, 0x00, 0x64, 0x72, 0x6D, 0x5F, 0x70, 0x61, 0x67, 0x75, 0x69, 0x5F, 0x64, 0x6F, 0x69, 0x74 };
|
||||
check = new byte?[] { 0x5F, 0x61, 0x6E, 0x64, 0x5F, 0x70, 0x6C, 0x61, 0x79, 0x2E, 0x64, 0x6C, 0x6C, 0x00, 0x64, 0x72, 0x6D, 0x5F, 0x70, 0x61, 0x67, 0x75, 0x69, 0x5F, 0x64, 0x6F, 0x69, 0x74 };
|
||||
if (fileContent.FirstPosition(check, out position))
|
||||
return $"SecuROM Product Activation {Utilities.GetFileVersion(file)}" + (includePosition ? $" (Index {position})" : string.Empty);
|
||||
|
||||
// ".cms_t" + (char)0x00
|
||||
check = new byte[] { 0x2E, 0x63, 0x6D, 0x73, 0x5F, 0x74, 0x00 };
|
||||
check = new byte?[] { 0x2E, 0x63, 0x6D, 0x73, 0x5F, 0x74, 0x00 };
|
||||
if (fileContent.FirstPosition(check, out position))
|
||||
return "SecuROM 1-3" + (includePosition ? $" (Index {position})" : string.Empty);
|
||||
|
||||
// ".cms_d" + (char)0x00
|
||||
check = new byte[] { 0x2E, 0x63, 0x6D, 0x73, 0x5F, 0x64, 0x00 };
|
||||
check = new byte?[] { 0x2E, 0x63, 0x6D, 0x73, 0x5F, 0x64, 0x00 };
|
||||
if (fileContent.FirstPosition(check, out position))
|
||||
return "SecuROM 1-3" + (includePosition ? $" (Index {position})" : string.Empty);
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace BurnOutSharp.ProtectionType
|
||||
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
|
||||
{
|
||||
// BITARTS
|
||||
byte[] check = new byte[] { 0x42, 0x49, 0x54, 0x41, 0x52, 0x54, 0x53 };
|
||||
byte?[] check = new byte?[] { 0x42, 0x49, 0x54, 0x41, 0x52, 0x54, 0x53 };
|
||||
if (fileContent.FirstPosition(check, out int position))
|
||||
return "SmartE" + (includePosition ? $" (Index {position})" : string.Empty);
|
||||
|
||||
|
||||
@@ -12,12 +12,12 @@ namespace BurnOutSharp.ProtectionType
|
||||
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
|
||||
{
|
||||
// "D" + (char)0x00 + "V" + (char)0x00 + "M" + (char)0x00 + " " + (char)0x00 + "L" + (char)0x00 + "i" + (char)0x00 + "b" + (char)0x00 + "r" + (char)0x00 + "a" + (char)0x00 + "r" + (char)0x00 + "y"
|
||||
byte[] check = new byte[] { 0x44, 0x00, 0x56, 0x00, 0x4D, 0x00, 0x20, 0x00, 0x4C, 0x00, 0x69, 0x00, 0x62, 0x00, 0x72, 0x00, 0x61, 0x00, 0x72, 0x00, 0x79 };
|
||||
byte?[] check = new byte?[] { 0x44, 0x00, 0x56, 0x00, 0x4D, 0x00, 0x20, 0x00, 0x4C, 0x00, 0x69, 0x00, 0x62, 0x00, 0x72, 0x00, 0x61, 0x00, 0x72, 0x00, 0x79 };
|
||||
if (fileContent.FirstPosition(check, out int position))
|
||||
return $"SolidShield {Utilities.GetFileVersion(file)}" + (includePosition ? $" (Index {position})" : string.Empty);
|
||||
|
||||
// "S" + (char)0x00 + "o" + (char)0x00 + "l" + (char)0x00 + "i" + (char)0x00 + "d" + (char)0x00 + "s" + (char)0x00 + "h" + (char)0x00 + "i" + (char)0x00 + "e" + (char)0x00 + "l" + (char)0x00 + "d" + (char)0x00 + " " + (char)0x00 + "L" + (char)0x00 + "i" + (char)0x00 + "b" + (char)0x00 + "r" + (char)0x00 + "a" + (char)0x00 + "r" + (char)0x00 + "y"
|
||||
check = new byte[] { 0x53, 0x00, 0x6F, 0x00, 0x6C, 0x00, 0x69, 0x00, 0x64, 0x00, 0x73, 0x00, 0x68, 0x00, 0x69, 0x00, 0x65, 0x00, 0x6C, 0x00, 0x64, 0x00, 0x20, 0x00, 0x4C, 0x00, 0x69, 0x00, 0x62, 0x00, 0x72, 0x00, 0x61, 0x00, 0x72, 0x00, 0x79 };
|
||||
check = new byte?[] { 0x53, 0x00, 0x6F, 0x00, 0x6C, 0x00, 0x69, 0x00, 0x64, 0x00, 0x73, 0x00, 0x68, 0x00, 0x69, 0x00, 0x65, 0x00, 0x6C, 0x00, 0x64, 0x00, 0x20, 0x00, 0x4C, 0x00, 0x69, 0x00, 0x62, 0x00, 0x72, 0x00, 0x61, 0x00, 0x72, 0x00, 0x79 };
|
||||
if (fileContent.FirstPosition(check, out position))
|
||||
{
|
||||
string companyName = string.Empty;
|
||||
@@ -29,7 +29,7 @@ namespace BurnOutSharp.ProtectionType
|
||||
}
|
||||
|
||||
// "S" + (char)0x00 + "o" + (char)0x00 + "l" + (char)0x00 + "i" + (char)0x00 + "d" + (char)0x00 + "s" + (char)0x00 + "h" + (char)0x00 + "i" + (char)0x00 + "e" + (char)0x00 + "l" + (char)0x00 + "d" + (char)0x00 + " " + (char)0x00 + "A" + (char)0x00 + "c" + (char)0x00 + "t" + (char)0x00 + "i" + (char)0x00 + "v" + (char)0x00 + "a" + (char)0x00 + "t" + (char)0x00 + "i" + (char)0x00 + "o" + (char)0x00 + "n" + (char)0x00 + " " + (char)0x00 + "L" + (char)0x00 + "i" + (char)0x00 + "b" + (char)0x00 + "r" + (char)0x00 + "a" + (char)0x00 + "r" + (char)0x00 + "y"
|
||||
check = new byte[] { 0x53, 0x00, 0x6F, 0x00, 0x6C, 0x00, 0x69, 0x00, 0x64, 0x00, 0x73, 0x00, 0x68, 0x00, 0x69, 0x00, 0x65, 0x00, 0x6C, 0x00, 0x64, 0x00, 0x20, 0x00, 0x41, 0x00, 0x63, 0x00, 0x74, 0x00, 0x69, 0x00, 0x76, 0x00, 0x61, 0x00, 0x74, 0x00, 0x69, 0x00, 0x6F, 0x00, 0x6E, 0x00, 0x20, 0x00, 0x4C, 0x00, 0x69, 0x00, 0x62, 0x00, 0x72, 0x00, 0x61, 0x00, 0x72, 0x00, 0x79 };
|
||||
check = new byte?[] { 0x53, 0x00, 0x6F, 0x00, 0x6C, 0x00, 0x69, 0x00, 0x64, 0x00, 0x73, 0x00, 0x68, 0x00, 0x69, 0x00, 0x65, 0x00, 0x6C, 0x00, 0x64, 0x00, 0x20, 0x00, 0x41, 0x00, 0x63, 0x00, 0x74, 0x00, 0x69, 0x00, 0x76, 0x00, 0x61, 0x00, 0x74, 0x00, 0x69, 0x00, 0x6F, 0x00, 0x6E, 0x00, 0x20, 0x00, 0x4C, 0x00, 0x69, 0x00, 0x62, 0x00, 0x72, 0x00, 0x61, 0x00, 0x72, 0x00, 0x79 };
|
||||
if (fileContent.FirstPosition(check, out position))
|
||||
{
|
||||
string companyName = string.Empty;
|
||||
@@ -41,7 +41,7 @@ namespace BurnOutSharp.ProtectionType
|
||||
}
|
||||
|
||||
// (char)0xEF + (char)0xBE + (char)0xAD + (char)0xDE
|
||||
check = new byte[] { };
|
||||
check = new byte?[] { };
|
||||
if (fileContent.FirstPosition(check, out position))
|
||||
{
|
||||
var id1 = new ArraySegment<byte>(fileContent, position + 5, 3);
|
||||
@@ -54,7 +54,7 @@ namespace BurnOutSharp.ProtectionType
|
||||
}
|
||||
|
||||
// "A" + (char)0x00 + "c" + (char)0x00 + "t" + (char)0x00 + "i" + (char)0x00 + "v" + (char)0x00 + "a" + (char)0x00 + "t" + (char)0x00 + "i" + (char)0x00 + "o" + (char)0x00 + "n" + (char)0x00 + " " + (char)0x00 + "M" + (char)0x00 + "a" + (char)0x00 + "n" + (char)0x00 + "a" + (char)0x00 + "g" + (char)0x00 + "e" + (char)0x00 + "r"
|
||||
check = new byte[] { 0x41, 0x00, 0x63, 0x00, 0x74, 0x00, 0x69, 0x00, 0x76, 0x00, 0x61, 0x00, 0x74, 0x00, 0x69, 0x00, 0x6f, 0x00, 0x6e, 0x00, 0x20, 0x00, 0x4d, 0x00, 0x61, 0x00, 0x6e, 0x00, 0x61, 0x00, 0x67, 0x00, 0x65, 0x00, 0x72 };
|
||||
check = new byte?[] { 0x41, 0x00, 0x63, 0x00, 0x74, 0x00, 0x69, 0x00, 0x76, 0x00, 0x61, 0x00, 0x74, 0x00, 0x69, 0x00, 0x6f, 0x00, 0x6e, 0x00, 0x20, 0x00, 0x4d, 0x00, 0x61, 0x00, 0x6e, 0x00, 0x61, 0x00, 0x67, 0x00, 0x65, 0x00, 0x72 };
|
||||
if (fileContent.FirstPosition(check, out position))
|
||||
{
|
||||
string companyName = string.Empty;
|
||||
@@ -66,12 +66,12 @@ namespace BurnOutSharp.ProtectionType
|
||||
}
|
||||
|
||||
// dvm.dll
|
||||
check = new byte[] { 0x64, 0x76, 0x6D, 0x2E, 0x64, 0x6C, 0x6C };
|
||||
check = new byte?[] { 0x64, 0x76, 0x6D, 0x2E, 0x64, 0x6C, 0x6C };
|
||||
if (fileContent.FirstPosition(check, out position))
|
||||
return $"SolidShield EXE Wrapper" + (includePosition ? $" (Index {position})" : string.Empty);
|
||||
|
||||
// (char)0xAD + (char)0xDE + (char)0xFE + (char)0xCA
|
||||
check = new byte[] { 0xAD, 0xDE, 0xFE, 0xCA };
|
||||
check = new byte?[] { 0xAD, 0xDE, 0xFE, 0xCA };
|
||||
if (fileContent.FirstPosition(check, out position))
|
||||
{
|
||||
var id1 = new ArraySegment<byte>(fileContent, position + 4, 3);
|
||||
@@ -87,7 +87,7 @@ namespace BurnOutSharp.ProtectionType
|
||||
&& id2.SequenceEqual(new byte[] { 0x00, 0x00, 0x00, 0x00 }))
|
||||
{
|
||||
// "T" + (char)0x00 + "a" + (char)0x00 + "g" + (char)0x00 + "e" + (char)0x00 + "s" + (char)0x00 + "S" + (char)0x00 + "e" + (char)0x00 + "t" + (char)0x00 + "u" + (char)0x00 + "p" + (char)0x00 + (char)0x00 + (char)0x00 + (char)0x00 + (char)0x00 + "0" + (char)0x00 + (char)0x8 + (char)0x00 + (char)0x1 + (char)0x0 + "F" + (char)0x00 + "i" + (char)0x00 + "l" + (char)0x00 + "e" + (char)0x00 + "V" + (char)0x00 + "e" + (char)0x00 + "r" + (char)0x00 + "s" + (char)0x00 + "i" + (char)0x00 + "o" + (char)0x00 + "n" + (char)0x00 + (char)0x00 + (char)0x00 + (char)0x00
|
||||
byte[] check2 = new byte[] { 0x54, 0x61, 0x67, 0x65, 0x73, 0x53, 0x65, 0x74, 0x75, 0x70, 0x30, 0x08, 0x01, 0x00, 0x46, 0x69, 0x6C, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6F, 0x6E, 0x00, 0x00, 0x00, 0x00 };
|
||||
byte?[] check2 = new byte?[] { 0x54, 0x61, 0x67, 0x65, 0x73, 0x53, 0x65, 0x74, 0x75, 0x70, 0x30, 0x08, 0x01, 0x00, 0x46, 0x69, 0x6C, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6F, 0x6E, 0x00, 0x00, 0x00, 0x00 };
|
||||
if (fileContent.FirstPosition(check2, out int position2))
|
||||
{
|
||||
position2--; // TODO: Verify this subtract
|
||||
@@ -101,12 +101,12 @@ namespace BurnOutSharp.ProtectionType
|
||||
}
|
||||
|
||||
// "Solidshield"
|
||||
check = new byte[] { 0x53, 0x6F, 0x6C, 0x69, 0x64, 0x73, 0x68, 0x69, 0x65, 0x6C, 0x64 };
|
||||
check = new byte?[] { 0x53, 0x6F, 0x6C, 0x69, 0x64, 0x73, 0x68, 0x69, 0x65, 0x6C, 0x64 };
|
||||
if (fileContent.FirstPosition(check, out position))
|
||||
return $"SolidShield {GetVersion(fileContent, position)}" + (includePosition ? $" (Index {position})" : string.Empty);
|
||||
|
||||
// "B" + (char)0x00 + "I" + (char)0x00 + "N" + (char)0x00 + (char)0x7 + (char)0x00 + "I" + (char)0x00 + "D" + (char)0x00 + "R" + (char)0x00 + "_" + (char)0x00 + "S" + (char)0x00 + "G" + (char)0x00 + "T" + (char)0x0
|
||||
check = new byte[] { 0x42, 0x00, 0x49, 0x00, 0x4E, 0x00, 0x07, 0x00, 0x49, 0x00, 0x44, 0x00, 0x52, 0x00, 0x5F, 0x00, 0x53, 0x00, 0x47, 0x00, 0x54, 0x00 };
|
||||
check = new byte?[] { 0x42, 0x00, 0x49, 0x00, 0x4E, 0x00, 0x07, 0x00, 0x49, 0x00, 0x44, 0x00, 0x52, 0x00, 0x5F, 0x00, 0x53, 0x00, 0x47, 0x00, 0x54, 0x00 };
|
||||
if (fileContent.FirstPosition(check, out position))
|
||||
return "SolidShield" + (includePosition ? $" (Index {position})" : string.Empty);
|
||||
|
||||
|
||||
@@ -11,17 +11,17 @@ namespace BurnOutSharp.ProtectionType
|
||||
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
|
||||
{
|
||||
// "(" + (char)0x00 + "c" + (char)0x00 + ")" + (char)0x00 + " " + (char)0x00 + "P" + (char)0x00 + "r" + (char)0x00 + "o" + (char)0x00 + "t" + (char)0x00 + "e" + (char)0x00 + "c" + (char)0x00 + "t" + (char)0x00 + "i" + (char)0x00 + "o" + (char)0x00 + "n" + (char)0x00 + " " + (char)0x00 + "T" + (char)0x00 + "e" + (char)0x00 + "c" + (char)0x00 + "h" + (char)0x00 + "n" + (char)0x00 + "o" + (char)0x00 + "l" + (char)0x00 + "o" + (char)0x00 + "g" + (char)0x00 + "y" + (char)0x00
|
||||
byte[] check = new byte[] { 0x28, 0x00, 0x63, 0x00, 0x29, 0x00, 0x20, 0x00, 0x50, 0x00, 0x72, 0x00, 0x6F, 0x00, 0x74, 0x00, 0x65, 0x00, 0x63, 0x00, 0x74, 0x00, 0x69, 0x00, 0x6F, 0x00, 0x6E, 0x00, 0x20, 0x00, 0x54, 0x00, 0x65, 0x00, 0x63, 0x00, 0x68, 0x00, 0x6E, 0x00, 0x6F, 0x00, 0x6C, 0x00, 0x6F, 0x00, 0x67, 0x00, 0x79, 0x00 };
|
||||
byte?[] check = new byte?[] { 0x28, 0x00, 0x63, 0x00, 0x29, 0x00, 0x20, 0x00, 0x50, 0x00, 0x72, 0x00, 0x6F, 0x00, 0x74, 0x00, 0x65, 0x00, 0x63, 0x00, 0x74, 0x00, 0x69, 0x00, 0x6F, 0x00, 0x6E, 0x00, 0x20, 0x00, 0x54, 0x00, 0x65, 0x00, 0x63, 0x00, 0x68, 0x00, 0x6E, 0x00, 0x6F, 0x00, 0x6C, 0x00, 0x6F, 0x00, 0x67, 0x00, 0x79, 0x00 };
|
||||
if (fileContent.FirstPosition(check, out int position))
|
||||
{
|
||||
// "PSA_GetDiscLabel"
|
||||
// byte[] check2 = new byte[] { 0x50, 0x53, 0x41, 0x5F, 0x47, 0x65, 0x74, 0x44, 0x69, 0x73, 0x63, 0x4C, 0x61, 0x62, 0x65, 0x6C };
|
||||
// byte?[] check2 = new byte?[] { 0x50, 0x53, 0x41, 0x5F, 0x47, 0x65, 0x74, 0x44, 0x69, 0x73, 0x63, 0x4C, 0x61, 0x62, 0x65, 0x6C };
|
||||
|
||||
// "(c) Protection Technology"
|
||||
// byte[] check2 = new byte[] { 0x28, 0x63, 0x29, 0x20, 0x50, 0x72, 0x6F, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6F, 0x6E, 0x20, 0x54, 0x65, 0x63, 0x68, 0x6E, 0x6F, 0x6C, 0x6F, 0x67, 0x79 };
|
||||
// byte?[] check2 = new byte?[] { 0x28, 0x63, 0x29, 0x20, 0x50, 0x72, 0x6F, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6F, 0x6E, 0x20, 0x54, 0x65, 0x63, 0x68, 0x6E, 0x6F, 0x6C, 0x6F, 0x67, 0x79 };
|
||||
|
||||
// "TradeName"
|
||||
byte[] check2 = new byte[] { 0x54, 0x72, 0x61, 0x64, 0x65, 0x4E, 0x61, 0x6D, 0x65 };
|
||||
byte?[] check2 = new byte?[] { 0x54, 0x72, 0x61, 0x64, 0x65, 0x4E, 0x61, 0x6D, 0x65 };
|
||||
if (fileContent.FirstPosition(check2, out int position2) && position2 != 0)
|
||||
return $"StarForce {Utilities.GetFileVersion(file)} ({fileContent.Skip(position2 + 22).TakeWhile(c => c != 0x00)})" + (includePosition ? $" (Index {position}, {position2})" : string.Empty);
|
||||
else
|
||||
@@ -29,17 +29,17 @@ namespace BurnOutSharp.ProtectionType
|
||||
}
|
||||
|
||||
// "Protection Technology, Ltd."
|
||||
check = new byte[] { 0x50, 0x72, 0x6F, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6F, 0x6E, 0x20, 0x54, 0x65, 0x63, 0x68, 0x6E, 0x6F, 0x6C, 0x6F, 0x67, 0x79, 0x2C, 0x20, 0x4C, 0x74, 0x64, 0x2E };
|
||||
check = new byte?[] { 0x50, 0x72, 0x6F, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6F, 0x6E, 0x20, 0x54, 0x65, 0x63, 0x68, 0x6E, 0x6F, 0x6C, 0x6F, 0x67, 0x79, 0x2C, 0x20, 0x4C, 0x74, 0x64, 0x2E };
|
||||
if (fileContent.FirstPosition(check, out position))
|
||||
{
|
||||
// "PSA_GetDiscLabel"
|
||||
// byte[] check2 = new byte[] { 0x50, 0x53, 0x41, 0x5F, 0x47, 0x65, 0x74, 0x44, 0x69, 0x73, 0x63, 0x4C, 0x61, 0x62, 0x65, 0x6C };
|
||||
// byte?[] check2 = new byte?[] { 0x50, 0x53, 0x41, 0x5F, 0x47, 0x65, 0x74, 0x44, 0x69, 0x73, 0x63, 0x4C, 0x61, 0x62, 0x65, 0x6C };
|
||||
|
||||
// "(c) Protection Technology"
|
||||
// byte[] check2 = new byte[] { 0x28, 0x63, 0x29, 0x20, 0x50, 0x72, 0x6F, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6F, 0x6E, 0x20, 0x54, 0x65, 0x63, 0x68, 0x6E, 0x6F, 0x6C, 0x6F, 0x67, 0x79 };
|
||||
// byte?[] check2 = new byte?[] { 0x28, 0x63, 0x29, 0x20, 0x50, 0x72, 0x6F, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6F, 0x6E, 0x20, 0x54, 0x65, 0x63, 0x68, 0x6E, 0x6F, 0x6C, 0x6F, 0x67, 0x79 };
|
||||
|
||||
// "TradeName"
|
||||
byte[] check2 = new byte[] { 0x54, 0x72, 0x61, 0x64, 0x65, 0x4E, 0x61, 0x6D, 0x65 };
|
||||
byte?[] check2 = new byte?[] { 0x54, 0x72, 0x61, 0x64, 0x65, 0x4E, 0x61, 0x6D, 0x65 };
|
||||
if (fileContent.FirstPosition(check2, out int position2) && position2 != 0)
|
||||
return $"StarForce {Utilities.GetFileVersion(file)} ({fileContent.Skip(position2 + 22).TakeWhile(c => c != 0x00)})" + (includePosition ? $" (Index {position}, {position2})" : string.Empty);
|
||||
else
|
||||
@@ -47,17 +47,17 @@ namespace BurnOutSharp.ProtectionType
|
||||
}
|
||||
|
||||
// ".sforce"
|
||||
check = new byte[] { 0x2E, 0x73, 0x66, 0x6F, 0x72, 0x63, 0x65 };
|
||||
check = new byte?[] { 0x2E, 0x73, 0x66, 0x6F, 0x72, 0x63, 0x65 };
|
||||
if (fileContent.FirstPosition(check, out position))
|
||||
return "StarForce 3-5" + (includePosition ? $" (Index {position})" : string.Empty);
|
||||
|
||||
// ".brick"
|
||||
check = new byte[] { 0x2E, 0x62, 0x72, 0x69, 0x63, 0x6B };
|
||||
check = new byte?[] { 0x2E, 0x62, 0x72, 0x69, 0x63, 0x6B };
|
||||
if (fileContent.FirstPosition(check, out position))
|
||||
return "StarForce 3-5" + (includePosition ? $" (Index {position})" : string.Empty);
|
||||
|
||||
// "P" + (char)0x00 + "r" + (char)0x00 + "o" + (char)0x00 + "t" + (char)0x00 + "e" + (char)0x00 + "c" + (char)0x00 + "t" + (char)0x00 + "e" + (char)0x00 + "d" + (char)0x00 + " " + (char)0x00 + "M" + (char)0x00 + "o" + (char)0x00 + "d" + (char)0x00 + "u" + (char)0x00 + "l" + (char)0x00 + "e"
|
||||
check = new byte[] { 0x50, 0x00, 0x72, 0x00, 0x6f, 0x00, 0x74, 0x00, 0x65, 0x00, 0x63, 0x00, 0x74, 0x00, 0x65, 0x00, 0x64, 0x00, 0x20, 0x00, 0x4d, 0x00, 0x6f, 0x00, 0x64, 0x00, 0x75, 0x00, 0x6c, 0x00, 0x65 };
|
||||
check = new byte?[] { 0x50, 0x00, 0x72, 0x00, 0x6f, 0x00, 0x74, 0x00, 0x65, 0x00, 0x63, 0x00, 0x74, 0x00, 0x65, 0x00, 0x64, 0x00, 0x20, 0x00, 0x4d, 0x00, 0x6f, 0x00, 0x64, 0x00, 0x75, 0x00, 0x6c, 0x00, 0x65 };
|
||||
if (fileContent.FirstPosition(check, out position))
|
||||
return "StarForce 5" + (includePosition ? $" (Index {position})" : string.Empty);
|
||||
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
|
||||
{
|
||||
// "V SUHPISYSDVD"
|
||||
byte[] check = new byte[] { 0x56, 0x20, 0x53, 0x55, 0x48, 0x50, 0x49, 0x53, 0x59, 0x53, 0x44, 0x56, 0x44 };
|
||||
byte?[] check = new byte?[] { 0x56, 0x20, 0x53, 0x55, 0x48, 0x50, 0x49, 0x53, 0x59, 0x53, 0x44, 0x56, 0x44 };
|
||||
if (fileContent.FirstPosition(check, out int position))
|
||||
return $"Sysiphus DVD {GetVersion(fileContent, position)}" + (includePosition ? $" (Index {position})" : string.Empty);
|
||||
|
||||
// "V SUHPISYS"
|
||||
check = new byte[] { 0x56, 0x20, 0x53, 0x55, 0x48, 0x50, 0x49, 0x53, 0x59, 0x53 };
|
||||
check = new byte?[] { 0x56, 0x20, 0x53, 0x55, 0x48, 0x50, 0x49, 0x53, 0x59, 0x53 };
|
||||
if (fileContent.FirstPosition(check, out position))
|
||||
return $"Sysiphus {GetVersion(fileContent, position)}" + (includePosition ? $" (Index {position})" : string.Empty);
|
||||
|
||||
|
||||
@@ -11,17 +11,17 @@ namespace BurnOutSharp.ProtectionType
|
||||
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
|
||||
{
|
||||
// "protected-tages-runtime.exe"
|
||||
byte[] check = new byte[] { 0x70, 0x72, 0x6F, 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, 0x2D, 0x74, 0x61, 0x67, 0x65, 0x73, 0x2D, 0x72, 0x75, 0x6E, 0x74, 0x69, 0x6D, 0x65, 0x2E, 0x65, 0x78, 0x65 };
|
||||
byte?[] check = new byte?[] { 0x70, 0x72, 0x6F, 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, 0x2D, 0x74, 0x61, 0x67, 0x65, 0x73, 0x2D, 0x72, 0x75, 0x6E, 0x74, 0x69, 0x6D, 0x65, 0x2E, 0x65, 0x78, 0x65 };
|
||||
if (fileContent.FirstPosition(check, out int position))
|
||||
return $"TAGES {Utilities.GetFileVersion(file)}" + (includePosition ? $" (Index {position})" : string.Empty);
|
||||
|
||||
// "tagesprotection.com"
|
||||
check = new byte[] { 0x74, 0x61, 0x67, 0x65, 0x73, 0x70, 0x72, 0x6F, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6F, 0x6E, 0x2E, 0x63, 0x6F, 0x6D };
|
||||
check = new byte?[] { 0x74, 0x61, 0x67, 0x65, 0x73, 0x70, 0x72, 0x6F, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6F, 0x6E, 0x2E, 0x63, 0x6F, 0x6D };
|
||||
if (fileContent.FirstPosition(check, out position))
|
||||
return $"TAGES {Utilities.GetFileVersion(file)}" + (includePosition ? $" (Index {position})" : string.Empty);
|
||||
|
||||
// (char)0xE8 + "u" + (char)0x00 + (char)0x00 + (char)0x00 + (char)0xE8
|
||||
check = new byte[] { 0xE8, 0x75, 0x00, 0x00, 0x00, 0xE8 };
|
||||
check = new byte?[] { 0xE8, 0x75, 0x00, 0x00, 0x00, 0xE8 };
|
||||
if (fileContent.FirstPosition(check, out position))
|
||||
{
|
||||
// (char)0xFF + (char)0xFF + "h"
|
||||
|
||||
@@ -6,18 +6,18 @@
|
||||
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
|
||||
{
|
||||
// .ldr
|
||||
byte[] check = new byte[] { 0x2E, 0x6C, 0x64, 0x72 };
|
||||
byte?[] check = new byte?[] { 0x2E, 0x6C, 0x64, 0x72 };
|
||||
if (fileContent.FirstPosition(check, out int position))
|
||||
{
|
||||
// .ldt
|
||||
byte[] check2 = new byte[] { 0x2E, 0x6C, 0x64, 0x74 };
|
||||
byte?[] check2 = new byte?[] { 0x2E, 0x6C, 0x64, 0x74 };
|
||||
if (fileContent.FirstPosition(check2, out int position2))
|
||||
return "3PLock" + (includePosition ? $" (Index {position}, {position2})" : string.Empty);
|
||||
}
|
||||
|
||||
// This produced false positives in some DirectX 9.0c installer files
|
||||
// "Y" + (char)0xC3 + "U" + (char)0x8B + (char)0xEC + (char)0x83 + (char)0xEC + "0SVW"
|
||||
//check = new byte[] { 0x59, 0xC3, 0x55, 0x8B, 0xEC, 0x83, 0xEC, 0x30, 0x53, 0x56, 0x57 };
|
||||
//check = new byte?[] { 0x59, 0xC3, 0x55, 0x8B, 0xEC, 0x83, 0xEC, 0x30, 0x53, 0x56, 0x57 };
|
||||
//if (fileContent.Contains(check, out position))
|
||||
// return "3PLock" + (includePosition ? $" (Index {position})" : string.Empty);
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
|
||||
{
|
||||
// 3 + (char)0x00 + 1 + 2 + (char)0x00 + 1 + (char)0x00 + S + (char)0x00 + t + (char)0x00 + u + (char)0x00 + d + (char)0x00 + i + (char)0x00 + o + (char)0x00 + s + (char)0x00 + + (char)0x00 + A + (char)0x00 + c + (char)0x00 + t + (char)0x00 + i + (char)0x00 + v + (char)0x00 + a + (char)0x00 + t + (char)0x00 + i + (char)0x00 + o + (char)0x00 + n + (char)0x00
|
||||
byte[] check = new byte[] { 0x33, 0x00, 0x32, 0x00, 0x31, 0x00, 0x53, 0x00, 0x74, 0x00, 0x75, 0x00, 0x64, 0x00, 0x69, 0x00, 0x6F, 0x00, 0x73, 0x00, 0x20, 0x00, 0x41, 0x00, 0x63, 0x00, 0x74, 0x00, 0x69, 0x00, 0x76, 0x00, 0x61, 0x00, 0x74, 0x00, 0x69, 0x00, 0x6F, 0x00, 0x6E, 0x00 };
|
||||
byte?[] check = new byte?[] { 0x33, 0x00, 0x32, 0x00, 0x31, 0x00, 0x53, 0x00, 0x74, 0x00, 0x75, 0x00, 0x64, 0x00, 0x69, 0x00, 0x6F, 0x00, 0x73, 0x00, 0x20, 0x00, 0x41, 0x00, 0x63, 0x00, 0x74, 0x00, 0x69, 0x00, 0x76, 0x00, 0x61, 0x00, 0x74, 0x00, 0x69, 0x00, 0x6F, 0x00, 0x6E, 0x00 };
|
||||
if (fileContent.FirstPosition(check, out int position))
|
||||
return "321Studios Online Activation" + (includePosition ? $" (Index {position})" : string.Empty);
|
||||
|
||||
|
||||
@@ -13,12 +13,12 @@ namespace BurnOutSharp.ProtectionType
|
||||
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
|
||||
{
|
||||
// "VOB ProtectCD"
|
||||
byte[] check = new byte[] { 0x56, 0x4F, 0x42, 0x20, 0x50, 0x72, 0x6F, 0x74, 0x65, 0x63, 0x74, 0x43, 0x44 };
|
||||
byte?[] check = new byte?[] { 0x56, 0x4F, 0x42, 0x20, 0x50, 0x72, 0x6F, 0x74, 0x65, 0x63, 0x74, 0x43, 0x44 };
|
||||
if (fileContent.FirstPosition(check, out int position))
|
||||
return $"VOB ProtectCD/DVD {GetOldVersion(fileContent, --position)}" + (includePosition ? $" (Index {position})" : string.Empty); // TODO: Verify this subtract
|
||||
|
||||
// "DCP-BOV" + (char)0x00 + (char)0x00
|
||||
check = new byte[] { 0x44, 0x43, 0x50, 0x2D, 0x42, 0x4F, 0x56, 0x00, 0x00 };
|
||||
check = new byte?[] { 0x44, 0x43, 0x50, 0x2D, 0x42, 0x4F, 0x56, 0x00, 0x00 };
|
||||
if (fileContent.FirstPosition(check, out position))
|
||||
{
|
||||
string version = GetVersion(fileContent, --position); // TODO: Verify this subtract
|
||||
@@ -38,7 +38,7 @@ namespace BurnOutSharp.ProtectionType
|
||||
}
|
||||
|
||||
// ".vob.pcd"
|
||||
check = new byte[] { 0x2E, 0x76, 0x6F, 0x62, 0x2E, 0x70, 0x63, 0x64 };
|
||||
check = new byte?[] { 0x2E, 0x76, 0x6F, 0x62, 0x2E, 0x70, 0x63, 0x64 };
|
||||
if (fileContent.FirstPosition(check, out position))
|
||||
return "VOB ProtectCD" + (includePosition ? $" (Index {position})" : string.Empty);
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace BurnOutSharp.ProtectionType
|
||||
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
|
||||
{
|
||||
// "WTM76545"
|
||||
byte[] check = new byte[] { 0x57, 0x54, 0x4D, 0x37, 0x36, 0x35, 0x34, 0x35 };
|
||||
byte?[] check = new byte?[] { 0x57, 0x54, 0x4D, 0x37, 0x36, 0x35, 0x34, 0x35 };
|
||||
if (fileContent.FirstPosition(check, out int position))
|
||||
return "WTM CD Protect" + (includePosition ? $" (Index {position})" : string.Empty);
|
||||
|
||||
|
||||
@@ -12,17 +12,17 @@ namespace BurnOutSharp.ProtectionType
|
||||
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
|
||||
{
|
||||
// XCP.DAT
|
||||
byte[] check = new byte[] { 0x58, 0x43, 0x50, 0x2E, 0x44, 0x41, 0x54 };
|
||||
byte?[] check = new byte?[] { 0x58, 0x43, 0x50, 0x2E, 0x44, 0x41, 0x54 };
|
||||
if (fileContent.FirstPosition(check, out int position))
|
||||
return "XCP" + (includePosition ? $" (Index {position})" : string.Empty);
|
||||
|
||||
// XCPPlugins.dll
|
||||
check = new byte[] { 0x58, 0x43, 0x50, 0x50, 0x6C, 0x75, 0x67, 0x69, 0x6E, 0x73, 0x2E, 0x64, 0x6C, 0x6C };
|
||||
check = new byte?[] { 0x58, 0x43, 0x50, 0x50, 0x6C, 0x75, 0x67, 0x69, 0x6E, 0x73, 0x2E, 0x64, 0x6C, 0x6C };
|
||||
if (fileContent.FirstPosition(check, out position))
|
||||
return "XCP" + (includePosition ? $" (Index {position})" : string.Empty);
|
||||
|
||||
// XCPPhoenix.dll
|
||||
check = new byte[] { 0x58, 0x43, 0x50, 0x50, 0x68, 0x6F, 0x65, 0x6E, 0x69, 0x78, 0x2E, 0x64, 0x6C, 0x6C };
|
||||
check = new byte?[] { 0x58, 0x43, 0x50, 0x50, 0x68, 0x6F, 0x65, 0x6E, 0x69, 0x78, 0x2E, 0x64, 0x6C, 0x6C };
|
||||
if (fileContent.FirstPosition(check, out position))
|
||||
return "XCP" + (includePosition ? $" (Index {position})" : string.Empty);
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
|
||||
{
|
||||
// "XPROT "
|
||||
byte[] check = new byte[] { 0x58, 0x50, 0x52, 0x4F, 0x54, 0x20, 0x20, 0x20 };
|
||||
byte?[] check = new byte?[] { 0x58, 0x50, 0x52, 0x4F, 0x54, 0x20, 0x20, 0x20 };
|
||||
if (fileContent.FirstPosition(check, out int position))
|
||||
return "Xtreme-Protector" + (includePosition ? $" (Index {position})" : string.Empty);
|
||||
|
||||
|
||||
@@ -159,7 +159,7 @@ namespace BurnOutSharp
|
||||
/// <summary>
|
||||
/// Find the first position of one array in another, if possible
|
||||
/// </summary>
|
||||
public static bool FirstPosition(this byte[] stack, byte[] needle, out int position, int start = 0, int end = -1)
|
||||
public static bool FirstPosition(this byte[] stack, byte?[] needle, out int position, int start = 0, int end = -1)
|
||||
{
|
||||
(bool found, int foundPosition) = FindPosition(stack, needle, start, end, false);
|
||||
position = foundPosition;
|
||||
@@ -169,7 +169,7 @@ namespace BurnOutSharp
|
||||
/// <summary>
|
||||
/// Find the last position of one array in another, if possible
|
||||
/// </summary>
|
||||
public static bool LastPosition(this byte[] stack, byte[] needle, out int position, int start = 0, int end = -1)
|
||||
public static bool LastPosition(this byte[] stack, byte?[] needle, out int position, int start = 0, int end = -1)
|
||||
{
|
||||
(bool found, int foundPosition) = FindPosition(stack, needle, start, end, true);
|
||||
position = foundPosition;
|
||||
@@ -179,7 +179,7 @@ namespace BurnOutSharp
|
||||
/// <summary>
|
||||
/// See if a byte array starts with another
|
||||
/// </summary>
|
||||
public static bool StartsWith(this byte[] stack, byte[] needle)
|
||||
public static bool StartsWith(this byte[] stack, byte?[] needle)
|
||||
{
|
||||
return stack.FirstPosition(needle, out int _, start: 0, end: 1);
|
||||
}
|
||||
@@ -187,15 +187,15 @@ namespace BurnOutSharp
|
||||
/// <summary>
|
||||
/// See if a byte array ends with another
|
||||
/// </summary>
|
||||
public static bool EndsWith(this byte[] stack, byte[] needle)
|
||||
public static bool EndsWith(this byte[] stack, byte?[] needle)
|
||||
{
|
||||
return stack.FirstPosition(needle, out int _, start: stack.Length - needle.Length);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Find the position of one array in another, if possible
|
||||
/// </summary>
|
||||
private static (bool, int) FindPosition(byte[] stack, byte[] needle, int start, int end, bool reverse)
|
||||
private static (bool, int) FindPosition(byte[] stack, byte?[] needle, int start, int end, bool reverse)
|
||||
{
|
||||
// If either array is null or empty, we can't do anything
|
||||
if (stack == null || stack.Length == 0 || needle == null || needle.Length == 0)
|
||||
@@ -223,7 +223,7 @@ namespace BurnOutSharp
|
||||
/// <summary>
|
||||
/// Get if a stack at a certain index is equal to a needle
|
||||
/// </summary>
|
||||
private static bool EqualAt(this byte[] stack, byte[] needle, int index)
|
||||
private static bool EqualAt(this byte[] stack, byte?[] needle, int index)
|
||||
{
|
||||
// If we're too close to the end of the stack, return false
|
||||
if (needle.Length >= stack.Length - index)
|
||||
@@ -231,7 +231,10 @@ namespace BurnOutSharp
|
||||
|
||||
for (int i = 0; i < needle.Length; i++)
|
||||
{
|
||||
if (stack[i + index] != needle[i])
|
||||
// A null value is a wildcard
|
||||
if (needle[i] == null)
|
||||
continue;
|
||||
else if (stack[i + index] != needle[i])
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -240,6 +243,8 @@ namespace BurnOutSharp
|
||||
|
||||
#endregion
|
||||
|
||||
#region Version Finding
|
||||
|
||||
/// <summary>
|
||||
/// Get the file version as reported by the filesystem
|
||||
/// </summary>
|
||||
@@ -264,12 +269,12 @@ namespace BurnOutSharp
|
||||
public static string GetManifestVersion(byte[] fileContent)
|
||||
{
|
||||
// <?xml
|
||||
byte[] manifestStart = new byte[] { 0x3C, 0x3F, 0x78, 0x6D, 0x6C };
|
||||
byte?[] manifestStart = new byte?[] { 0x3C, 0x3F, 0x78, 0x6D, 0x6C };
|
||||
if (!fileContent.LastPosition(manifestStart, out int manifestStartPosition))
|
||||
return null;
|
||||
|
||||
// </assembly>
|
||||
byte[] manifestEnd = new byte[] { 0x3C, 0x2F, 0x61, 0x73, 0x73, 0x65, 0x6D, 0x62, 0x6C, 0x79, 0x3E };
|
||||
byte?[] manifestEnd = new byte?[] { 0x3C, 0x2F, 0x61, 0x73, 0x73, 0x65, 0x6D, 0x62, 0x6C, 0x79, 0x3E };
|
||||
if (!fileContent.FirstPosition(manifestEnd, out int manifestEndPosition, start: manifestStartPosition))
|
||||
return null;
|
||||
|
||||
@@ -306,5 +311,7 @@ namespace BurnOutSharp
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user