Remove FinalizeInit

This commit is contained in:
Katy Coe
2019-10-16 16:41:36 +02:00
parent 70def274a7
commit 950c2d6f16
5 changed files with 7 additions and 17 deletions

View File

@@ -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<U>(uint uiAddr) where U : new();
U[] ReadMappedArray<U>(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<U>(pointers[i]));
return array;
}
// Perform file format-based post-load manipulations to the IL2Cpp data
public virtual void FinalizeInit(Il2CppBinary il2cpp) { }
}
}

View File

@@ -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));

View File

@@ -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;

View File

@@ -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;
}
}

View File

@@ -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;
}