diff --git a/Il2CppInspector.Common/Model/AppModel.cs b/Il2CppInspector.Common/Model/AppModel.cs index c0b933c..4a53f1f 100644 --- a/Il2CppInspector.Common/Model/AppModel.cs +++ b/Il2CppInspector.Common/Model/AppModel.cs @@ -46,6 +46,11 @@ namespace Il2CppInspector.Model // Composite mapping of all the .NET types in the IL2CPP binary public MultiKeyDictionary Types = new MultiKeyDictionary(); + // All of the string literals in the IL2CPP binary + // Note: Does not include string literals from global-metadata.dat + // Note: The virtual addresses are of String* (VAs of the pointer to String*) objects, not the strings themselves + public Dictionary Strings = new Dictionary(); + // The .NET type model for the application public TypeModel ILModel { get; } @@ -143,6 +148,11 @@ namespace Il2CppInspector.Model var address = usage.VirtualAddress; switch (usage.Type) { + case MetadataUsageType.StringLiteral: + var str = ILModel.GetMetadataUsageName(usage); + Strings.Add(address, str); + break; + case MetadataUsageType.Type: case MetadataUsageType.TypeInfo: var type = ILModel.GetMetadataUsageType(usage); @@ -169,8 +179,6 @@ namespace Il2CppInspector.Model } } - // TODO: Build composite types - // This is to allow this method to be chained after a new expression return this; }