From 1ba1597878e2e751fc143a9d55bc3c2548721114 Mon Sep 17 00:00:00 2001 From: Kurt Date: Mon, 13 Jan 2020 20:55:58 -0800 Subject: [PATCH] Dump decrypted/decompressed content instead of raw more useful for analysis this way --- .../Subforms/Save Editors/Gen8/SAV_BlockDump8.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/PKHeX.WinForms/Subforms/Save Editors/Gen8/SAV_BlockDump8.cs b/PKHeX.WinForms/Subforms/Save Editors/Gen8/SAV_BlockDump8.cs index 794c0490b..0c2bb040d 100644 --- a/PKHeX.WinForms/Subforms/Save Editors/Gen8/SAV_BlockDump8.cs +++ b/PKHeX.WinForms/Subforms/Save Editors/Gen8/SAV_BlockDump8.cs @@ -104,7 +104,16 @@ private static void ImportSelectBlock(SCBlock blockTarget) private static void ExportAllBlocksAsSingleFile(IEnumerable blocks, string path) { - var data = SwishCrypto.GetDecryptedRawData(blocks); + using var stream = new MemoryStream(); + using var bw = new BinaryWriter(stream); + foreach (var b in blocks) + { + bw.Write(b.Key); + bw.Write((byte)b.Type); + bw.Write((byte)b.SubType); + bw.Write(b.Data); + } + var data = stream.ToArray(); // SwishCrypto.GetDecryptedRawData(blocks); for raw encrypted File.WriteAllBytes(path, data); }