diff --git a/Il2CppInspector/FileFormatReader.cs b/Il2CppInspector/FileFormatReader.cs index 6f1ee80..03f7a66 100644 --- a/Il2CppInspector/FileFormatReader.cs +++ b/Il2CppInspector/FileFormatReader.cs @@ -1,5 +1,5 @@ /* - Copyright 2017 Katy Coe - http://www.hearthcode.org - http://www.djkaty.com + Copyright 2017-2019 Katy Coe - http://www.hearthcode.org - http://www.djkaty.com All rights reserved. */ @@ -24,7 +24,6 @@ namespace Il2CppInspector U ReadMappedObject(uint uiAddr) where U : new(); U[] ReadMappedArray(uint uiAddr, int count) where U : new(); uint MapVATR(uint uiAddr); - void FinalizeInit(Il2CppBinary il2cpp); byte[] ReadBytes(int count); ulong ReadUInt64(); @@ -105,8 +104,5 @@ namespace Il2CppInspector array.Add(ReadMappedObject(pointers[i])); return array; } - - // Perform file format-based post-load manipulations to the IL2Cpp data - public virtual void FinalizeInit(Il2CppBinary il2cpp) { } } } \ No newline at end of file diff --git a/Il2CppInspector/FileFormatReaders/MachOReader.cs b/Il2CppInspector/FileFormatReaders/MachOReader.cs index cbaa8c5..d1ba9bc 100644 --- a/Il2CppInspector/FileFormatReaders/MachOReader.cs +++ b/Il2CppInspector/FileFormatReaders/MachOReader.cs @@ -1,5 +1,5 @@ /* - Copyright 2017 Katy Coe - http://www.hearthcode.org - http://www.djkaty.com + Copyright 2017-2019 Katy Coe - http://www.hearthcode.org - http://www.djkaty.com All rights reserved. */ @@ -139,10 +139,6 @@ namespace Il2CppInspector return functionPointers.ToArray(); } - public override void FinalizeInit(Il2CppBinary il2cpp) { - il2cpp.MethodPointers = il2cpp.MethodPointers.Select(x => x - 1).ToArray(); - } - public override uint MapVATR(uint uiAddr) { if (!is64) { var section = sections.First(x => uiAddr >= x.Address && uiAddr <= (x.Address + x.Size)); diff --git a/Il2CppInspector/FileFormatReaders/PEReader.cs b/Il2CppInspector/FileFormatReaders/PEReader.cs index b1fd03c..94c9592 100644 --- a/Il2CppInspector/FileFormatReaders/PEReader.cs +++ b/Il2CppInspector/FileFormatReaders/PEReader.cs @@ -1,5 +1,5 @@ /* - Copyright 2017 Katy Coe - http://www.hearthcode.org - http://www.djkaty.com + Copyright 2017-2019 Katy Coe - http://www.hearthcode.org - http://www.djkaty.com All rights reserved. */ @@ -88,10 +88,6 @@ namespace Il2CppInspector return addrs.ToArray(); } - public override void FinalizeInit(Il2CppBinary il2cpp) { - il2cpp.MethodPointers = il2cpp.MethodPointers.Select(x => x - 1).ToArray(); - } - public override uint MapVATR(uint uiAddr) { if (uiAddr == 0) return 0; diff --git a/Il2CppInspector/Il2CppBinary.cs b/Il2CppInspector/Il2CppBinary.cs index 907efdb..a592675 100644 --- a/Il2CppInspector/Il2CppBinary.cs +++ b/Il2CppInspector/Il2CppBinary.cs @@ -59,7 +59,6 @@ namespace Il2CppInspector var (code, metadata) = ConsiderCode(loc, Image.GlobalOffset); if (code != 0) { Configure(subImage, code, metadata); - subImage.FinalizeInit(this); return true; } } diff --git a/Il2CppInspector/Reflection/MethodInfo.cs b/Il2CppInspector/Reflection/MethodInfo.cs index 5102abe..adab50e 100644 --- a/Il2CppInspector/Reflection/MethodInfo.cs +++ b/Il2CppInspector/Reflection/MethodInfo.cs @@ -1,5 +1,5 @@ /* - Copyright 2017 Katy Coe - http://www.hearthcode.org - http://www.djkaty.com + Copyright 2017-2019 Katy Coe - http://www.hearthcode.org - http://www.djkaty.com All rights reserved. */ @@ -51,6 +51,9 @@ namespace Il2CppInspector.Reflection VirtualAddress = pkg.Binary.Image.ReadUInt32(); } + // Remove ARM Thumb marker LSB if necessary + VirtualAddress &= 0xfffffffe; + HasBody = true; }