mirror of
https://github.com/crskycode/GARbro.git
synced 2025-01-11 12:39:16 +08:00
(MPK): check if *.msc entries are actually encrypted.
This commit is contained in:
parent
bbc77ecbaf
commit
01cd7d7675
@ -76,12 +76,11 @@ namespace GameRes.Formats.Propeller
|
|||||||
|
|
||||||
public override Stream OpenEntry (ArcFile arc, Entry entry)
|
public override Stream OpenEntry (ArcFile arc, Entry entry)
|
||||||
{
|
{
|
||||||
if (!entry.Name.EndsWith (".msc", StringComparison.InvariantCultureIgnoreCase))
|
var input = arc.File.CreateStream (entry.Offset, entry.Size);
|
||||||
return base.OpenEntry (arc, entry);
|
if (!entry.Name.EndsWith (".msc", StringComparison.InvariantCultureIgnoreCase)
|
||||||
var data = arc.File.View.ReadBytes (entry.Offset, entry.Size);
|
|| 0x88 != input.PeekByte())
|
||||||
for (int i = 0; i < data.Length; ++i)
|
return input;
|
||||||
data[i] ^= 0x88;
|
return new XoredStream (input, 0x88);
|
||||||
return new BinMemoryStream (data, entry.Name);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user