PAC

This type of archives found in Doddler's Unity engine (used in Mangagamer releases of Really? Really!, Cartagra, Kara no Shoujo 2, Free Friends, d2b VS Deardrops -Cross the Future-).

Archive files usually found in GameData dir and have .pac extension.

Here is the structure for PAC (MGPK):

Header


Offset Length Type Description
0x00 0x04 String Magic bytes ["MGPK"]
0x04 0x04 UInt32 Format Version (0,1)
0x08 0x04 UInt32 Number of entries

After that immediately start entry table, having the following format for entries:

Entry format


Offset Length Type Description
0x00 0x20 String Filename (for v1 first byte is length)
0x20 0x04 UInt32 Entry Data Offset
0x24 0x04 UInt32 Entry Data Size (for v1) or Image Width (if v0 and if file is image)
0x28 0x04 UInt32 Image Height (v0 only)
0x2c 0x04 UInt32 Entry Data Size (v0 only)

Also images and textes inside archives are crypted with XOR key (for v1 it get +27 to values after all key values were applied), and texts additionally packed with CLZF2 algorithm.

In attachment is PHP script, which could extract all these. See .bat file for usage examples. You will need PHP to run that.

ВложениеРазмер
MG_Unpacker.zip1.99 КБ