GRAF:Stella Games LzmaPack

From XentaxWiki
(Redirected from Stella Games LzmaPack)
Jump to: navigation, search

Back to index | Edit this page

PACK

Format Specifications

uint8 {1}   - LZMA decoder properties size

byte {X}    - LZMA decoder properties bytes (typically 5 bytes)

uint32 {4}  - File count
// for each file
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)
byte {x}    - File data

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

Forum thread regarding format

Games

Navigation

Jump to a listing by...
All Formats - Common Formats - Standard Formats - Malformed Pages
Platforms
Microsoft:
Xbox
Xbox 360
Nintendo:
GameCube
DS
Desktop:
PC
Sega:
Dreamcast
Sony:
PlayStation
PlayStation 2
PlayStation 3
PlayStation Portable
Type
Animation - Archive - Audio - Image - Mesh - Miscellaneous - Model - Video
Endianness
Little-endian - Big-endian
BMS Scripts
Pages Without a BMS Script

All Pages with Scripts:
Recently Added Scripts

Program Support
No Known Support

MultiEx Commander - Game Extractor

Format Specification Completion
Work in Progress - Almost Done - Completed
Compression and Encryption
No Compression or Encryption Used - Unknown Compression or Encryption Used

One or Both Used:
Compression Used - Both Compression and Encryption Used