From 3fd97649e656c6bb40fb8788a78f8dd9f0c18715 Mon Sep 17 00:00:00 2001 From: Katy Coe Date: Tue, 21 Jul 2020 16:19:47 +0200 Subject: [PATCH] IL2CPP: Ignore API exports starting "il2cpp_z_" --- Il2CppInspector.Common/IL2CPP/Il2CppBinary.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Il2CppInspector.Common/IL2CPP/Il2CppBinary.cs b/Il2CppInspector.Common/IL2CPP/Il2CppBinary.cs index 58f12ee..fbbbf19 100644 --- a/Il2CppInspector.Common/IL2CPP/Il2CppBinary.cs +++ b/Il2CppInspector.Common/IL2CPP/Il2CppBinary.cs @@ -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 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();