File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
BinaryObjectScanner/Protection Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 22using System . Collections . Generic ;
33using System . Text ;
44using BinaryObjectScanner . Interfaces ;
5- using SabreTools . Data . Models . PKZIP ;
65using SabreTools . IO ;
76using SabreTools . IO . Extensions ;
87using SabreTools . IO . Matching ;
98using SabreTools . Serialization . Wrappers ;
9+ using static SabreTools . Data . Models . SecuROM . Constants ;
1010
1111namespace BinaryObjectScanner . Protection
1212{
@@ -267,7 +267,7 @@ public List<string> CheckDirectoryPath(string path, List<string>? files)
267267 {
268268 int temp = index ;
269269 byte [ ] overlaySample = overlayData . ReadBytes ( ref temp , 0x04 ) ;
270- if ( overlaySample . EqualsExactly ( SabreTools . Data . Models . SecuROM . Constants . AddDMagicBytes ) )
270+ if ( overlaySample . EqualsExactly ( AddDMagicBytes ) )
271271 {
272272 found = true ;
273273 break ;
@@ -284,8 +284,12 @@ public List<string> CheckDirectoryPath(string path, List<string>? files)
284284 if ( addD == null )
285285 return null ;
286286
287+ // All samples have had 3 entries -- Revisit if needed
288+ if ( addD . EntryCount != 3 )
289+ return null ;
290+
287291 // Format the version
288- string version = $ "{ addD . Version } .{ addD . Build } ";
292+ string version = $ "{ addD . Version } .{ addD . Build } ";
289293 if ( ! char . IsNumber ( version [ 0 ] ) )
290294 return "(very old, v3 or less)" ;
291295
You can’t perform that action at this time.
0 commit comments