IL2CPP: Allow code at address zero to be evaluated (part of #21)
This commit is contained in:
@@ -141,16 +141,15 @@ namespace Il2CppInspector
|
|||||||
Debug.WriteLine("Function table:");
|
Debug.WriteLine("Function table:");
|
||||||
Debug.WriteLine(string.Join(", ", from a in addrs select string.Format($"0x{a:X8}")));
|
Debug.WriteLine(string.Join(", ", from a in addrs select string.Format($"0x{a:X8}")));
|
||||||
|
|
||||||
foreach (var loc in addrs)
|
foreach (var loc in addrs) {
|
||||||
if (loc != 0) {
|
var (code, metadata) = ConsiderCode(subImage, loc);
|
||||||
var (code, metadata) = ConsiderCode(subImage, loc);
|
if (code != 0) {
|
||||||
if (code != 0) {
|
RegistrationFunctionPointer = loc + subImage.GlobalOffset;
|
||||||
RegistrationFunctionPointer = loc + subImage.GlobalOffset;
|
Console.WriteLine("Required structures acquired from code heuristics. Initialization function: 0x{0:X16}", RegistrationFunctionPointer);
|
||||||
Console.WriteLine("Required structures acquired from code heuristics. Initialization function: 0x{0:X16}", RegistrationFunctionPointer);
|
Configure(subImage, code, metadata);
|
||||||
Configure(subImage, code, metadata);
|
return true;
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Console.WriteLine("No matches via code heuristics");
|
Console.WriteLine("No matches via code heuristics");
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user