Add Uniloc SoftAnchor detection (fixes #85)

This commit is contained in:
Matt Nadareski
2025-09-07 10:34:33 -04:00
parent 2690536fda
commit a89124883c
2 changed files with 91 additions and 0 deletions

View File

@@ -0,0 +1,90 @@
using System;
using System.Collections.Generic;
using BinaryObjectScanner.Interfaces;
using SabreTools.Matching;
using SabreTools.Matching.Paths;
using SabreTools.Serialization.Wrappers;
namespace BinaryObjectScanner.Protection
{
/// <summary>
/// Uniloc SoftAnchor is an activator-based protection
/// </summary>
/// <remarks>
/// Apparently present on the original release of Alpha Protocol
/// (https://web.archive.org/web/20120613033042/http://blogs.sega.com/2010/05/01/alpha-protocol-pc-drm-details/),
/// but was seemingly removed accord to PCGW.
/// </remarks>
/// <see href="http://redump.org/discs/quicksearch/uniloc/protection/only"/>
public class UnilocSoftAnchor : IExecutableCheck<PortableExecutable>, IPathCheck
{
/// <inheritdoc/>
public string? CheckExecutable(string file, PortableExecutable exe, bool includeDebug)
{
// TODO: Add version number finding
// TODO: Come to an agreement as to what the version should be
// Found in Redump entry 114428
var name = exe.CompanyName;
if (name.OptionalStartsWith("Uniloc USA Inc."))
return "Uniloc SoftAnchor";
// Found in Redump entry 114428
name = exe.LegalCopyright;
if (name.OptionalContains("Uniloc"))
return "Uniloc SoftAnchor";
// Found via https://www.pcgamingwiki.com/wiki/Football_Manager_2010
name = exe.OriginalFilename;
if (name.OptionalEquals("saAudit.dll"))
return "Uniloc SoftAnchor";
if (name.OptionalEquals("saui.dll"))
return "Uniloc SoftAnchor";
// Found via https://www.pcgamingwiki.com/wiki/Football_Manager_2010
name = exe.ProductName;
if (name.OptionalStartsWith("saAudit"))
return "Uniloc SoftAnchor";
// Found in Redump entry 114428
if (Array.IndexOf(exe.SectionNames, "SAAC0") > -1)
return "Uniloc SoftAnchor";
return null;
}
/// <inheritdoc/>
public List<string> CheckDirectoryPath(string path, List<string>? files)
{
var matchers = new List<PathMatchSet>
{
// Found via https://www.pcgamingwiki.com/wiki/Football_Manager_2010
new(new FilePathMatch("saAudit.dll"), "Uniloc SoftAnchor"),
new(new FilePathMatch("saAudit2005MT.dll"), "Uniloc SoftAnchor"),
new(new FilePathMatch("saui.dll"), "Uniloc SoftAnchor"),
// Found in Redump entry 114428
new(new FilePathMatch("saAuditMD.dll"), "Uniloc SoftAnchor"),
};
return MatchUtil.GetAllMatches(files, matchers, any: true);
}
/// <inheritdoc/>
public string? CheckFilePath(string path)
{
var matchers = new List<PathMatchSet>
{
// Found via https://www.pcgamingwiki.com/wiki/Football_Manager_2010
new(new FilePathMatch("saAudit.dll"), "Uniloc SoftAnchor"),
new(new FilePathMatch("saAudit2005MT.dll"), "Uniloc SoftAnchor"),
new(new FilePathMatch("saui.dll"), "Uniloc SoftAnchor"),
// Found in Redump entry 114428
new(new FilePathMatch("saAuditMD.dll"), "Uniloc SoftAnchor"),
};
return MatchUtil.GetFirstMatch(path, matchers, any: true);
}
}
}

View File

@@ -123,6 +123,7 @@ Below is a list of protections detected by BinaryObjectScanner. The two columns
| Themida/WinLicense/Code Virtualizer | True | False | Only certain products/versions currently detected |
| ~~Tivola Ring Protection~~ | False | True | Existing checks found to actually be indicators of copy-X, rather than some Tivola-specific ring protection. |
| TZCopyProtection | False | True | Partially unconfirmed² |
| Uniloc SoftAnchor | True | True | Version finding is not implemented |
| Uplay | True | True | |
| Windows Media Data Session DRM | True | True | |
| Winlock | False | True | |