This commit is contained in:
Matt Nadareski
2025-09-21 14:27:35 -04:00
parent 778064b3a5
commit 03016f3399
5 changed files with 12 additions and 5 deletions

View File

@@ -15,7 +15,9 @@ namespace BinaryObjectScanner.FileType
{
try
{
byte[] magic = stream.ReadBytes(16);
int bytesToRead = (int)Math.Min(16, stream.Length);
byte[] magic = stream.ReadBytes(bytesToRead);
if (magic.StartsWith(new byte?[] { 0x4C, 0x44, 0x53, 0x43, 0x52, 0x59, 0x50, 0x54 }))
return "Link Data Security encrypted file";
}

View File

@@ -17,7 +17,8 @@ namespace BinaryObjectScanner.FileType
{
try
{
byte[] magic = stream.ReadBytes(16);
int bytesToRead = (int)Math.Min(16, stream.Length);
byte[] magic = stream.ReadBytes(bytesToRead);
// RASGI2.0
// Found in the ".rgs" files in IA item "Nova_RealArcadeCD_USA".

View File

@@ -17,7 +17,8 @@ namespace BinaryObjectScanner.FileType
{
try
{
byte[] magic = stream.ReadBytes(16);
int bytesToRead = (int)Math.Min(16, stream.Length);
byte[] magic = stream.ReadBytes(bytesToRead);
// XZip2.0
// Found in the ".mez" files in IA item "Nova_RealArcadeCD_USA".

View File

@@ -17,7 +17,9 @@ namespace BinaryObjectScanner.FileType
{
try
{
byte[] magic = stream.ReadBytes(16);
int bytesToRead = (int)Math.Min(16, stream.Length);
byte[] magic = stream.ReadBytes(bytesToRead);
if (magic.StartsWith(new byte?[] { 0x53, 0x46, 0x46, 0x53 }))
return "StarForce Filesystem Container";
}

View File

@@ -290,7 +290,8 @@ namespace BinaryObjectScanner
byte[] magic;
try
{
magic = stream.ReadBytes(16);
int bytesToRead = (int)Math.Min(16, stream.Length);
magic = stream.ReadBytes(bytesToRead);
stream.Seek(0, SeekOrigin.Begin);
}
catch (Exception ex)