From 2f94464b7d51f2e4bd041771d179ad464366fb5d Mon Sep 17 00:00:00 2001 From: HeroponRikiBestest <50224630+HeroponRikiBestest@users.noreply.github.com> Date: Fri, 19 Sep 2025 12:09:16 -0400 Subject: [PATCH] Small matroschka model update (#14) * Small model updates, mainly documentation. Not essential. * wrong branch lol --- SabreTools.Models/SecuROM/MatroshkaEntry.cs | 5 +++-- SabreTools.Models/SecuROM/MatroshkaPackage.cs | 16 ++++++++++------ 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/SabreTools.Models/SecuROM/MatroshkaEntry.cs b/SabreTools.Models/SecuROM/MatroshkaEntry.cs index 8ee1dba..f30f16f 100644 --- a/SabreTools.Models/SecuROM/MatroshkaEntry.cs +++ b/SabreTools.Models/SecuROM/MatroshkaEntry.cs @@ -8,8 +8,9 @@ namespace SabreTools.Models.SecuROM /// /// Versions without a key prefix are 256 bytes. /// Versions with key values either are 256 or 512 bytes. + /// Stored as a string as the rest of the 256/512 bytes are just padding. /// - public byte[]? Path { get; set; } + public string? Path { get; set; } /// /// Type of the entry data @@ -29,7 +30,7 @@ namespace SabreTools.Models.SecuROM /// /// Unknown value only seen in later versions /// - /// Possibly indicates that the offset is a 64-bit value + /// Does not indicate that the offset is or isn't a 64-bit value public uint? Unknown { get; set; } /// diff --git a/SabreTools.Models/SecuROM/MatroshkaPackage.cs b/SabreTools.Models/SecuROM/MatroshkaPackage.cs index 7b6a45c..632c819 100644 --- a/SabreTools.Models/SecuROM/MatroshkaPackage.cs +++ b/SabreTools.Models/SecuROM/MatroshkaPackage.cs @@ -26,7 +26,7 @@ namespace SabreTools.Models.SecuROM /// public uint EntryCount { get; set; } - #region Release Control only + #region Longer Header only // The combination of the 4 following values have only been seen in // one of 4 distinct patterns. The meaning of these patterns is unknown. @@ -41,19 +41,19 @@ namespace SabreTools.Models.SecuROM // 0x00 values and 256-byte paths. /// - /// One of four unknown values only observed on RC matroschka sections + /// One of four unknown values only observed on longer header matroschka sections /// /// Only values of 0 or 1 have been found public uint? UnknownRCValue1 { get; set; } /// - /// One of four unknown values only observed on RC matroschka sections + /// One of four unknown values only observed on longer header matroschka sections /// /// Only values of 0 or 1 have been found public uint? UnknownRCValue2 { get; set; } /// - /// One of four unknown values only observed on RC matroschka sections + /// One of four unknown values only observed on longer header matroschka sections /// /// Only values of 0 or 1 have been found public uint? UnknownRCValue3 { get; set; } @@ -62,8 +62,12 @@ namespace SabreTools.Models.SecuROM /// 32-character hex string /// /// - /// Due to encryption on later DFA-encrypted RC executables, this is the - /// most reliable way to identify which executables are using the same key. + /// This is all zeroes for all observed longer header non-RC matroschka sections. For RC sections, this is + /// always 630A411277DE8A4B9BB8DF2A14AC4C28, except for the executables for Crysis Wars and Crysis + /// Warhead, which are 9D2593B31A01E041AF6EDC15AEF5B969. Those two are noteworthy as they appear to be the + /// earliest known RC games, have a strange key in the encrypted executable, and are the only games that cannot + /// currently be manually unlocked (and thus, cannot be unlocked at all at the moment). So, this may indicate + /// something about version, functionality, or otherwise? /// public string? KeyHexString { get; set; }