Update packages

This commit is contained in:
Matt Nadareski
2024-12-01 23:07:52 -05:00
parent eeeac97553
commit 4eff18bf3a
9 changed files with 36 additions and 30 deletions

View File

@@ -85,10 +85,10 @@
<ItemGroup>
<PackageReference Include="SabreTools.Compression" Version="0.6.1" />
<PackageReference Include="SabreTools.Hashing" Version="1.4.0" />
<PackageReference Include="SabreTools.IO" Version="1.5.1" />
<PackageReference Include="SabreTools.Matching" Version="1.4.1" />
<PackageReference Include="SabreTools.Models" Version="1.5.3" />
<PackageReference Include="SabreTools.Serialization" Version="1.7.6" />
<PackageReference Include="SabreTools.IO" Version="1.6.1" />
<PackageReference Include="SabreTools.Matching" Version="1.5.0" />
<PackageReference Include="SabreTools.Models" Version="1.5.5" />
<PackageReference Include="SabreTools.Serialization" Version="1.8.0" />
<PackageReference Include="UnshieldSharp" Version="1.9.1" />
<PackageReference Include="WiseUnpacker" Version="1.5.1" />
</ItemGroup>

View File

@@ -210,11 +210,11 @@ namespace BinaryObjectScanner.Protection
// Found in Redump entry 84517.
new(new FilePathMatch("CDCOPS.DLL"), "CD-Cops"),
new(new PathMatch(".W_X", matchExact: true, useEndsWith: true), "CD/DVD-Cops"),
new(new PathMatch(".QZ_", matchExact: true, useEndsWith: true), "CD/DVD-Cops"),
new(new PathMatch(".W_X", matchCase: true, useEndsWith: true), "CD/DVD-Cops"),
new(new PathMatch(".QZ_", matchCase: true, useEndsWith: true), "CD/DVD-Cops"),
new(new PathMatch(".GZ_", matchExact: true, useEndsWith: true), "CD-Cops (Unconfirmed - Please report to us on Github)"),
new(new PathMatch(".Qz", matchExact: true, useEndsWith: true), "CD-Cops (Unconfirmed - Please report to us on Github)"),
new(new PathMatch(".GZ_", matchCase: true, useEndsWith: true), "CD-Cops (Unconfirmed - Please report to us on Github)"),
new(new PathMatch(".Qz", matchCase: true, useEndsWith: true), "CD-Cops (Unconfirmed - Please report to us on Github)"),
};
return MatchUtil.GetAllMatches(files, matchers, any: true);
@@ -230,11 +230,11 @@ namespace BinaryObjectScanner.Protection
// Found in Redump entry 84517.
new(new FilePathMatch("CDCOPS.DLL"), "CD-Cops"),
new(new PathMatch(".W_X", matchExact: true, useEndsWith: true), "CD/DVD-Cops"),
new(new PathMatch(".QZ_", matchExact: true, useEndsWith: true), "CD/DVD-Cops"),
new(new PathMatch(".W_X", matchCase: true, useEndsWith: true), "CD/DVD-Cops"),
new(new PathMatch(".QZ_", matchCase: true, useEndsWith: true), "CD/DVD-Cops"),
new(new PathMatch(".GZ_", matchExact: true, useEndsWith: true), "CD-Cops (Unconfirmed - Please report to us on Github)"),
new(new PathMatch(".Qz", matchExact: true, useEndsWith: true), "CD-Cops (Unconfirmed - Please report to us on Github)"),
new(new PathMatch(".GZ_", matchCase: true, useEndsWith: true), "CD-Cops (Unconfirmed - Please report to us on Github)"),
new(new PathMatch(".Qz", matchCase: true, useEndsWith: true), "CD-Cops (Unconfirmed - Please report to us on Github)"),
};
return MatchUtil.GetFirstMatch(path, matchers, any: true);

View File

@@ -19,10 +19,10 @@ namespace BinaryObjectScanner.Protection
var contentMatchSets = new List<ContentMatchSet>
{
// CDSPlayer
new([0x43, 0x44, 0x53, 0x50, 0x6C, 0x61, 0x79, 0x65, 0x72], "Cactus Data Shield 200"),
new(new byte[] { 0x43, 0x44, 0x53, 0x50, 0x6C, 0x61, 0x79, 0x65, 0x72 }, "Cactus Data Shield 200"),
// yucca.cds
new([0x79, 0x75, 0x63, 0x63, 0x61, 0x2E, 0x63, 0x64, 0x73], "Cactus Data Shield 200"),
new(new byte[] { 0x79, 0x75, 0x63, 0x63, 0x61, 0x2E, 0x63, 0x64, 0x73 }, "Cactus Data Shield 200"),
};
return MatchUtil.GetFirstMatch(file, fileContent, contentMatchSets, includeDebug);

View File

@@ -141,7 +141,7 @@ namespace BinaryObjectScanner.Protection
// Checks for whatever this data is.
// Samples: Redump ID 84759, Redump ID 107929. Professional discs also have this data, hence the exclusion check.
new(
[
new byte[] {
0x02, 0xFE, 0x4A, 0x4F, 0x52, 0x4B, 0x1C, 0xE0,
0x79, 0x8C, 0x7F, 0x85, 0x04, 0x00, 0x46, 0x46,
0x49, 0x46, 0x07, 0xF9, 0x9F, 0xA0, 0xA1, 0x9D,
@@ -150,7 +150,7 @@ namespace BinaryObjectScanner.Protection
0x65, 0x5F, 0xFB, 0x06, 0x31, 0x31, 0x31, 0x31,
0x00, 0x00, 0x1D, 0x1D, 0x1F, 0x1D, 0xFE, 0xFD,
0x51, 0x57, 0x56, 0x51, 0xFB, 0x06, 0x33, 0x34,
], "copy-X [Check disc for physical ring]"),
}, "copy-X [Check disc for physical ring]"),
};
var match = MatchUtil.GetFirstMatch(lightFiles[0], block, matchers, false);

View File

@@ -86,10 +86,10 @@ namespace BinaryObjectScanner.Protection
{
// Denuvo Timing
new(
[
new byte[] {
0x44, 0x65, 0x6E, 0x75, 0x76, 0x6F, 0x20, 0x54,
0x69, 0x6D, 0x69, 0x6E, 0x67,
], "Denuvo")
}, "Denuvo")
};
var timingMatch = MatchUtil.GetFirstMatch(file, pex.EntryPointData, timingMatchers, includeDebug);

View File

@@ -68,7 +68,8 @@ namespace BinaryObjectScanner.Protection
int position = -1;
// Check the executable tables
bool containsCheck = pex.StubExecutableData?.FirstPosition(check, out position) ?? false;
position = pex.StubExecutableData?.FirstPosition(check) ?? -1;
bool containsCheck = position > -1;
bool containsCheck2 = Array.Exists(pex.Model.ImportTable?.HintNameTable ?? [], hnte => hnte?.Name == "GetModuleHandleA")
&& Array.Exists(pex.Model.ImportTable?.HintNameTable ?? [], hnte => hnte?.Name == "GetProcAddress")
&& Array.Exists(pex.Model.ImportTable?.HintNameTable ?? [], hnte => hnte?.Name == "LoadLibraryA")
@@ -92,7 +93,9 @@ namespace BinaryObjectScanner.Protection
0x45, 0x4C, 0x33, 0x32, 0x2E, 0x64, 0x6C, 0x6C,
0x00, 0xEB, 0x79, 0x01, null, null, null, null,
];
containsCheck2 = pex.GetFirstSectionData(".text")?.FirstPosition(check2, out position2) ?? false;
position2 = pex.GetFirstSectionData(".text")?.FirstPosition(check2) ?? -1;
containsCheck2 = position2 > -1;
}
else
{
@@ -163,7 +166,8 @@ namespace BinaryObjectScanner.Protection
0x55, 0x6E, 0x6B, 0x6F, 0x77, 0x6E, 0x00, 0x55,
0x6E, 0x6B, 0x6F, 0x77, 0x6E
];
if (!sectionContent.FirstPosition(check, out int position))
int position = sectionContent.FirstPosition(check);
if (position == -1)
return "(Build unknown)";
int index = versionTwo ? position + 14 : position + 13;

View File

@@ -200,7 +200,9 @@ namespace BinaryObjectScanner.Protection
0x6C, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6F,
0x6E, 0x00, 0x00, 0x00, 0x00
];
if (fileContent.FirstPosition(check2, out int position2))
int position2 = fileContent.FirstPosition(check2);
if (position2 > -1)
{
position2--; // TODO: Verify this subtract
return $"2 + Tagès {fileContent[position2 + 0x38]}.{fileContent[position2 + 0x38 + 4]}.{fileContent[position2 + 0x38 + 8]}.{fileContent[position + 0x38 + 12]}";

View File

@@ -48,17 +48,17 @@ namespace BinaryObjectScanner.Protection
// (.sis/.sim/.sid) - Redump entry 12943
new(
[
new PathMatch(".sis", matchExact: false, useEndsWith: true),
new PathMatch(".sim", matchExact: false, useEndsWith: true),
new PathMatch(".sid", matchExact: false, useEndsWith: true),
new PathMatch(".sis", matchCase: false, useEndsWith: true),
new PathMatch(".sim", matchCase: false, useEndsWith: true),
new PathMatch(".sid", matchCase: false, useEndsWith: true),
], "Steam (.sis/.sim/.sid)"),
// (.sis/.csm/.csd) - Redump entry 101916
new(
[
new PathMatch(".sis", matchExact: false, useEndsWith: true),
new PathMatch(".csm", matchExact: false, useEndsWith: true),
new PathMatch(".csd", matchExact: false, useEndsWith: true),
new PathMatch(".sis", matchCase: false, useEndsWith: true),
new PathMatch(".csm", matchCase: false, useEndsWith: true),
new PathMatch(".csd", matchCase: false, useEndsWith: true),
], "Steam (.sis/.csm/.csd)"),
// These checks are grouped together due to the names being generic on their own (Redump entry 91450).

View File

@@ -36,8 +36,8 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="SabreTools.IO" Version="1.5.1" />
<PackageReference Include="SabreTools.Serialization" Version="1.7.6" />
<PackageReference Include="SabreTools.IO" Version="1.6.1" />
<PackageReference Include="SabreTools.Serialization" Version="1.8.0" />
</ItemGroup>
</Project>