From ad6e83cc6000f179335c21ce400270c53ff4d148 Mon Sep 17 00:00:00 2001 From: morkt Date: Fri, 22 Aug 2014 10:17:14 +0400 Subject: [PATCH] minor decryption fix. --- ArcFormats/ArcNPA.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ArcFormats/ArcNPA.cs b/ArcFormats/ArcNPA.cs index 66dbba54..00a07a37 100644 --- a/ArcFormats/ArcNPA.cs +++ b/ArcFormats/ArcNPA.cs @@ -480,6 +480,8 @@ namespace GameRes.Formats.NitroPlus new byte[] { 0x05,0x0d,0x0d,0x13,0xb5,0x3d,0x8d,0x2d,0x20,0xc7,0xc7,0xcf,0x1f,0xef,0xef,0x48 }, // TOTONO new byte[] { 0x6e,0x60,0x90,0xac,0xb3,0xe3,0x83,0xd6,0xde,0x7a,0x7a,0x7f,0xef,0xbf,0xb2,0xd6 }, + // some installation npa + //new byte[] { 0xa9,0xd3,0x34,0x84,0xd6,0xea,0xaa,0xdc,0xa0,0x64,0x24,0x26,0xd6,0xae,0xae,0x76 }, // PHENOMENO new byte[] { 0x30,0x96,0xdb,0x2b,0x3d,0x81,0x02,0x74,0x47,0x2b,0xeb,0xee,0x6e,0x35,0x35,0x5d }, // NEKODA @@ -609,6 +611,8 @@ namespace GameRes.Formats.NitroPlus { m_read_mode = true; m_encrypted_length = GetEncryptedLength (entry, arc.GameId); + if (m_encrypted_length > entry.Size) + m_encrypted_length = (int)entry.Size; int key = NpaOpener.GetKeyFromEntry (entry, arc.GameId, arc.Key); m_stream = arc.File.CreateStream (entry.Offset, entry.Size);