优化版本判断

This commit is contained in:
Perfare 2022-03-23 04:29:56 +08:00
parent 67b5598504
commit daeff2734c

View file

@ -55,7 +55,7 @@ namespace Il2CppDumper
pCodeRegistration = MapVATR<Il2CppCodeRegistration>(codeRegistration);
if (Version == 27)
{
if (pCodeRegistration.reversePInvokeWrapperCount > 0x100000) //TODO
if (pCodeRegistration.reversePInvokeWrapperCount > 0x50000) //TODO
{
Version = 27.1;
codeRegistration -= PointerSize;
@ -65,7 +65,7 @@ namespace Il2CppDumper
if (Version == 24.4)
{
codeRegistration -= PointerSize * 2;
if (pCodeRegistration.reversePInvokeWrapperCount > 0x100000) //TODO
if (pCodeRegistration.reversePInvokeWrapperCount > 0x50000) //TODO
{
Version = 24.5;
codeRegistration -= PointerSize;
@ -96,7 +96,7 @@ namespace Il2CppDumper
public virtual void Init(ulong codeRegistration, ulong metadataRegistration)
{
pCodeRegistration = MapVATR<Il2CppCodeRegistration>(codeRegistration);
if (Version == 27 && pCodeRegistration.invokerPointersCount > 0x100000) //TODO
if (Version == 27 && pCodeRegistration.invokerPointersCount > 0x50000) //TODO
{
Version = 27.1;
Console.WriteLine($"Change il2cpp version to: {Version}");
@ -111,7 +111,7 @@ namespace Il2CppDumper
if (codeGenModule.rgctxsCount > 0)
{
var rgctxs = MapVATR<Il2CppRGCTXDefinition>(codeGenModule.rgctxs, codeGenModule.rgctxsCount);
if (rgctxs.All(x => x.data.rgctxDataDummy > 0x100000))
if (rgctxs.All(x => x.data.rgctxDataDummy > 0x50000))
{
Version = 27.2;
Console.WriteLine($"Change il2cpp version to: {Version}");
@ -120,7 +120,7 @@ namespace Il2CppDumper
}
}
}
if (Version == 24.4 && pCodeRegistration.invokerPointersCount > 0x100000) //TODO
if (Version == 24.4 && pCodeRegistration.invokerPointersCount > 0x50000) //TODO
{
Version = 24.5;
Console.WriteLine($"Change il2cpp version to: {Version}");