diff --git a/ArcFormats/KiriKiri/CryptAlgorithms.cs b/ArcFormats/KiriKiri/CryptAlgorithms.cs index bf76894c..4b20c259 100644 --- a/ArcFormats/KiriKiri/CryptAlgorithms.cs +++ b/ArcFormats/KiriKiri/CryptAlgorithms.cs @@ -1594,4 +1594,25 @@ namespace GameRes.Formats.KiriKiri } } } + [Serializable] + public class Kano2Crypt : ICrypt + { + public override void Decrypt(Xp3Entry entry, long offset, byte[] buffer, int pos, int count) + { + // only apply xor every 8 bytes + for (int i = 0; i < count; i++) + { + if ((i + pos) % 8 == 0) + { + buffer[i + pos] ^= (byte)entry.Hash; + i += 7; + } + } + } + + public override void Encrypt(Xp3Entry entry, long offset, byte[] buffer, int pos, int count) + { + Decrypt(entry, offset, buffer, pos, count); + } + } } diff --git a/ArcFormats/Resources/Formats.dat b/ArcFormats/Resources/Formats.dat index 4f8ee556..cf88c0cc 100644 Binary files a/ArcFormats/Resources/Formats.dat and b/ArcFormats/Resources/Formats.dat differ