mirror of
https://github.com/crskycode/GARbro.git
synced 2025-01-12 04:49:32 +08:00
(NoaOpener): additional encryption schemes.
This commit is contained in:
parent
eee1bdae38
commit
15b6d6156f
@ -65,7 +65,7 @@ namespace GameRes.Formats.Entis
|
|||||||
public override string Tag { get { return "NOA"; } }
|
public override string Tag { get { return "NOA"; } }
|
||||||
public override string Description { get { return "Entis GLS engine resource archive"; } }
|
public override string Description { get { return "Entis GLS engine resource archive"; } }
|
||||||
public override uint Signature { get { return 0x69746e45; } } // 'Enti'
|
public override uint Signature { get { return 0x69746e45; } } // 'Enti'
|
||||||
public override bool IsHierarchic { get { return false; } }
|
public override bool IsHierarchic { get { return true; } }
|
||||||
public override bool CanCreate { get { return false; } }
|
public override bool CanCreate { get { return false; } }
|
||||||
|
|
||||||
public NoaOpener ()
|
public NoaOpener ()
|
||||||
@ -76,12 +76,9 @@ namespace GameRes.Formats.Entis
|
|||||||
public static readonly Dictionary<string, Dictionary<string, string>> KnownKeys =
|
public static readonly Dictionary<string, Dictionary<string, string>> KnownKeys =
|
||||||
new Dictionary<string, Dictionary<string, string>> {
|
new Dictionary<string, Dictionary<string, string>> {
|
||||||
{ arcStrings.NOAIgnoreEncryption, new Dictionary<string, string>() },
|
{ arcStrings.NOAIgnoreEncryption, new Dictionary<string, string>() },
|
||||||
{ "Yatohime Zankikou", new Dictionary<string, string> {
|
{ "Alea Akaki Tsuki o Haruka ni Nozomi", new Dictionary<string, string> {
|
||||||
{ "data1.noa", "arcdatapass" },
|
{ "data2.noa", "pnnAiYVqktMdLlVq9pnrXs1795vhu8ZluLh3MxmXyBBrhrhLoP2rlGn5dxcBP6d1cAAz08TMRIXNUFatVdJFWAwVphtAh4hx5NHMmLs8LoBE2KHAA8GnKJB1PpKeyMHu" },
|
||||||
{ "data6.noa", "cfe7231hf9qccda" },
|
{ "data4.noa", "yEbgydEFtIq3YiGUNMpCarJwR9mZbufPrbXtsoqbrJwT4F278kOWIgYzLtm1nP1Hns81u3F4Stwc42gdtrWIbnp9XfX3LsKiZe1TFUyrlTqsbhX8R8dEAVxLk9SVvCE7" } } },
|
||||||
{ "data7.noa", "ceiuvw86680efq0hHDUHF673j" } } },
|
|
||||||
{ "You! Apron Chakuyou", new Dictionary<string, string> {
|
|
||||||
{ "containerb.noa", "7DQ1Xm7ZahIv1ZwlFgyMTMryKC6OP9V6cAgL64WD5JLyvmeEyqTSA5rUbRigOtebnnK4MuOptwsbOf4K8UBDH4kpAUOQgB71Qr1qxtHGxQl8KZKj6WIYWpPh0G3JOJat" } } },
|
|
||||||
{ "Do S Ane to Boku no Hounyou Kankei", new Dictionary<string, string> {
|
{ "Do S Ane to Boku no Hounyou Kankei", new Dictionary<string, string> {
|
||||||
{ "d02.dat", "vwerc7s65r21bnfu" },
|
{ "d02.dat", "vwerc7s65r21bnfu" },
|
||||||
{ "d03.dat", "ctfvgbhnj67y8u" } } },
|
{ "d03.dat", "ctfvgbhnj67y8u" } } },
|
||||||
@ -90,6 +87,12 @@ namespace GameRes.Formats.Entis
|
|||||||
{ "d03.dat", "gaivnwq7365e021gf" } } },
|
{ "d03.dat", "gaivnwq7365e021gf" } } },
|
||||||
{ "Konneko", new Dictionary<string, string> {
|
{ "Konneko", new Dictionary<string, string> {
|
||||||
{ "script.noa", "convini_cat" } } },
|
{ "script.noa", "convini_cat" } } },
|
||||||
|
{ "Yatohime Zankikou", new Dictionary<string, string> {
|
||||||
|
{ "data1.noa", "arcdatapass" },
|
||||||
|
{ "data6.noa", "cfe7231hf9qccda" },
|
||||||
|
{ "data7.noa", "ceiuvw86680efq0hHDUHF673j" } } },
|
||||||
|
{ "You! Apron Chakuyou", new Dictionary<string, string> {
|
||||||
|
{ "containerb.noa", "7DQ1Xm7ZahIv1ZwlFgyMTMryKC6OP9V6cAgL64WD5JLyvmeEyqTSA5rUbRigOtebnnK4MuOptwsbOf4K8UBDH4kpAUOQgB71Qr1qxtHGxQl8KZKj6WIYWpPh0G3JOJat" } } },
|
||||||
};
|
};
|
||||||
|
|
||||||
public override ArcFile TryOpen (ArcView file)
|
public override ArcFile TryOpen (ArcView file)
|
||||||
@ -100,7 +103,7 @@ namespace GameRes.Formats.Entis
|
|||||||
if (0x02000400 != id)
|
if (0x02000400 != id)
|
||||||
return null;
|
return null;
|
||||||
var reader = new IndexReader (file);
|
var reader = new IndexReader (file);
|
||||||
if (!reader.ParseDirEntry (0x40, "") || 0 == reader.Dir.Count)
|
if (!reader.ParseRoot() || 0 == reader.Dir.Count)
|
||||||
return null;
|
return null;
|
||||||
if (!reader.HasEncrypted)
|
if (!reader.HasEncrypted)
|
||||||
return new ArcFile (file, this, reader.Dir);
|
return new ArcFile (file, this, reader.Dir);
|
||||||
@ -157,7 +160,8 @@ namespace GameRes.Formats.Entis
|
|||||||
uint decoded = pBSHF.DecodeBSHFCodeBytes (buf, nTotalBytes);
|
uint decoded = pBSHF.DecodeBSHFCodeBytes (buf, nTotalBytes);
|
||||||
if (decoded < nTotalBytes)
|
if (decoded < nTotalBytes)
|
||||||
throw new EndOfStreamException ("Unexpected end of encrypted stream");
|
throw new EndOfStreamException ("Unexpected end of encrypted stream");
|
||||||
/*
|
|
||||||
|
/* Something wrong with preceding length calculation, resulting CRC doesn't match
|
||||||
byte[] bufCRC = new byte[4];
|
byte[] bufCRC = new byte[4];
|
||||||
int iCRC = 0;
|
int iCRC = 0;
|
||||||
for (int i = 0; i < buf.Length; ++i)
|
for (int i = 0; i < buf.Length; ++i)
|
||||||
@ -214,7 +218,12 @@ namespace GameRes.Formats.Entis
|
|||||||
m_file = file;
|
m_file = file;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool ParseDirEntry (long dir_offset, string cur_dir)
|
public bool ParseRoot ()
|
||||||
|
{
|
||||||
|
return ParseDirEntry (0x40, "");
|
||||||
|
}
|
||||||
|
|
||||||
|
private bool ParseDirEntry (long dir_offset, string cur_dir)
|
||||||
{
|
{
|
||||||
if (!m_file.View.AsciiEqual (dir_offset, "DirEntry"))
|
if (!m_file.View.AsciiEqual (dir_offset, "DirEntry"))
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user