Page 1 of 1

War For Kingship .BIN decompression?

Posted: Sun Oct 17, 2021 3:20 pm
by rayleigh
Hi
I want to translate the game in my speak but the .BIN Files are Compressed?

Here is the game:
https://apkpure.com/war-for-kingship-af ... px.skzh.en


Sample file:
https://mega.nz/file/q6ZCwRRC#dq4rf50ZI ... ASNgEvawNs

Re: War For Kingship .BIN decompression?

Posted: Tue Dec 28, 2021 5:09 pm
by ikskoks
Well, this game can't be run anymore. It's crashing on the update screen and it was removed from the google play store.
So if you can't launch the game, you don't need to translate it - problem solved. :D

Re: War For Kingship .BIN decompression?

Posted: Wed Aug 10, 2022 5:44 pm
by barncastle
I know this is an old thread for a dead game but it was on the wiki's list of games with unknown formats so I thought I'd take a look anyway.

The game is built with Egret Engine, a HTML5/TypeScript mobile game development engine. As such, all of the game's logic is found in minified JavaScript files making this pretty trivial to investigate.

The BIN files themselves are binary archives that contain a range of different UI assets. They are always in big endian and are usually zlib (raw inflate) compressed post-header. I've extracted, beautified and refactored the core functions for parsing these files which can be found here with UIPackage.loadPackage being the primary method. Whilst this isn't functional code, there is enough information for someone to create tooling if ever desired.

Re: War For Kingship .BIN decompression?

Posted: Sat Aug 13, 2022 12:37 pm
by ikskoks
Here's the article for reference:
http://wiki.xentax.com/index.php/War_For_Kingship_BIN

Thanks for sharing, barncastle :)