Skip to content

Commit c68f126

Browse files
committed
How did all of this whitespace slip through?
1 parent 03016f3 commit c68f126

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

BinaryObjectScanner/Protection/SecuROM.cs

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public class SecuROM : IExecutableCheck<PortableExecutable>, IPathCheck
6161
{"EAD8E224D0F44706BA92BD9B27FEBA7D", "Need for Speed - The Run (USA)"},
6262
{"316FF217BD129F9EEBD05A321A8FBE60", "Syndicate (USA)+(Europe) (En,Fr,De,Es,It,Ru)"},
6363
};
64-
64+
6565
/// <summary>
6666
/// If hash isn't currently known, check size and pathname of the encrypted executable
6767
/// to determine if alt or entirely missing
@@ -97,7 +97,7 @@ public class SecuROM : IExecutableCheck<PortableExecutable>, IPathCheck
9797
{45211355, "BatmanAC.aec"},
9898
{48093043, "deadspace_f.aec"},
9999
};
100-
100+
101101
/// <inheritdoc/>
102102
public string? CheckExecutable(string file, PortableExecutable exe, bool includeDebug)
103103
{
@@ -112,26 +112,26 @@ public class SecuROM : IExecutableCheck<PortableExecutable>, IPathCheck
112112
{
113113
var packageType = CheckMatroschkaPackage(package, includeDebug);
114114
if (packageType != null)
115-
return packageType;
115+
return packageType;
116116
}
117-
117+
118118
// Alf.dll
119119
string? name = exe.ProductName;
120120
if (name.OptionalEquals("DFA Unlock Dll"))
121121
return $"SecuROM DFA Unlock v{exe.GetInternalVersion()}";
122-
122+
123123
if (name.OptionalEquals("Release Control Unlock Dll"))
124124
return $"SecuROM Release Control Unlock v{exe.GetInternalVersion()}";
125-
125+
126126
// Dfa.dll and ca.dll. The former seems to become the latter later on.
127127
name = exe.FileDescription;
128128
if (name.OptionalEquals("SecuROM Data File Activation Library"))
129129
return $"SecuROM Data File Activation v{exe.GetInternalVersion()}";
130-
130+
131131
// Copyright is only checked because "Content Activation Library" seems broad on its own.
132132
if (name.OptionalEquals("Content Activation Library") && exe.LegalCopyright.OptionalContains("Sony DADC Austria AG"))
133133
return $"SecuROM Content Activation v{exe.GetInternalVersion()}";
134-
134+
135135
if (exe.ContainsSection(".dsstext", exact: true))
136136
return $"SecuROM 8.03.03+";
137137

@@ -421,30 +421,30 @@ private static string GetV8WhiteLabelVersion(PortableExecutable exe)
421421
return "SecuROM Matroschka Package";
422422

423423
if (package.Entries == null || package.Entries.Length == 0)
424-
return "SecuROM Matroschka Package - No Entries? - Please report to us on GitHub";
425-
424+
return "SecuROM Matroschka Package - No Entries? - Please report to us on GitHub";
425+
426426
// The second entry in a Release Control matroschka package is always the encrypted executable
427-
var entry = package.Entries[1];
428-
427+
var entry = package.Entries[1];
428+
429429
if (entry.MD5 == null || entry.MD5.Length == 0)
430-
return "SecuROM Matroschka Package - No MD5? - Please report to us on GitHub";
430+
return "SecuROM Matroschka Package - No MD5? - Please report to us on GitHub";
431431

432432
string md5String = BitConverter.ToString(entry.MD5!);
433433
md5String = md5String.ToUpperInvariant().Replace("-", string.Empty);
434-
434+
435435
// TODO: Not used yet, but will be in the future
436436
var fileData = package.ReadFileData(entry, includeDebug);
437-
437+
438438
// Check if encrypted executable is known via hash
439439
if (MatroschkaHashDictionary.TryGetValue(md5String, out var gameName))
440440
return $"SecuROM Release Control - {gameName}";
441-
441+
442442
// If not known, check if encrypted executable is likely an alt signing of a known executable
443443
// Filetime could be checked here, but if it was signed at a different time, the time will vary anyways
444444
var readPathBytes = entry.Path;
445445
if (readPathBytes == null || readPathBytes.Length == 0)
446446
return $"SecuROM Release Control - Unknown executable {md5String},{entry.Size} - Please report to us on GitHub!";
447-
447+
448448
var readPathName = Encoding.ASCII.GetString(readPathBytes).TrimEnd('\0');
449449
if (MatroschkaSizeFilenameDictionary.TryGetValue(entry.Size, out var pathName) && pathName == readPathName)
450450
return $"SecuROM Release Control - Unknown possible alt executable of size {entry.Size} - Please report to us on GitHub";
@@ -492,15 +492,15 @@ private static string GetV8WhiteLabelVersion(PortableExecutable exe)
492492
// Regardless, even if these are given their own named variant later, this check should remain in order to
493493
// catch other modified PA variants (this would have also caught EA GAM, for example) and to match PiD's
494494
// detection abilities.
495-
495+
496496
name = exe.ExportTable?.ExportNameTable?.Strings?[0];
497497
if (name.OptionalEquals("drm_pagui_doit"))
498498
{
499499
// Not all of them are guaranteed to have an internal version
500500
var version = exe.GetInternalVersion();
501501
if (string.IsNullOrEmpty(version))
502502
return $"SecuROM Product Activation - Modified";
503-
503+
504504
return $"SecuROM Product Activation v{exe.GetInternalVersion()} - Modified";
505505
}
506506

0 commit comments

Comments
 (0)