Files
BinaryObjectScanner/BinaryObjectScanner/Protection/UbisoftOrbit.cs
Matt Nadareski 08a90d52a8 Update packages
2025-09-24 12:14:31 -04:00

39 lines
1.2 KiB
C#

using System.Collections.Generic;
using BinaryObjectScanner.Interfaces;
using SabreTools.IO;
using SabreTools.IO.Matching;
namespace BinaryObjectScanner.Protection
{
/// <summary>
/// Ubitsoft Orbit (Online DRM)
/// </summary>
/// TODO: Investigate the DLLs to find more markers
public class UbisoftOrbit : IPathCheck
{
/// <inheritdoc/>
public List<string> CheckDirectoryPath(string path, List<string>? files)
{
var matchers = new List<PathMatchSet>
{
new(new FilePathMatch("GameOrbit.dll"), "Ubisoft Orbit"),
new(new FilePathMatch("ubiorbitapi_r2_loader.dll"), "Ubisoft Orbit"),
};
return MatchUtil.GetAllMatches(files, matchers, any: true);
}
/// <inheritdoc/>
public string? CheckFilePath(string path)
{
var matchers = new List<PathMatchSet>
{
new(new FilePathMatch("GameOrbit.dll"), "Ubisoft Orbit"),
new(new FilePathMatch("ubiorbitapi_r2_loader.dll"), "Ubisoft Orbit"),
};
return MatchUtil.GetFirstMatch(path, matchers, any: true);
}
}
}