diff --git a/Il2CppInspector.Common/IL2CPP/Il2CppBinary.cs b/Il2CppInspector.Common/IL2CPP/Il2CppBinary.cs index cbb0008..d29d3e6 100644 --- a/Il2CppInspector.Common/IL2CPP/Il2CppBinary.cs +++ b/Il2CppInspector.Common/IL2CPP/Il2CppBinary.cs @@ -259,7 +259,8 @@ namespace Il2CppInspector CodeRegistration = Image.ReadMappedObject(codeRegistration); MetadataRegistration = Image.ReadMappedObject(metadataRegistration); - // TODO: Plugin hook PreProcessBinary + // Plugin hook to pre-process binary + isModified |= PluginHooks.PreProcessBinary(this).IsStreamModified; // Do basic validatation that MetadataRegistration and CodeRegistration are sane /* @@ -381,7 +382,8 @@ namespace Il2CppInspector GenericMethodInvokerIndices.Add(MethodSpecs[tableEntry.genericMethodIndex], tableEntry.indices.invokerIndex); } - // TODO: Plugin hook PostProcessBinary + // Plugin hook to pre-process binary + isModified |= PluginHooks.PostProcessBinary(this).IsStreamModified; } // IL2CPP API exports diff --git a/Il2CppInspector.Common/IL2CPP/Metadata.cs b/Il2CppInspector.Common/IL2CPP/Metadata.cs index 1612095..8aaf951 100644 --- a/Il2CppInspector.Common/IL2CPP/Metadata.cs +++ b/Il2CppInspector.Common/IL2CPP/Metadata.cs @@ -177,7 +177,7 @@ namespace Il2CppInspector // Get all metadata strings var pluginGetStringsResult = PluginHooks.GetStrings(this); - if (pluginGetStringsResult.FullyProcessed && !pluginGetStringsResult.IsInvalid) + if (pluginGetStringsResult.IsDataModified && !pluginGetStringsResult.IsInvalid) Strings = pluginGetStringsResult.Strings; else { @@ -247,7 +247,7 @@ namespace Il2CppInspector // Get all string literals var pluginGetStringLiteralsResult = PluginHooks.GetStringLiterals(this); - if (pluginGetStringLiteralsResult.FullyProcessed) + if (pluginGetStringLiteralsResult.IsDataModified) StringLiterals = pluginGetStringLiteralsResult.StringLiterals.ToArray(); else { diff --git a/Il2CppInspector.Common/Model/AppModel.cs b/Il2CppInspector.Common/Model/AppModel.cs index 604ac9e..790aace 100644 --- a/Il2CppInspector.Common/Model/AppModel.cs +++ b/Il2CppInspector.Common/Model/AppModel.cs @@ -272,7 +272,8 @@ namespace Il2CppInspector.Model // Restore stdout Console.SetOut(stdout); - // TODO: Plugin hook PostProcessAppModel + // Plugin hook to post-process model + PluginHooks.PostProcessAppModel(this); // This is to allow this method to be chained after a new expression return this;