diff --git a/ArcFormats/KiriKiri/ArcXP3.cs b/ArcFormats/KiriKiri/ArcXP3.cs index 85f40a4a..fcc11ff3 100644 --- a/ArcFormats/KiriKiri/ArcXP3.cs +++ b/ArcFormats/KiriKiri/ArcXP3.cs @@ -1173,6 +1173,34 @@ NextEntry: } } + [Serializable] + public class GakuenButouCrypt : ICrypt + { + public override byte Decrypt (Xp3Entry entry, long offset, byte value) + { + if (0 != (offset & 1)) + return (byte)(value ^ offset); + else + return (byte)(value ^ entry.Hash); + } + + public override void Decrypt (Xp3Entry entry, long offset, byte[] values, int pos, int count) + { + for (int i = 0; i < count; ++i, ++offset) + { + if (0 != (offset & 1)) + values[pos+i] ^= (byte)offset; + else + values[pos+i] ^= (byte)entry.Hash; + } + } + + public override void Encrypt (Xp3Entry entry, long offset, byte[] values, int pos, int count) + { + Decrypt (entry, offset, values, pos, count); + } + } + [Serializable] public class AlteredPinkCrypt : ICrypt { diff --git a/supported.html b/supported.html index 3218b2dc..18b6a719 100644 --- a/supported.html +++ b/supported.html @@ -170,6 +170,7 @@ Distance
Fate/stay night
Fate/hollow ataraxia
G-senjou no Maou
+Gakuen Butou no Folklore
Hanafubuki ~Sennen no Koi o Shimashita~
Haruiro ☆ Communication ♪
Hime to Majin to Koi Suru Tamashii