29/31.2 was a psyop

This commit is contained in:
LukeFZ
2024-09-01 02:01:34 +02:00
parent 1a12cf5081
commit 7632ff2283
4 changed files with 2 additions and 2446 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -195,25 +195,6 @@ namespace Il2CppInspector
Header.AttributeDataRangeSize / Sizeof<Il2CppCustomAttributeDataRange>());
}
if (Version == MetadataVersions.V290 || Version == MetadataVersions.V310)
{
// 29.2/31.2 added a new isUnmanagedCallersOnly flag to Il2CppMethodDefinition.
// This offsets all subsequent entries by one - we can detect this by checking the
// top token byte (which should always be 0x06).
if (Methods.Length >= 2)
{
var secondToken = Methods[1].Token;
if (secondToken >> 24 != 0x6)
{
Version = new StructVersion(Version.Major, 0, MetadataVersions.Tag2023);
Methods = ReadVersionedObjectArray<Il2CppMethodDefinition>(Header.MethodsOffset,
Header.MethodsSize / Sizeof<Il2CppMethodDefinition>());
}
}
}
// Get all metadata strings
var pluginGetStringsResult = PluginHooks.GetStrings(this);
if (pluginGetStringsResult.IsDataModified && !pluginGetStringsResult.IsInvalid)

View File

@@ -49,10 +49,6 @@ public partial record struct Il2CppMethodDefinition
public ushort Slot { get; private set; }
public ushort ParameterCount { get; private set; }
[VersionCondition(EqualTo = "29.0", IncludingTag = "2023")]
[VersionCondition(EqualTo = "31.0", IncludingTag = "2023")]
public bool IsUnmanagedCallersOnly { get; private set; }
public readonly MethodAttributes Attributes => (MethodAttributes)Flags;
public readonly MethodImplAttributes ImplAttributes => (MethodImplAttributes)ImplFlags;

View File

@@ -22,10 +22,10 @@ public static class MetadataVersions
public static readonly StructVersion V271 = new(27, 1);
public static readonly StructVersion V272 = new(27, 2);
// These two versions have three variations:
// These two versions have two variations:
public static readonly StructVersion V290 = new(29);
public static readonly StructVersion V310 = new(31);
// No tag - 29.0/31.0
public static readonly string Tag2022 = "2022"; // 29.1/31.1
public static readonly string Tag2023 = "2023"; // 29.2/31.2
}