Painkiller PAK
Choose archive extension:
PAK
- Format Type : Archive
- Endian Order : Little Endian
Format Specifications
Not written yet
Encryption
Filenames are encrypted
EncryptedStringCharacter (n) = OriginalStringCharacter(n) XOR (shift left (string size) + 1 + FileNumber + Code(string size) + n*2) (Where n starts at character position 0)
The Code(string size) you can get from the following algorithm:
Formula: (Size % 5)+2 String Size 0 -> Code = -2 String Size 1 -> Code = -1 String Size 2 -> Code = 0 String Size 3 -> Code = 1 String Size 4 -> Code = 2 String Size 5 -> Code = -2 String Size 6 -> Code = -1 String Size 7 -> Code = 0 . . . And so forth
C++ function to decrypt file names:
/*
Two-way algorithm. Encoding a string two times will leave it decoded.
*/
void EncodeFilename(char *EntryName, BYTE NameLength, char FileIndex)
{
BYTE n = 0;
while ( n < NameLength )
EntryName[n++] ^= FileIndex + NameLength % 5 + 2 * (n + NameLength);
}
MultiEx BMS
- A plugin processes these archives
Notes and Comments
None