Skip to content

Commit f21d300

Browse files
committed
支持v31
1 parent 217f1d4 commit f21d300

File tree

4 files changed

+8
-1
lines changed

4 files changed

+8
-1
lines changed

Il2CppDumper/Il2Cpp/Metadata.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public Metadata(Stream stream) : base(stream)
5252
{
5353
throw new InvalidDataException("ERROR: Metadata file supplied is not valid metadata file.");
5454
}
55-
if (version < 16 || version > 29)
55+
if (version < 16 || version > 31)
5656
{
5757
throw new NotSupportedException($"ERROR: Metadata file supplied is not a supported version[{version}].");
5858
}

Il2CppDumper/Il2Cpp/MetadataClass.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,8 @@ public class Il2CppMethodDefinition
237237
public uint nameIndex;
238238
public int declaringType;
239239
public int returnType;
240+
[Version(Min = 31)]
241+
public int returnParameterToken;
240242
public int parameterStart;
241243
[Version(Max = 24)]
242244
public int customAttributeIndex;

Il2CppDumper/Outputs/StructGenerator.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,7 @@ public void WriteScript(string outputDir)
418418
break;
419419
case 29:
420420
case 29.1:
421+
case 31:
421422
sb.Append(HeaderConstants.HeaderV29);
422423
break;
423424
default:

Il2CppDumper/Utils/SectionHelper.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,10 @@ private ulong FindCodeRegistration2019(List<SearchSection> secs)
380380
il2Cpp.Position = il2Cpp.MapVATR(refva3 - il2Cpp.PointerSize);
381381
if (il2Cpp.ReadIntPtr() == imageCount)
382382
{
383+
if (il2Cpp.Version >= 31)
384+
{
385+
return refva3 - il2Cpp.PointerSize * 16;
386+
}
383387
if (il2Cpp.Version >= 29)
384388
{
385389
return refva3 - il2Cpp.PointerSize * 14;

0 commit comments

Comments
 (0)