IL2CPP: Ignore API exports starting "il2cpp_z_"

This commit is contained in:
Katy Coe
2020-07-21 16:19:47 +02:00
parent 2f3b0d7276
commit 3fd97649e6

View File

@@ -271,8 +271,11 @@ namespace Il2CppInspector
// IL2CPP API exports
// This strips leading underscores and selects only il2cpp_* symbols which can be mapped into the binary
// (therefore ignoring extern imports)
// Some binaries have functions starting "il2cpp_z_" - ignore these too
public Dictionary<string, ulong> GetAPIExports() {
var exports = Image.GetExports()?.Where(e => e.Name.StartsWith("il2cpp_") || e.Name.StartsWith("_il2cpp_") || e.Name.StartsWith("__il2cpp_"));
var exports = Image.GetExports()?
.Where(e => (e.Name.StartsWith("il2cpp_") || e.Name.StartsWith("_il2cpp_") || e.Name.StartsWith("__il2cpp_"))
&& !e.Name.Contains("il2cpp_z_"));
if (exports == null)
return new Dictionary<string, ulong>();