Skip to content

Commit

Permalink
支持v31
Browse files Browse the repository at this point in the history
  • Loading branch information
Perfare committed Jul 5, 2024
1 parent 217f1d4 commit f21d300
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Il2CppDumper/Il2Cpp/Metadata.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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}].");
}
Expand Down
2 changes: 2 additions & 0 deletions Il2CppDumper/Il2Cpp/MetadataClass.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions Il2CppDumper/Outputs/StructGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,7 @@ public void WriteScript(string outputDir)
break;
case 29:
case 29.1:
case 31:
sb.Append(HeaderConstants.HeaderV29);
break;
default:
Expand Down
4 changes: 4 additions & 0 deletions Il2CppDumper/Utils/SectionHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,10 @@ private ulong FindCodeRegistration2019(List<SearchSection> 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;
Expand Down

0 comments on commit f21d300

Please sign in to comment.