mirror of
https://github.com/SabreTools/BinaryObjectScanner.git
synced 2026-07-08 18:06:34 +00:00
Add Kalypso Launcher support (#324)
* Add Kalypso Launcher support * Small changes to Kalypso Launcher * More minor Kalypso Launcher changes
This commit is contained in:
committed by
GitHub
parent
570602aac6
commit
86b639b04f
90
BinaryObjectScanner/Protection/KalypsoLauncher.cs
Normal file
90
BinaryObjectScanner/Protection/KalypsoLauncher.cs
Normal file
@@ -0,0 +1,90 @@
|
||||
#if NET40_OR_GREATER || NETCOREAPP
|
||||
using System.Collections.Concurrent;
|
||||
#endif
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using BinaryObjectScanner.Interfaces;
|
||||
using SabreTools.Matching;
|
||||
using SabreTools.Serialization.Wrappers;
|
||||
|
||||
namespace BinaryObjectScanner.Protection
|
||||
{
|
||||
/// <summary>
|
||||
/// Kalypso Launcher is a launcher used by Kalypso Media games. It is responsible for game activation via product keys.
|
||||
/// Several Kalypso developed games are available on Steam, but the launcher isn't able to be (officially) disabled: https://www.reddit.com/r/RailwayEmpire/comments/nktojh/skip_kalypso_launcher_from_steam/
|
||||
/// Assumed to be present on all Kalypso Media games on PC since at least 2011 (as it is present in Redump entry 95617), though this needs to be confirmed.
|
||||
/// The internal name of the Kalypso Launcher may be "Styx", as it is present as the File Description and Product Name in various versions of "KalypsoLauncher.dll".
|
||||
/// Kalypso FAQ, which includes information about Kalypso Launcher: https://www.kalypsomedia.com/us/frequently-asked-questions
|
||||
/// It was introduced in or before January 2011, based on this forum post introducing it: https://web.archive.org/web/20120524150700/http://forum.kalypsomedia.com/showthread.php?tid=7909
|
||||
///
|
||||
/// Known versions:
|
||||
/// 1.2.0.12: Found in Redump entry 95617.
|
||||
/// 2.0.4.2: Newest version as of 3/10/2024, downloaded from updating the installed game from Redump entry 95617.
|
||||
/// </summary>
|
||||
public class KalypsoLauncher : IPathCheck, IPortableExecutableCheck
|
||||
{
|
||||
|
||||
/// <inheritdoc/>
|
||||
public string? CheckPortableExecutable(string file, PortableExecutable pex, bool includeDebug)
|
||||
{
|
||||
// Get the sections from the executable, if possible
|
||||
var sections = pex.Model.SectionTable;
|
||||
if (sections == null)
|
||||
return null;
|
||||
|
||||
// TODO: Investigate if there are any viable checks for the game EXE itself.
|
||||
// "Styx" is found as the File Description and Product Name in "KalypsoLauncher.dll", but checks aren't included due to the risk of false positives.
|
||||
|
||||
var name = pex.InternalName;
|
||||
|
||||
// Found in "KalypsoLauncher.dll" in Redump entry 95617.
|
||||
if (name?.Contains("KalypsoLauncher.dll") == true)
|
||||
return $"Kalypso Launcher {pex.GetInternalVersion()}";
|
||||
|
||||
name = pex.OriginalFilename;
|
||||
|
||||
// Found in "KalypsoLauncher.dll" in Redump entry 95617.
|
||||
if (name?.Contains("KalypsoLauncher.dll") == true)
|
||||
return $"Kalypso Launcher {pex.GetInternalVersion()}";
|
||||
|
||||
// Get the .text section strings, if they exist
|
||||
var strs = pex.GetFirstSectionStrings(".rdata");
|
||||
if (strs != null)
|
||||
{
|
||||
// Found in "TFT.exe" in Redump entry 95617.
|
||||
if (strs.Any(s => s.Contains("@KalypsoLauncherXml")))
|
||||
return "Kalypso Launcher";
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
#if NET20 || NET35
|
||||
public Queue<string> CheckDirectoryPath(string path, IEnumerable<string>? files)
|
||||
#else
|
||||
public ConcurrentQueue<string> CheckDirectoryPath(string path, IEnumerable<string>? files)
|
||||
#endif
|
||||
{
|
||||
var matchers = new List<PathMatchSet>
|
||||
{
|
||||
// Found in Redump entry 95617.
|
||||
new(new FilePathMatch("KalypsoLauncher.dll"), "Kalypso Launcher"),
|
||||
};
|
||||
|
||||
return MatchUtil.GetAllMatches(files, matchers, any: true);
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
public string? CheckFilePath(string path)
|
||||
{
|
||||
var matchers = new List<PathMatchSet>
|
||||
{
|
||||
// Found in Redump entry 95617.
|
||||
new(new FilePathMatch("KalypsoLauncher.dll"), "Kalypso Launcher"),
|
||||
};
|
||||
|
||||
return MatchUtil.GetFirstMatch(path, matchers, any: true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -96,6 +96,7 @@ Below is a list of protections detected by BinaryObjectScanner. The two columns
|
||||
| IndyVCD | False | True | Unconfirmed¹ |
|
||||
| INTENIUM Trial & Buy Protection | True | False | |
|
||||
| JoWood X-Prot (v1/v2) / Xtreme-Protector | True | False | |
|
||||
| Kalypso Launcher | True | True | |
|
||||
| ~~Key2Audio~~ | True | True | Existing checks found to actually be indicators of OpenMG, not key2Audio specifically. |
|
||||
| Key-Lock (Dongle) | True | False | Unconfirmed¹ |
|
||||
| LabelGate CD | True | True | Currently only LabelGate CD2 is detected. |
|
||||
|
||||
Reference in New Issue
Block a user