knah / Il2CppAssemblyUnhollower

A tool to generate Managed->IL2CPP proxy assemblies
GNU Lesser General Public License v3.0
503 stars 87 forks source link

AssemblyUnhollower deobfuscation map generation | Fix for MissingKeyException and Type comparison #94

Open CamelCaseName opened 1 year ago

CamelCaseName commented 1 year ago

When trying to generate a map for House Party, I experienced the following error: Unhandled Exception: System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary. at System.ThrowHelper.ThrowKeyNotFoundException() at System.Collections.Generic.Dictionary'2.get_Item(TKey key) at AssemblyUnhollower.Contexts.RewriteGlobalContext.GetNewAssemblyForOriginal(AssemblyDefinition oldAssembly) in F:\Lenny\source\repos\Il2CppAssemblyUnhollower\AssemblyUnhollower\Contexts\RewriteGlobalContext.cs:line 61 at AssemblyUnhollower.Contexts.AssemblyRewriteContext.RewriteTypeRef(TypeReference typeRef) in F:\Lenny\source\repos\Il2CppAssemblyUnhollower\AssemblyUnhollower\Contexts\AssemblyRewriteContext.cs:line 113 at AssemblyUnhollower.Passes.Pass12FillTypedefs.DoPass(RewriteGlobalContext context) in F:\Lenny\source\repos\Il2CppAssemblyUnhollower\AssemblyUnhollower\Passes\Pass12FillTypedefs.cs:line 36 at AssemblyUnhollower.DeobfuscationMapGenerator.GenerateDeobfuscationMap(UnhollowerOptions options) in F:\Lenny\source\repos\Il2CppAssemblyUnhollower\AssemblyUnhollower\DeobfuscationMapGenerator.cs:line 65 at AssemblyUnhollower.Program.Main(String[] args) in F:\Lenny\source\repos\Il2CppAssemblyUnhollower\AssemblyUnhollower\Program.cs:line 168

This shouldn't change anything about the main Unhollower functionality, only deobfuscation map generation.