diff --git a/Il2CppInspector.Common/IL2CPP/Il2CppBinary.cs b/Il2CppInspector.Common/IL2CPP/Il2CppBinary.cs index 77e54ea..cb88389 100644 --- a/Il2CppInspector.Common/IL2CPP/Il2CppBinary.cs +++ b/Il2CppInspector.Common/IL2CPP/Il2CppBinary.cs @@ -276,6 +276,13 @@ namespace Il2CppInspector CodeRegistration = Image.ReadMappedObject(codeRegistration); MetadataRegistration = Image.ReadMappedObject(metadataRegistration); + // genericAdjustorThunks was inserted before invokerPointersCount in 24.5 and 27.1 + // pointer expected if we need to bump version + if (Image.Version == 24.4 && CodeRegistration.invokerPointersCount > 0x100000) { + Image.Version = 24.5; + CodeRegistration = Image.ReadMappedObject(codeRegistration); + } + // Plugin hook to pre-process binary isModified |= PluginHooks.PreProcessBinary(this).IsStreamModified; diff --git a/Il2CppInspector.Common/IL2CPP/Il2CppBinaryClasses.cs b/Il2CppInspector.Common/IL2CPP/Il2CppBinaryClasses.cs index 72e4213..c6aae60 100644 --- a/Il2CppInspector.Common/IL2CPP/Il2CppBinaryClasses.cs +++ b/Il2CppInspector.Common/IL2CPP/Il2CppBinaryClasses.cs @@ -45,9 +45,9 @@ namespace Il2CppInspector public ulong invokerPointers; // Removed in metadata v27 - [Version(Max = 24.4)] + [Version(Max = 24.5)] public long customAttributeCount; - [Version(Max = 24.4)] + [Version(Max = 24.5)] public ulong customAttributeGenerators; // Removed in metadata v23 @@ -210,7 +210,7 @@ namespace Il2CppInspector public class Il2CppGenericClass { - [Version(Max = 24.4)] + [Version(Max = 24.5)] public long typeDefinitionIndex; /* the generic type definition */ [Version(Min = 27)] public ulong type; // Il2CppType* /* the generic type definition */ diff --git a/Il2CppInspector.Common/IL2CPP/MetadataClasses.cs b/Il2CppInspector.Common/IL2CPP/MetadataClasses.cs index 4fd7c47..b9b839e 100644 --- a/Il2CppInspector.Common/IL2CPP/MetadataClasses.cs +++ b/Il2CppInspector.Common/IL2CPP/MetadataClasses.cs @@ -100,13 +100,13 @@ namespace Il2CppInspector [Version(Min = 16)] public int assembliesCount; - [Version(Min = 19, Max = 24.4)] + [Version(Min = 19, Max = 24.5)] public int metadataUsageListsOffset; // Il2CppMetadataUsageList - [Version(Min = 19, Max = 24.4)] + [Version(Min = 19, Max = 24.5)] public int metadataUsageListsCount; - [Version(Min = 19, Max = 24.4)] + [Version(Min = 19, Max = 24.5)] public int metadataUsagePairsOffset; // Il2CppMetadataUsagePair - [Version(Min = 19, Max = 24.4)] + [Version(Min = 19, Max = 24.5)] public int metadataUsagePairsCount; [Version(Min = 19)] public int fieldRefsOffset; // Il2CppFieldRef @@ -240,7 +240,7 @@ namespace Il2CppInspector public int customAttributeIndex; public int byvalTypeIndex; - [Version(Max = 24.4)] + [Version(Max = 24.5)] public int byrefTypeIndex; public int declaringTypeIndex;