diff --git a/Il2CppDumper/Il2Cpp/Metadata.cs b/Il2CppDumper/Il2Cpp/Metadata.cs index 9cb4627b..800491c4 100644 --- a/Il2CppDumper/Il2Cpp/Metadata.cs +++ b/Il2CppDumper/Il2Cpp/Metadata.cs @@ -52,7 +52,7 @@ public Metadata(Stream stream) : base(stream) { throw new InvalidDataException("ERROR: Metadata file supplied is not valid metadata file."); } - if (version < 16 || version > 29) + if (version < 16 || version > 31) { throw new NotSupportedException($"ERROR: Metadata file supplied is not a supported version[{version}]."); } diff --git a/Il2CppDumper/Il2Cpp/MetadataClass.cs b/Il2CppDumper/Il2Cpp/MetadataClass.cs index 126ca9da..a05dc7ea 100644 --- a/Il2CppDumper/Il2Cpp/MetadataClass.cs +++ b/Il2CppDumper/Il2Cpp/MetadataClass.cs @@ -237,6 +237,8 @@ public class Il2CppMethodDefinition public uint nameIndex; public int declaringType; public int returnType; + [Version(Min = 31)] + public int returnParameterToken; public int parameterStart; [Version(Max = 24)] public int customAttributeIndex; diff --git a/Il2CppDumper/Outputs/StructGenerator.cs b/Il2CppDumper/Outputs/StructGenerator.cs index 9c2189d3..dea8d7a4 100644 --- a/Il2CppDumper/Outputs/StructGenerator.cs +++ b/Il2CppDumper/Outputs/StructGenerator.cs @@ -418,6 +418,7 @@ public void WriteScript(string outputDir) break; case 29: case 29.1: + case 31: sb.Append(HeaderConstants.HeaderV29); break; default: diff --git a/Il2CppDumper/Utils/SectionHelper.cs b/Il2CppDumper/Utils/SectionHelper.cs index d4d80e9e..2f16b0ad 100644 --- a/Il2CppDumper/Utils/SectionHelper.cs +++ b/Il2CppDumper/Utils/SectionHelper.cs @@ -380,6 +380,10 @@ private ulong FindCodeRegistration2019(List secs) il2Cpp.Position = il2Cpp.MapVATR(refva3 - il2Cpp.PointerSize); if (il2Cpp.ReadIntPtr() == imageCount) { + if (il2Cpp.Version >= 31) + { + return refva3 - il2Cpp.PointerSize * 16; + } if (il2Cpp.Version >= 29) { return refva3 - il2Cpp.PointerSize * 14;