6 hours ago6 hr Localization Hi everyone,I’m hoping someone here might be able to help me extract the textures from this file. The main file is the .pck, but it also comes with two additional files, .dir and .tbl, so I’ve attached all three just in case they are needed.I’ve also been investigating the format with the help of AI, and this is what I’ve managed to discover so far:Good progress so far: I found the ZpakFileSystem class (the game’s custom file reader), located its vtable, and traced it to the readFile(dirPath, index) function. This appears to be the function that looks up an entry in the .dir table using a binary search over the records, and then calls another object to read/decompress the data from the .pck.If anyone has experience with this kind of custom archive format, reverse engineering, or has any idea how these .pck / .dir / .tbl files are structured, I would really appreciate any help or suggestions on how to proceed.My main goal is simply to extract the textures from the archive. Any help for an a script for quickbms or py?Thanks a lot in advance for taking the time to look at this! Any help would be greatly appreciated. :) pack_prog_res.rar
5 hours ago5 hr Localization Solution The .pck is a ZIP file in disguise. However, two things were changed.1. Every PK signature (50 4B) is written as OD (4F 44).2. The zlib header byte 78 is written as 02Plus one structural change: local file headers are omitted entirely. Entry offsets point straight at the raw deflate payload.The .dir and .tbl files are redundant lookup caches.Use the script attached to extract everything/or just the textures.python zpak_extract.py pack_prog_res.pck # extract everythingpython zpak_extract.py pack_prog_res.pck -o out --verify # + check every CRCpython zpak_extract.py pack_prog_res.pck --list # list, don't extractpython zpak_extract.py pack_prog_res.pck --textures # dds/tga/bmp/png/jpg only zpak_extract.py
5 hours ago5 hr 4 minutes ago, Hazza12555 said:The .pck is a ZIP file in disguise. However, two things were changed.1. Every PK signature (50 4B) is written as OD (4F 44).2. The zlib header byte 78 is written as 02Plus one structural change: local file headers are omitted entirely. Entry offsets point straight at the raw deflate payload.The .dir and .tbl files are redundant lookup caches.Use the script attached to extract everything/or just the textures.python zpak_extract.py pack_prog_res.pck # extract everythingpython zpak_extract.py pack_prog_res.pck -o out --verify # + check every CRCpython zpak_extract.py pack_prog_res.pck --list # list, don't extractpython zpak_extract.py pack_prog_res.pck --textures # dds/tga/bmp/png/jpg onlyzpak_extract.pyGood for you.
4 hours ago4 hr Author Localization Hi @Hazza12555 Thank you so much for your help! It worked perfectly and extracted all the textures without any errors! I hope you have a great day! You’re very smart! Best regards!
Create an account or sign in to comment