From 632d4b4602b0356425780e5f6abd4ded8d5be4f8 Mon Sep 17 00:00:00 2001 From: morkt Date: Tue, 12 Jan 2016 02:25:00 +0400 Subject: [PATCH] another XP3 encryption scheme. --- ArcFormats/KiriKiri/ArcXP3.cs | 23 +++++++++++++++++++++++ supported.html | 6 +++++- 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/ArcFormats/KiriKiri/ArcXP3.cs b/ArcFormats/KiriKiri/ArcXP3.cs index 462ddea6..9c728d4f 100644 --- a/ArcFormats/KiriKiri/ArcXP3.cs +++ b/ArcFormats/KiriKiri/ArcXP3.cs @@ -1264,4 +1264,27 @@ NextEntry: Decrypt (entry, offset, values, pos, count); } } + + [Serializable] + public class IncubusCrypt : ICrypt + { + public override byte Decrypt (Xp3Entry entry, long offset, byte value) + { + return (byte)~(value ^ (entry.Hash + 1)); + } + + public override void Decrypt (Xp3Entry entry, long offset, byte[] values, int pos, int count) + { + byte key = (byte)~(entry.Hash + 1); + for (int i = 0; i < count; ++i) + { + values[pos+i] ^= key; + } + } + + public override void Encrypt (Xp3Entry entry, long offset, byte[] values, int pos, int count) + { + Decrypt (entry, offset, values, pos, count); + } + } } diff --git a/supported.html b/supported.html index 261b7df4..7a34a94b 100644 --- a/supported.html +++ b/supported.html @@ -185,6 +185,7 @@ Nidaime wa ☆ Mahou Shoujo
Nuki Doki!
Okiba ga Nai!
Ore no Saimin Fantasia
+Riding Incubus
Seirei Tenshou
Se-kirara
Sharin no Kuni, Himawari no Shoujo
@@ -302,7 +303,9 @@ Sakura Synchronicity
Shinsetsu Ryouki no Ori Dai 2 Shou
*.elgELGNo -*.arcARC\x1aNoAZ SystemTriptych +*.arcARC\x1aNoAZ System +Triptych
+ *.cpbCPB\x1aNo *.mfg
*.mfm
*.mfsALPFNoSilky'sJokei Kazoku *MFG_
MFGA
MFGCNo @@ -411,6 +414,7 @@ Kimi no Omoi, Sono Negai
Samurai Jupiter
Sora no Iro, Mizu no Iro
Thunder Claps!
+Tokumei Kyoushi Hitomi
*.iksNPSRNoX[iks]Shikkan ~Hazukashimerareta Karada, Oreta Kokoro~ *.wbpARCFORM3 WBUGNoWild Bug