IL2CPP: Add IsModified flags to Metadata and Binary

This commit is contained in:
Katy Coe
2020-12-09 17:34:21 +01:00
parent 15663fb0cf
commit 90fa9cf193
3 changed files with 13 additions and 0 deletions

View File

@@ -45,6 +45,9 @@ namespace Il2CppInspector
public Dictionary<int, string> Strings { get; } = new Dictionary<int, string>();
// Set if something in the metadata has been modified / decrypted
public bool IsModified { get; } = false;
public Metadata(Stream stream, EventHandler<string> statusCallback = null) : base(stream)
{
// Read magic bytes
@@ -189,6 +192,7 @@ namespace Il2CppInspector
var decryptedString = Encoding.GetString(encryptedString.Select(b => (byte) (b ^ xorKey)).ToArray());
Strings.Add(offset.current, decryptedString);
}
IsModified = true;
}
// Get all managed code string literals