ZenHAX

Free Game Research Forum | Official QuickBMS support | twitter @zenhax | SSL HTTPS://zenhax.com
It is currently Tue Mar 02, 2021 7:31 am

All times are UTC




Post new topic  Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Sat Oct 12, 2019 9:59 pm 

Joined: Tue Oct 08, 2019 7:50 pm
Posts: 4
I initially wanted to post here hoping to receive an advice on extracting a video file, but in the process of writing my message i have discovered that the decryption key for the game in question have been made public, which led me to successful extraction of the the needed file. However, for the sake of those who might potentially run into the same issues i did, i am posting my original message as well as further steps i've performed.

Original message wrote:
Hello. Lately i've taken interest in extracting intro videos of japanese video games. I've had a number of successes following the guides and using the tools i've found online and managed to successfully get the video out of few games on Android, Unreal Engine 4 and some fighting games. But, having no prior experience in data mining, i've hit a wall with one case and hope somebody can help me with this.

The video i am trying to extract is in .mv format of a recently released Touhou Cannonball game for Android. Here's what i tried:

1. Feeding the file to VGMToolbox' Video Demultiplexer using "USM (CRI Movie 2)" setting (all other games on Android that i've checked used this one). The output was two files: first in .m2v format, second in .bin. Opening the .m2v file in video player showed just a black screen with no sound, however MediaInfo was able to read the video parameters such as resolution, bitrate, framerate, aspect ratio and others. I tried opening .bin file in Hex editor, but couldn't see anything useful there.

2. Then i opened the original .mv file in a hex editor. There, 2 words stood out for me: CRID and CRIUSF_DIR_STREAM. I looked it up on the search engine and discovered the "CRI USM Decrypter" tool, so next i fed the file to it and got three files in the output: .m2v ; .wav ; .ini. This time the .m2v file managed to play but appeared very corrupted- almost all of the video was just plain green colour. The .wav appeared to be 0 bytes in size and completely empty. The .ini file contained what appears to be the structure of the original file with multiple parameters under headers like "CRIUSF_DIR_STREAM", "VIDEO_HDRINFO", "AUDIO_HDRINFO", "VIDEO_SEEKINFO" and "AUDIO_HEADER". I've attached this file.


3. Seeing how the description of the tool and various guides about extracting files from mobile games mentioned the decryption keys, i've looked for them online and found them just as i was initially writing this post (thank you hca_keys.h maintainers). i then applied the decryption key to the same process as step 2 (the tool actually asks you for decryption key but i just skipped that step before) and this time the playback of the output .m2v file was successful! However, the output .wav file is still 0 bytes in size, and the .m2v contains only video, not the audio.

4. Looking back at the output i got from step 1 i made an assumption that the .bin file might in fact be the audio i am missing. Сonsidering what i've read about common Android game's audio file formats and processing them, i changed that file's extension to .hca and processed it with another tool- DereTore, applying the discovered decryption key once again. To my surprise, it have successfully output a readable .wav file containing the matching audio for the video i strived to extract.

So, that's it. Hoping whoever might find this information useful will find it.

TL;DR (sort of):
  1. Process the .mv file with CRI USM Decrypter using the decryption key: use Decryption.bat on your file, when it asks for decryption key, enter the hexadecimal value. As of the process of acquiring said keys, i've no idea but to look up "hca_keys.h"- it might contain the needed one. In the output you should get the "%FILENAME%.demux" folder containing the decrypted .m2v video.
  2. Process the .mv file with VGMToolbox's Video Demultiplexer (located at VGMToolbox->Misc. Tools->Stream Tools): Select "USM (CRI Movie 2)" in Format field and input the .mv file. In the output you should get 2 files: .m2v and .bin
  3. Change .bin file's resolution to .hca and process it with DereTore tool's hca2wav.exe, inputting the aforementioned decryption key as -a and -b parameters (input the first 8 hex digits of key for -b parameter and the last 8 hex digits of key for -a parameter). In the output you should get a decrypted .wav audio file.


Attachments:
Toho_PV_nouhin_H264_0412.usm.ini [8.47 KiB]
Downloaded 184 times
Top
   
PostPosted: Thu Dec 26, 2019 2:59 pm 

Joined: Thu Dec 26, 2019 2:58 pm
Posts: 1
That’s great that you have described top resume writing services and every process step by step. Normally people didn’t disclose the info in one go so easily and keep some key points in their hand. But you openly shared everything.


Top
   
PostPosted: Wed Feb 10, 2021 5:50 am 

Joined: Tue Dec 22, 2020 8:02 pm
Posts: 12
I can't find that CRI USM Decrypter anywhere.... :/ any chance you still have it OP?


Top
   
PostPosted: Wed Feb 10, 2021 9:51 pm 

Joined: Sat Sep 28, 2019 7:00 pm
Posts: 310
@Eleiyas: It seems original version is outdated, there is mod from bnnm with some fixes and additional parameters.


Attachments:
CRID(.usm)Demux Tool v1.02-mod.zip [361.44 KiB]
Downloaded 20 times

_________________
You can request AES keys on rin forums (the list with keys is also there)
AES keys finder and latest UE4 bms scripts: in this post
Top
   
PostPosted: Fri Feb 12, 2021 6:32 pm 

Joined: Tue Dec 22, 2020 8:02 pm
Posts: 12
spiritovod wrote:
@Eleiyas: It seems original version is outdated, there is mod from bnnm with some fixes and additional parameters.


you're a star!

now I just need to understand this hex techno-babble of 0x140 and repeating 0x20 to try and figure out where the keys are >.<


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 5 posts ] 

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Limited