private static void CalculateMC02Checksums(Stream stream, MC02Header mc02Header)
        {
            var headerBuffer = new byte[0x18];
            var chunk0Buffer = new byte[mc02Header.Chunk0Length];
            var chunk1Buffer = new byte[mc02Header.Chunk1Length];

            stream.Seek(0x2834, SeekOrigin.Begin);
            stream.Read(headerBuffer, 0, headerBuffer.Length);
            stream.Seek(4, SeekOrigin.Current);
            stream.Read(chunk0Buffer, 0, chunk0Buffer.Length);
            stream.Read(chunk1Buffer, 0, chunk1Buffer.Length);

            mc02Header.Checksum0 = CalculateMC02Checksum(chunk0Buffer);
            mc02Header.Checksum1 = CalculateMC02Checksum(chunk1Buffer);

            var csBytes = new byte[4];

            csBytes          = BitConverter.GetBytes(mc02Header.Checksum0);
            headerBuffer[16] = csBytes[0];
            headerBuffer[17] = csBytes[1];
            headerBuffer[18] = csBytes[2];
            headerBuffer[19] = csBytes[3];

            csBytes          = BitConverter.GetBytes(mc02Header.Checksum1);
            headerBuffer[20] = csBytes[0];
            headerBuffer[21] = csBytes[1];
            headerBuffer[22] = csBytes[2];
            headerBuffer[23] = csBytes[3];

            mc02Header.Checksum2 = CalculateMC02Checksum(headerBuffer);
        }
        public static void FixChecksums(MemoryStream stream, MC02Header mc02Header)
        {
            #region Fix save data hash
            var saveDataHash = CalculateSaveDataHash(stream);
            stream.Seek(0x2854, SeekOrigin.Begin);
            stream.Write(BitConverter.GetBytes(saveDataHash), 0, 4);
            #endregion

            #region Fix mc02 checksums
            CalculateMC02Checksums(stream, mc02Header);
            stream.Seek(0x2844, SeekOrigin.Begin);
            stream.Write(BitConverter.GetBytes(mc02Header.Checksum0), 0, 4);
            stream.Write(BitConverter.GetBytes(mc02Header.Checksum1), 0, 4);
            stream.Write(BitConverter.GetBytes(mc02Header.Checksum2), 0, 4);
            #endregion
        }