Plugins: Add PreProcessBinary, PostProcessBinary, PostProcessAppModel

This commit is contained in:
Katy Coe
2020-12-29 21:32:54 +01:00
parent 3e3818a2ed
commit 0ce0bbe74d
3 changed files with 8 additions and 5 deletions

View File

@@ -259,7 +259,8 @@ namespace Il2CppInspector
CodeRegistration = Image.ReadMappedObject<Il2CppCodeRegistration>(codeRegistration);
MetadataRegistration = Image.ReadMappedObject<Il2CppMetadataRegistration>(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

View File

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