Kingdom Hearts Union Cross Soundtrack by 13th Vessel at 10:38 PM EDT on April 4, 2019
Hi! I don't know if anyone here is interested in files from a mobile game but Kingdom Hearts Union Cross does have +100 songs from the series and some of them new and never released. I'm very interested in this title but I can't find anyone who can help me to decrypt its files.
I'd like to know if any of you here may be interested in giving a look to it.
Someone did created a tool to decrypt its format but when Square updated the game to its 2.0 version it got outdated and now the tool doesn't work:
https://github.com/GovanifY/khuxdecrypt
If any of you would like to take a look to them please tell me and I'll upload al the game files to MEGA.
Apparently KHX can't have its music dumped (the normal way at least) because its not actually stored in the application, but streamed on demand. This topic was actually brought to attention on this site some time ago: https://hcs64.com/mboard/forum.php?showthread=57731
When you install the game it weighs around 60MB, and then once you've completed the tutorial the game start downloading +2.5GB of assets, including all songs.
How do I know? Well, I'm going to explain:
The game features a 2GB file named "misc.mp4", that file contains the base data with the first complete version (Unchained x), and that file can be decrypted, I have +50 songs decrypted and fully working (they're .AKB OGG)
The issue is that when the new update apeared (Union Cross), they added a new file which stores all updates (now it weighs around 800MB), and inside that file you can find new and unreleased music, but the issue is that it uses a different encryption and no one ever tried to break it.
I say it again, if someone knows about IDA and reverse engenieering and want to try, just let me know and I'll provide all the files.
I see. Nice to know. I have been interested in this myself some time ago, but my attempts to get the music (nothing special, not trying to break encryption or anything like that lol) failed, and I lost motivation after seeing that thread.
Don't worry, it's understandable. I hope someone with reverse engenieering knowledge agrees to help, it would be really awesome. I would like to check if there's unused music as well as being able to get some HD unreleased renders.
I have a friend who told me that he decrypted the new format (the one that made the tool for the old one), but he doesn't want to make the tool and send me a lot of files for IDA and stuff. I don't know if this would be useful, but I could upload it as well as the game files.
Hmmm, the IDA files only seem to have the plain database, no tags and stuff? Well, saves me having to analyze libs.
I see what the main "BGAD" parse function (it does old decryption and seems to have other cases too) but it'll take me some time to understand the new stuff. Could you ask your friend for info or tips about the new decryption he could share?
I'm on HCS discord too but irregularly, so it's easier for me to check the forum, but if it's cumbersome I could contact you directly.
I've finally tackled this and updated the KHUX extractor to handle latest files: https://mega.nz/#!ucIHRQIC!0MvKAxU-z64EViQggVqUtIkaFUwXxOVrnhZ3ilJwcqw
It also converts images to actual PNG for fun. Main DL'd file is massive now so I added filters and stuff, otherwise it takes a lot of time to extract (use -l first to list files).
Some filenames repeat as "name(id)" but this is normal, since the game adds files instead of replacing them, sometimes making full dupes. Also some filenames won't extract correctly, can't do much but those are possibly unused, you should be able to guess the original name in the file list, and if you extract the .png files they contain an index with filenames, real filename could be there (but not always).
It can't decrypt "s000.gif" and "mXXX.png" that the game downloads (missing key), but I doubt they are images or music (compressed, logic/txt?) so I won't bother.
Fixed a last minute bug: https://mega.nz/#!XcAEFCYK!gZvxvzIIWuDKc1xO13mfMnZBfZ8hSoP022QcA8S_et0
by ShardofTruth at 12:49 PM EST on February 21, 2020
Thank you so much for updating the updating the extractor bnnm, this is a dream come true.
I'm still not finished with the whole archive but I've noticed, that the converted png images use a different transparency conversion than the one that seen on images shared by Square Enix' twitter account and which is produced by thetiny's tool: https://github.com/thethiny/Modding-Database/tree/master/KHUx/PNG2BMP https://www.reddit.com/r/KingdomHearts/comments/4wn0ir/khux_all_medals_currently_in_khux_na_data_in_png/ It's most noticeable for everything glowing, for example the shine around the medals: Old: https://drive.google.com/file/d/1U5UuAL37pWka5wB_0ytWX1Zf8cUZVqsn/view?usp=sharing New: https://drive.google.com/file/d/11AqbdEO7OfZbWIH4wshhUuCmukvmIQ26/view?usp=sharing
A bit of explanation. This extractor converts to .png by reusing the original game's decode function to create a raw image, and this image stores "pre-applied" transparency (which .bmp supports). Turns out .png doesn't support that, so when converting to .png now it de-applies transparency. However this means the output isn't 100% 1:1 lossless, but shouldn't be noticeable (+-1 transparency here and there).
You can get the original non-converted .png by using the -d option. Then you could use the original PNG2BMP, but I think the game updated the decode function (there is a bunch of seemingly unused sub-modes) so you may not get a clean image now.
by ShardofTruth at 4:27 PM EST on February 23, 2020
Thanks again, now it's working flawlessly. I had to switch to the Global version though, apparently the Japanese version uses a different encryption key for the misc.mp4.1 file.
@ShardofTruth - I tried the JP version and it seemed to work fine. Note that .mp4.1 file is just part of .mp4 and can't be extracted separatedly (you select misc.mp4, then you can use filters like -w 350000 to start from file N that could be inside misc.mp4.1).
Incidentally that version has 3 more BGM, I'll have to update the rip.
by ShardofTruth at 8:27 AM EST on February 26, 2020
Strange, I already tried both methods, even joined the two files to see if there is a change. I always get an error when I try to extract a file from the misc.mp4.1 https://drive.google.com/file/d/1d8Hr7sQwecL6WCcYf0D5MEAF_QXyzlVa/view?usp=sharing
I've fixed the "encryption" error, seems a few early files were using an earlier encryption type. If the key was wrong you'd get files with garbage data though.
The second problem is related to big file handling. I've modified a couple of things and compiled an alt _64.exe so maybe it works better for you now. Both the JP and WW versions work the same though, so I don't really get it. Make sure the files weren't modified and stuff.
by ShardofTruth at 6:29 PM EST on February 26, 2020
Thanks again, you're the best. It works flawlessly now.
JP misc.mp4 by specterfox at 12:08 PM EDT on June 25, 2021
Does anyone have any backup of the JP misc.mp4, mp4-1, and mp4-2? It has important data needed to read the assets and the database and cache from square were completely wiped.