A similar to Loong CPK file , help to unpack
Client URL: http://download.ccjoy.com/shuguang/Clie ... 140804.exe
MRCS Online newer CPK file, may be something different to Loong OL CPK file format
CPKHeader encryption
sample file: http://www.mongofiles.com/file/76687/map.zip
The original Loong CPK format
Code: Select all
CPK file formats:
// --------------------------------------------------------------------------------
// CPK file header (struct tagCPKHeader)
// --------------------------------------------------------------------------------
// Table item 0 (struct tagCPKTable)
// --------------------------------------------------------------------------------
// Table item 1
// --------------------------------------------------------------------------------
// Table item 2
// --------------------------------------------------------------------------------
// Table item 3
// --------------------------------------------------------------------------------
// ...
// --------------------------------------------------------------------------------
// ...
// --------------------------------------------------------------------------------
// the first file content (compression or not compressed)
// a simple file name (not including directory)
// Additional information - ExtraInfo
// --------------------------------------------------------------------------------
// the second file content (compression or not compressed)
// a simple file name (not including directory)
// Additional information - ExtraInfo
// --------------------------------------------------------------------------------
// for possible period of free space
// --------------------------------------------------------------------------------
// the third file content (compressed or not compressed)
// a simple file name (not including directory)
// Additional information - ExtraInfo
// --------------------------------------------------------------------------------
// ...
// --------------------------------------------------------------------------------
// CPK file header structure
Struct tagCPKHeader
{
DWORD dwLable; // file type logo (0x1a545352)
DWORD dwVersion; // version number
DWORD dwTableStart; // file table starting byte
DWORD dwBlockStart; // The starting address of data block
DWORD dwMaxTableNum; // maximum number of files stored
DWORD dwFileNum; // the current file number
DWORD dwReserved [32]. // to keep
};
// CPK file table structure
Struct tagCPKTable
{
DWORD dwCRC; // CRC collation
DWORD dwFlag; // logo
DWORD dwFatherCRC; // the parent directory of CRC
DWORD dwStartPos; // start location
DWORD dwPackedSize; // compressed length
DWORD dwOriginSize; // the original file size
DWORD dwExtraInfoSize; // Size of additional information
};
// tagCPKTable dwFlag symbol of description:
// 0000, 0000-0000, 0000-0000, 0000-0000, 0001 (0 x0001) this file is valid
// 0000, 0000-0000, 0000-0000, 0000-0000, 0011 (0 x0002) this is a directory and effective
// 0000, 0000-0000, 0000-0000, 0000-0000, 0000 (0 x8000) CRC
// high 16 as filter number
// in addition to the file ontology, filename file additional information
Struct tagFileExtraInfo
{
FILETIME CreateTime; // set up time
FILETIME LastAccessTime; // the last access time
FILETIME LastWriteTime; // the last modified time
FILETIME AddToPackageTime; // join package time
FILETIME DelFromPackageTime; // remove time from the list of packages
DWORD dwReserved [4]. // to keep
};