Disney Infinity 3.0

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

Disney Infinity 3.0

Post by Doctor Loboto »

Well this game was just released for the PC and I was excited to have a look at the filesystem and try for models and textures...boy was I surprised...and disappointed. It's nothing like the first two, and there's no real way for me to figure out just what is what, and how to extract it. Folders upon folders of files without extensions. I was hoping someone could shed some light on this situation for me, so I can get the models of Grievous, Ultron...and maybe Vader and Sidious if he's in it...
Here's one folder with many folders within.
https://www.dropbox.com/s/b8rhjt0lgnf10cs/3f594f4f.zip?dl=0
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Disney Infinity 3.0

Post by aluigi »

Here we go :D
http://aluigi.org/bms/disney_infinity.bms

From the notes in the script:
# Notes:
# Many files from the ZIP archives (PK\xff\xff -> PK\x03\x04) can't be
# decompressed correctly. This limitation may be fixed later with a new
# verison of the script. All the other files are perfect.
#
# The kb2 files are Bink videos.
Doctor Loboto
Posts: 376
Joined: Sun May 31, 2015 2:23 am

Re: Disney Infinity 3.0

Post by Doctor Loboto »

Is there any way we can get it to ignore those 'broken' files when doing a mass extraction?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Disney Infinity 3.0

Post by aluigi »

Unfortunately I found no way.
I guess it's something related to what parts of the archive can be decrypted or not because many dds are partially valid like 9653cf49\assertscreen_0.tbuf.
It looks like it needs more work.

Anyway the other files and archives (like DBNK and bink videos) are all ok so I suspect that it's something specific of these PK archives.

In the meantime I have updated the script for removing the usage of arrays when handling the PK archives for being faster.
Panzerdroid
Posts: 66
Joined: Sun Aug 30, 2015 12:51 pm

Re: Disney Infinity 3.0

Post by Panzerdroid »

Luigi, could you please make a separate BMS script for just decryption/encryption of ZIP files?

Thanks in advance.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Disney Infinity 3.0

Post by aluigi »

That's not possible because it's not an unique normal ZIP archive, it's like a sequence of multiple 1-file only ZIP archives.

Technically:
read 8 bytes: PK ff ff + FILES
read 8 * FILES
(reset encryption)
go to each offset and read 0x1e (PK 03 04), name and data.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Disney Infinity 3.0

Post by aluigi »

aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Disney Infinity 3.0

Post by aluigi »

Ah in case you ask, yes the files of 0 bytes are really 0 bytes (method 8, comp_size 2, uncomp_size 0).
You should launch quickbms with the -D option selecting the whole folder for extracting ALL the archives.
Over 12 Gb of compressed archives is really huge.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Disney Infinity 3.0

Post by aluigi »

If someone is interested to know where the AES key comes from:

Code: Select all

    unsigned char   key_original[16] = "\xEA\x94\x1B\xF9\x99\x01\xA5\x63\x51\xBE\xB7\x68\x88\x14\x16\x04",
                    key[16];
    int     i, x = 0;
    for(i = -5; i < 0x6b; i += 7) {
        key[x++] = key_original[i & 0xf];
    }
jmgg
Posts: 48
Joined: Sun Jan 25, 2015 4:15 pm

Re: Disney Infinity 3.0

Post by jmgg »

the script is powerful! it works perfectly!! Thanks aluigi!!!
using the Cra0kalo tool I tried several figures and are all broken
1.jpg

well! they are olaf and luke :shock:
someone got better results?
Panzerdroid
Posts: 66
Joined: Sun Aug 30, 2015 12:51 pm

Re: Disney Infinity 3.0

Post by Panzerdroid »

I know the reimporting function is experimental, but unfortunately it doesn't work here :(

Still no way to export compressed chunks and then encrypt them back?
Doctor Loboto
Posts: 376
Joined: Sun May 31, 2015 2:23 am

Re: Disney Infinity 3.0

Post by Doctor Loboto »

Well if anyone is interested in figuring out the remaining formats...

Here's the other topics relating to them.

http://zenhax.com/viewtopic.php?f=5&t=1686

http://zenhax.com/viewtopic.php?f=7&t=1687
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Disney Infinity 3.0

Post by aluigi »

Reimporting the files extracted from the PK archives it's not possible.
Doctor Loboto
Posts: 376
Joined: Sun May 31, 2015 2:23 am

Re: Disney Infinity 3.0

Post by Doctor Loboto »

Any chance for the textures?
Doctor Loboto
Posts: 376
Joined: Sun May 31, 2015 2:23 am

Re: Disney Infinity 3.0

Post by Doctor Loboto »

Sorry for the double post, but I thought I should bring up the tablet versions archives are different formatting.

Here's a few samples.

https://www.dropbox.com/s/arplbohtjtevxot/DI3-APK.zip?dl=0
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Disney Infinity 3.0

Post by aluigi »

Just fixed in script 0.2.1.
The reason was simply the usage of lzma to compress the files instead of deflate, copy&paste from zip.bms did the job :D
TRDaz
Posts: 42
Joined: Fri Nov 06, 2015 1:54 pm

Re: Disney Infinity 3.0

Post by TRDaz »

The script works great, however I run into the point where the script stops and doesn't continue because of an error with a few files. I've seen that you said to use the -D command, but whenever i use the cmd with quickbms, quickbms says there is a wrong command-line argument when I write the name of the .bms file. I can't figure out why because everything is correct. Any help would be appreciated, I believe I'm missing some textures because of the error popping up before it finishes extracting.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Disney Infinity 3.0

Post by aluigi »

What's the exact command-line you are using?
The correct one is: quickbms -D script.bms input_folder output_folder
You can even create a shortcut to quickbms.exe with -D appnded in the Target property.

What are the errors you get with those few files?
TRDaz
Posts: 42
Joined: Fri Nov 06, 2015 1:54 pm

Re: Disney Infinity 3.0

Post by TRDaz »

That is what I am using, mine was:

D:\qbms>quickbms -D "C:\Users\name\Desktop\disney_infinity.bms" "C:\Program Files (x86)\Steam\steamapps\common\Disney Infinity 3.0\assets\*" "C:\Users\name\Desktop\DI output 2"

I'm not entirely sure how to do the appending of -D in the target property.

And the error i get is the following:

Image

I think the file that it is giving an error on isn't needed for models/textures, but it stops the script from continuing which may be causing me to miss files.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Disney Infinity 3.0

Post by aluigi »

remove the final \* from the input folder and it will work:
quickbms -D "C:\Users\name\Desktop\disney_infinity.bms" "C:\Program Files (x86)\Steam\steamapps\common\Disney Infinity 3.0\assets" "C:\Users\name\Desktop\DI output 2"

That error is interesting because that file is completely encrypted and not only its first 0x200 bytes.
I will check it.