GRAF:Stella Games LzmaPack: Difference between revisions
imported>GMMan m (moved GRAF:LzmaPack to GRAF:Stella Games LzmaPack: Follow conventions, for reals) |
imported>GMMan No edit summary |
||
| Line 64: | Line 64: | ||
=== Games === | === Games === | ||
* [[Elementals: The Magic Key]] [[LzmaPack| | * [[Elementals: The Magic Key]] [[Stella Games LzmaPack|*.pack]] | ||
* [[Mystery of Mortlake Mansion]] [[LzmaPack| | * [[Mystery of Mortlake Mansion]] [[Stella Games LzmaPack|*.pack]] | ||
* [[Secrets of Power: Alexander the Great]] [[LzmaPack| | * [[Secrets of Power: Alexander the Great]] [[Stella Games LzmaPack|*.pack]] | ||
{{GRAFPageFooter}} | {{GRAFPageFooter}} | ||
[[Category:Complete Almost Done|GRAF:LzmaPack]] | [[Category:Complete Almost Done|GRAF:Stella Games LzmaPack]] | ||
[[Category:Platform PC|GRAF:LzmaPack]] | [[Category:Platform PC|GRAF:Stella Games LzmaPack]] | ||
[[Category:CE Both|GRAF:LzmaPack]] | [[Category:CE Both|GRAF:Stella Games LzmaPack]] | ||
[[Category:BMS New|GRAF:LzmaPack]] | [[Category:BMS New|GRAF:Stella Games LzmaPack]] | ||
Revision as of 07:26, 4 December 2012
Back to index | Edit this page
PACK
- Format type: Archive
- Endianness: Little-endian
Format Specifications
uint8 {X} - LZMA decoder properties bytes (typically 5 bytes)
uint32 {4} - File count- char {X} - File name (.NET style string with size byte followed by characters)
- int64 {8} - File length
- int64 {8} - Compressed length
- int64 {8} - File content offset
- uint16 {2} - Attributes and flags (0: Uncompressed, 1: Compressed)
Programmatic Extraction
You can use the game engine itself to extract files. From one of the games listed below, obtain either LuckySoftCore.dll or Engine.dll (name depends on game) and reference it in your .NET code. The following shows how to call the engine function to obtain a handle to the LzmaPack.
using EngineBase; //using LuckySoftCore; using EngineBase.Core; // using LuckySoftCore.Core; using EngineBase.Compression; // using LuckySoftCore.Compression; IDirectoryInfo repo = LzmaPack.OpenLZMAPack(strPathToLzmaPack);
IDirectoryInfo is similar to System.IO.DirectoryInfo, except it allows arbitrary underlying implementations, so you could read files from e.g. LzmaPacks.
Notes and Comments
Archive files of this format out in the wild is encrypted with an XOR stream cipher based on an Mersenne Twister implementation. You can find a Stream class for decryption in the Engine named GammaXoringStream.
MultiEx BMS Script
Note: not working. Decoder properties are stored once at the beginning of the archive instead of in each file.
# Lucky Soft/Stella Games LzmaPack (unfinished) # script for QuickBMS http://quickbms.aluigi.org # (C) 2012 GMMan comtype lzma get DECODERPROPSLEN byte goto DECODERPROPSLEN + 1 get FILECOUNT long for N = 1 to FILECOUNT get NAMELEN byte getdstring NAME NAMELEN get REALSIZE longlong get COMPRESSEDSIZE longlong get ADDRINSTREAM longlong get ATTRANDFLAGS short if ATTRANDFLAGS = 0 log NAME ADDRINSTREAM REALSIZE else clog NAME ADDRINSTREAM COMPRESSEDSIZE REALSIZE endif next N
Supported by Programs
- Lucky Soft LzmaPack Decryptor and Unpacker
Links
Games
- Elementals: The Magic Key *.pack
- Mystery of Mortlake Mansion *.pack
- Secrets of Power: Alexander the Great *.pack