diff --git a/NDecrypt/Headers/NDSHeader.cs b/NDecrypt/Headers/NDSHeader.cs index a56dd81..fbbdfef 100644 --- a/NDecrypt/Headers/NDSHeader.cs +++ b/NDecrypt/Headers/NDSHeader.cs @@ -612,8 +612,8 @@ namespace NDecrypt.Headers /// /// Determine if the current file is already decrypted or not /// - /// - /// + /// BinaryReader representing the input stream + /// True if the file has known values for a decrypted file, false otherwise private bool CheckIfDecrypted(BinaryReader reader) { reader.BaseStream.Seek(0x4000, SeekOrigin.Begin); @@ -621,7 +621,8 @@ namespace NDecrypt.Headers uint secondValue = reader.ReadUInt32(); return ((firstValue == 0xE7FFDEFF) && (secondValue == 0xE7FFDEFF)) - || ((firstValue == 0xD0D48B67) && (secondValue == 0x39392F23)); // Edge case for a couple of items + || ((firstValue == 0xD0D48B67) && (secondValue == 0x39392F23)) // Incorrectly mastered value + || ((firstValue == 0x00000000) && (secondValue == 0x00000000)); // Empty secure area } /// @@ -737,8 +738,8 @@ namespace NDecrypt.Headers /// /// Perform a decryption step /// - /// - /// + /// First unsigned value to use in decryption + /// Second unsigned value to use in decryption private void Decrypt(ref uint arg1, ref uint arg2) { uint a = arg1; @@ -757,8 +758,8 @@ namespace NDecrypt.Headers /// /// Perform an encryption step /// - /// - /// + /// First unsigned value to use in encryption + /// Second unsigned value to use in encryption private void Encrypt(ref uint arg1, ref uint arg2) { uint a = arg1; @@ -797,7 +798,7 @@ namespace NDecrypt.Headers /// /// Update the hashtable /// - /// + /// Value to update the hashtable with private void UpdateHashtable(byte[] arg1) { for (int j = 0; j < 18; j++)