CRI CPK script updated

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

CRI CPK script updated

Post by aluigi »

http://aluigi.org/papers/bms/cpk.bms

I have just finished to update the cpk script for supporting some games like Naruto Storm Generations and probably also others.
The update is derived from a modified version of the utf_tab tool released by "IngPereira".

This format is the ITOC one, that contains the files in new chunks called FilesL, FilesH, DataL and DataH... quite chaotic but I have been able to simplify the script as soon as possible.
sigroon365
Posts: 330
Joined: Fri Nov 21, 2014 4:03 am

Re: CRI CPK script updated

Post by sigroon365 »

aluigi wrote:http://aluigi.org/papers/bms/cpk.bms

I have just finished to update the cpk script for supporting some games like Naruto Storm Generations and probably also others.
The update is derived from a modified version of the utf_tab tool released by "IngPereira".

This format is the ITOC one, that contains the files in new chunks called FilesL, FilesH, DataL and DataH... quite chaotic but I have been able to simplify the script as soon as possible.


Hmm.. unfortunately, it still doesn't work for Naruto shippuden Ultimate Ninja STORM 3 Full Burst version.
Image
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: CRI CPK script updated

Post by aluigi »

Upload the sample.
sigroon365
Posts: 330
Joined: Fri Nov 21, 2014 4:03 am

Re: CRI CPK script updated

Post by sigroon365 »

aluigi wrote:Upload the sample.


Ok, here are two sample files.
https://www.sendspace.com/file/6a1gib
https://www.sendspace.com/file/jou6j8
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: CRI CPK script updated

Post by aluigi »

What I have here is a different error.

dataRegion.egg is not a CPK archive ("EGGA").

While with dataRegion_win32.cpk there is a crash in the decompression function because the archive says that one file is compressed while it's not true.
I'm checking if it's possible to bypass this problem, it's the first time I see this issue.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: CRI CPK script updated

Post by aluigi »

I have updated the script to version 0.3a where I have added a work-around (not a solution).
sigroon365
Posts: 330
Joined: Fri Nov 21, 2014 4:03 am

Re: CRI CPK script updated

Post by sigroon365 »

aluigi wrote:What I have here is a different error.

dataRegion.egg is not a CPK archive ("EGGA").

While with dataRegion_win32.cpk there is a crash in the decompression function because the archive says that one file is compressed while it's not true.
I'm checking if it's possible to bypass this problem, it's the first time I see this issue.


Ah, dataRegion.egg is just a zip files. Unzip it by winrar then you can get dataRegion.cpk file.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: CRI CPK script updated

Post by aluigi »

No it's not a ZIP or RAR file.
sigroon365
Posts: 330
Joined: Fri Nov 21, 2014 4:03 am

Re: CRI CPK script updated

Post by sigroon365 »

aluigi wrote:No it's not a ZIP or RAR file.


Here is a rar file. You can get dataRegion.cpk if you unzip dataRegion.rar.
https://www.dropbox.com/s/06ffv1fk5p7dus7/dataRegion.rar?dl=0
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: CRI CPK script updated

Post by aluigi »

The current script works perfectly with dataRegion.cpk.

Thanks for the idea of the EGG archive made by Alzip, I made a script for it so now it's possible to use quickbms to extract the files of this archive :)
sigroon365
Posts: 330
Joined: Fri Nov 21, 2014 4:03 am

Re: CRI CPK script updated

Post by sigroon365 »

aluigi wrote:The current script works perfectly with dataRegion.cpk.

Thanks for the idea of the EGG archive made by Alzip, I made a script for it so now it's possible to use quickbms to extract the files of this archive :)


You're welcome. Have a good one. :D
sigroon365
Posts: 330
Joined: Fri Nov 21, 2014 4:03 am

Re: CRI CPK script updated

Post by sigroon365 »

Thanks a lot! Your bms script works, however, I think that there are so many files which is needed to be unpacked.
For example, there is adv_tutorial03.xfbin file in the dataRegion\data\ui\tutorial\WIN32\eng folder.
You might also find it since you had the dataRegion.cpk file.
Although I tried to open it by Noesis, it was impossible for me to view it since it's header was still CPK.
Image

So, I unpacked *.xfbin file by quickbms, however, it split *.xfbin into several files.
Image

After I renamed 00000000.nuc to 00000000.xfbin, I could see it by Noesis, but it was croped.
Image

So, I combined 00000000.nuc+00000001.dat+00000002.vap into the one file and renamed it to combine.xfbin then I could see the original image.
Image

As a result, I think that a little modification makes your bms script perfect! :D
Here is sample files. https://www.sendspace.com/file/22uthh

Actually, not all *.xfbin files have CPK header but most of them have CPK header.
Some *.xfbin files have NUCC header. For example, name_1ssk_b.xfbin file in dataRegion\data\ui\name\b_name\eng.
Image

Anyway, thanks for your great works!
sigroon365
Posts: 330
Joined: Fri Nov 21, 2014 4:03 am

Re: CRI CPK script updated

Post by sigroon365 »

I found one more odd thing that *.xfbin files could be unpacked but reimporting was not work.

Unpacking messageInfo.bin.xfbin
Image

Reimporting error
Image

Reimporting works on dataRegion.cpk but it does not work on *.xfbin files.
chrrox
Posts: 388
Joined: Thu Aug 07, 2014 10:28 pm

Re: CRI CPK script updated

Post by chrrox »

There seems to be a new container cri is using.
I believe they encrypted the file names again.
Here are some samples.
https://www.sendspace.com/file/cktrwv
sigroon365
Posts: 330
Joined: Fri Nov 21, 2014 4:03 am

Re: CRI CPK script updated

Post by sigroon365 »

aluigi wrote:The current script works perfectly with dataRegion.cpk.

Thanks for the idea of the EGG archive made by Alzip, I made a script for it so now it's possible to use quickbms to extract the files of this archive :)


Can you look at these files? There are no UTF-8 signature in cpk files.
Strom3 Revolution https://www.sendspace.com/file/jwsqtf
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: CRI CPK script updated

Post by aluigi »

Currently I prefer to not check them because it's not clear if this is a new version of the format or some customizations made by some games.
The cpk script was simply a bms version of the tool written by hcs64 who did all the job.
sigroon365
Posts: 330
Joined: Fri Nov 21, 2014 4:03 am

Re: CRI CPK script updated

Post by sigroon365 »

aluigi wrote:Currently I prefer to not check them because it's not clear if this is a new version of the format or some customizations made by some games.
The cpk script was simply a bms version of the tool written by hcs64 who did all the job.


I think ninja storm3 revolution's compression is not different from storm3 execpt header information.
Each individual file which is contained in dataregion.cpk can be unpack by cpk.bms script, I can split it by hex editor, however, dataregion.cpk itself can not unpack by bms script. I just want to get ndc_cpk.bms script version of this type. I mean, I want to split dataregion.cpk into compressed files. No need to decompress it.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: CRI CPK script updated

Post by aluigi »

Have you already tried the new cripaktools you suggested in the other topic?
https://github.com/wmltogether/CriPakTools/releases
makc_ar
Posts: 1193
Joined: Sun Aug 17, 2014 7:27 pm

Re: CRI CPK script updated

Post by makc_ar »

Yea, this tool unpacked the files... but all files are encrypted by some algorithm. How to decrypt files when unpacking .cpk? Maybe script to update? Example English .xfbin download/file.php?id=3993 and this mod China decrypted files download/file.php?id=3992 See my topic: viewtopic.php?f=12&t=7406