Dragon Ball Heroes: Ultimate Mission 2 (*.bin)

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
Doctor Loboto
Posts: 376
Joined: Sun May 31, 2015 2:23 am

Dragon Ball Heroes: Ultimate Mission 2 (*.bin)

Post by Doctor Loboto »

According to other open, though basically useless, folders in the filesystem, this game uses semi-known formats. However they all lie within these archives. Can anyone find a way to unpack them?

https://www.dropbox.com/s/teqe6i6mv6x7kug/DBHUM2arc.zip?dl=0
Doctor Loboto
Posts: 376
Joined: Sun May 31, 2015 2:23 am

Re: Dragon Ball Heroes: Ultimate Mission 2 (*.bin)

Post by Doctor Loboto »

Sorry to bump, but I really need help with this and I can't really get it anywhere else...
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Dragon Ball Heroes: Ultimate Mission 2 (*.bin)

Post by aluigi »

It's just a container so it's not really possible to extract the data but I have written a script to find all the "3DS-LZ" magics and uncompressing them. Basically the result is just an extractor :D
http://aluigi.org/bms/3ds_lz.bms
funion_Ring
Posts: 11
Joined: Sun Jan 01, 2017 1:07 am

Re: Dragon Ball Heroes: Ultimate Mission 2 (*.bin)

Post by funion_Ring »

aluigi wrote:It's just a container so it's not really possible to extract the data but I have written a script to find all the "3DS-LZ" magics and uncompressing them. Basically the result is just an extractor :D
http://aluigi.org/bms/3ds_lz.bms

what's the compression algorithm?
I can't find any documentation for the lz77wii.
I want to write a python script for compressing the file back into the bin archive.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Dragon Ball Heroes: Ultimate Mission 2 (*.bin)

Post by aluigi »

It's a set of compresison algorithms used by Nintendo, they are documented and implemented in various programming language all over github.
For example http://code.google.com/p/dsdecmp/, http://wiibrew.org/wiki/Wii.py, quickbms src\include\nintendo.c (obviously :D ) and so on.
funion_Ring
Posts: 11
Joined: Sun Jan 01, 2017 1:07 am

Re: Dragon Ball Heroes: Ultimate Mission 2 (*.bin)

Post by funion_Ring »

aluigi wrote:It's a set of compresison algorithms used by Nintendo, they are documented and implemented in various programming language all over github.
For example http://code.google.com/p/dsdecmp/, http://wiibrew.org/wiki/Wii.py, quickbms src\include\nintendo.c (obviously :D ) and so on.

sorry for asking again...
I checked the source code, but there are 6 variations... :?
#define WII_NONE_TAG 0x00
#define WII_LZ77_TAG 0x10
#define WII_LZSS_TAG 0x11
#define WII_HUFF_TAG 0x20
#define WII_RLE_TAG 0x30
#define WII_040_TAG 0x40

I tried comtype scan, but none of those 6 gives me a "nice" dump....

would you mind tell me which one is called within the script??
thanks!

here is a cut off font file sample: https://puu.sh/w57Iz/e7e54d1ca5.bin
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Dragon Ball Heroes: Ultimate Mission 2 (*.bin)

Post by aluigi »

The reasons are:
- you have a "3DS-LZ\r\n" header, you must provide the raw compressed data (full file - starting 8 bytes)
- lz77wii and the algorithms you mentioned are like zlib and deflate: zlib is deflate plus header, lz77wii is those algos plus header
- in short if you want to use WII_RLE_TAG you have probably start to comtype_scan2 with the data of the file starting at offset 0xb
funion_Ring
Posts: 11
Joined: Sun Jan 01, 2017 1:07 am

Re: Dragon Ball Heroes: Ultimate Mission 2 (*.bin)

Post by funion_Ring »

aluigi wrote:The reasons are:
- you have a "3DS-LZ\r\n" header, you must provide the raw compressed data (full file - starting 8 bytes)
- lz77wii and the algorithms you mentioned are like zlib and deflate: zlib is deflate plus header, lz77wii is those algos plus header
- in short if you want to use WII_RLE_TAG you have probably start to comtype_scan2 with the data of the file starting at offset 0xb

thanks alot!!!!!!! :D