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
I fixed this and a logic flaw(or a side effect of my fix, not sure) in the comparison as well so that maps are now generated correctly.
Added more fallback if an assembly could not be found, at all times it was either mscorlib or Il2Cppmscorlib, so I added special cases.
Removed the leading dot on missing empty namespaces so it looks more clean
added handling for the System.Object
This shouldn't change anything about the main Unhollower functionality, only deobfuscation map generation.
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
System.Object
This shouldn't change anything about the main Unhollower functionality, only deobfuscation map generation.