Difference between revisions of "GRAF:Stella Games LzmaPack"
(Add LzmaPack format) |
|||
(8 intermediate revisions by 2 users not shown) | |||
Line 6: | Line 6: | ||
=== Format Specifications === | === Format Specifications === | ||
{{GRAFPageFormat|1=uint8 {1} - LZMA decoder properties size | {{GRAFPageFormat|1=uint8 {1} - LZMA decoder properties size | ||
− | + | byte {X} - LZMA decoder properties bytes {{InlineComment|(typically 5 bytes)}} | |
uint32 {4} - File count}} | uint32 {4} - File count}} | ||
Line 15: | Line 15: | ||
: int64 {8} - File content offset | : int64 {8} - File content offset | ||
: uint16 {2} - Attributes and flags {{InlineComment|(0: Uncompressed, 1: Compressed)}} | : uint16 {2} - Attributes and flags {{InlineComment|(0: Uncompressed, 1: Compressed)}} | ||
+ | |||
+ | byte {x} - File data | ||
}} | }} | ||
Line 57: | Line 59: | ||
=== Supported by Programs === | === Supported by Programs === | ||
− | * | + | * [http://forum.xentax.com/blog/?p=646 Stella Games LzmaPack Decryptor and Unpacker] |
=== Links === | === Links === | ||
Line 63: | Line 65: | ||
=== Games === | === Games === | ||
− | * [[Elementals: The Magic Key]] [[ | + | * [[Elementals: The Magic Key]] [[Stella Games LzmaPack|*.pack]] |
− | * [[Mystery of Mortlake Mansion]] [[ | + | * [[Mystery of Mortlake Mansion]] [[Stella Games LzmaPack|*.pack]] |
− | * [[Secrets of Power: Alexander the Great]] [[ | + | * [[Secrets of Power: Alexander the Great]] [[Stella Games LzmaPack|*.pack]] |
{{GRAFPageFooter}} | {{GRAFPageFooter}} | ||
− | [[Category:Complete Almost Done | + | {{DEFAULTSORT:{{PAGENAME}}}} |
− | [[Category:Platform PC | + | [[Category:Complete Almost Done]] |
− | [[Category:CE Both | + | [[Category:Platform PC]] |
− | [[Category:BMS New | + | [[Category:CE Both]] |
+ | [[Category:BMS New]] | ||
+ | [[Category:File Format]] |
Latest revision as of 13:29, 4 January 2021
Back to index | Edit this page
Contents
PACK
- Format type: Archive
- Endianness: Little-endian
Format Specifications
byte {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
Links
Games
- Elementals: The Magic Key *.pack
- Mystery of Mortlake Mansion *.pack
- Secrets of Power: Alexander the Great *.pack