Okage: Shadow King .XPF tool (Release)

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
Inuk Syooperstar
Posts: 3
Joined: Wed Sep 09, 2020 10:26 am

Okage: Shadow King .XPF tool (Release)

Post by Inuk Syooperstar »

THIS THREAD IS OLD, TOOL HAS BEEN MOVED HERE: viewtopic.php?f=17&t=14162

I've fully reverse engineered the decompression function used for Okage: Shadow King, and I've ported it to both C and Python.
The compression is used to compress all files in the game's XPF archives, which is otherwise very simple to deal with. Someone posted about it a while back but it didn't get fully solved because of the compression present.

My C is weak to the point of being embarrassing (hence not attaching a full tool), but the Python script is fully capable of extracting the .XPF archives together with the decompressor function.
I've attached both; the C++ function has the advantage of being short and easier to read, and the Python script has the advantage of being a fully usable tool for an end user.

The Python script also has a working XPF packer with a barebones compressed stream writer (the equivalent of a zip's "store", it just increases the filesize) - I'm interested in developing a real compressor function, but that can wait.

I'm not sure what to do now. Can the decompresser function get added to QuickBMS' repertoire?