Call of Duty: Black Ops III (.xpak) pls

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
RageX
Posts: 26
Joined: Fri Oct 09, 2015 3:38 pm

Call of Duty: Black Ops III (.xpak) pls

Post by RageX »

Hi, I tried to open these xpak files using hex-editor, at some positions I could see offsets of files inside like this :-

Code: Select all

¯öaÈY,..°.......width: 256.height: 128.levels: 7.manual: 0.format: BC7.semantic: normalMap.initial: none.name: i_c_zom_zod_zombie_fem_head_2_n.type: image.initial: none.offset0: 0.size0: 43728áñÉ)P...¥.......width: 64.height: 128.levels: 7.manual: 0.format: BC4.semantic: glossMap.initial: none.name: i_c_nrc_supp_kneepads_g.type: image.initial: none.offset0: 0.size0: 5480œv†t....®.


Is there any way someone could write a dumper/extractor which will be able to unpack xpak files with offsets ?

Here are the sample files :-

Code: Select all

http://www.solidfiles.com/d/1281623965/
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Call of Duty: Black Ops III (.xpak) pls

Post by aluigi »

The KAPI format used by the xpak files has been posted on this forum some days ago.
I remember the "KAPI" magic but there was no solution.
I have just made a script:
http://aluigi.org/bms/cod_kapi.bms

For core_common.fd I suggest you to use offzip -a.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Call of Duty: Black Ops III (.xpak) pls

Post by aluigi »

Script 0.2.1
RageX
Posts: 26
Joined: Fri Oct 09, 2015 3:38 pm

Re: Call of Duty: Black Ops III (.xpak) pls

Post by RageX »

aluigi wrote:Script 0.2.1


Thanks aluigi for this ! Will try :D
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Call of Duty: Black Ops III (.xpak) pls

Post by aluigi »

Script 0.3.
There will be no other udpates to this script because the format can't be easily parsed.
The sections contain just files that can be of various types but these types can't be identified.
Additionally the number of files reported doesn't seem to match.
The script tries to guess everything and this version grants to dump all the data that it can identify.

One note, now it uses Slog for dumping all those small thousands of files of 1kb or less.
It makes everything faster, you will only notice the annoying output on the console :) (will limit it in the next quickbms).
RageX
Posts: 26
Joined: Fri Oct 09, 2015 3:38 pm

Re: Call of Duty: Black Ops III (.xpak) pls

Post by RageX »

aluigi wrote:Script 0.3.
There will be no other udpates to this script because the format can't be easily parsed.
The sections contain just files that can be of various types but these types can't be identified.
Additionally the number of files reported doesn't seem to match.
The script tries to guess everything and this version grants to dump all the data that it can identify.

One note, now it uses Slog for dumping all those small thousands of files of 1kb or less.
It makes everything faster, you will only notice the annoying output on the console :) (will limit it in the next quickbms).


Thanks a lot aluigi, you are great :)
spider91
Posts: 233
Joined: Sun Aug 24, 2014 5:26 pm

Re: Call of Duty: Black Ops III (.xpak) pls

Post by spider91 »

for example 0x03007672 (unknown compression/obfuscation)


0x03 it's a flag for lz4 and 0x007672 it's a compressed chunk size
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Call of Duty: Black Ops III (.xpak) pls

Post by aluigi »

It's strange that I didn't get the result from the scanner... mah.
Anyway 0.3.1 is out.
Thanks spider91.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Call of Duty: Black Ops III (.xpak) pls

Post by aluigi »

0.3.1b to break the extraction in case of unknown flags, just in case there is a flags 2 or others.
RageX
Posts: 26
Joined: Fri Oct 09, 2015 3:38 pm

Re: Call of Duty: Black Ops III (.xpak) pls

Post by RageX »

aluigi wrote:0.3.1b to break the extraction in case of unknown flags, just in case there is a flags 2 or others.


Script now seems a lot more proper, thanks :)
v2excoc
Posts: 1
Joined: Wed Nov 11, 2015 1:33 am

Re: Call of Duty: Black Ops III (.xpak) pls

Post by v2excoc »

aluigi wrote:
One note, now it uses Slog for dumping all those small thousands of files of 1kb or less.


you only dump fragments. small thousands of files need to be reassembled, that is a real texture file.

everything is start in *.ff format, not xpak. xpak just a extend of huge inner game filedisk-like-system, imagine NTFS chunk system.

if everyone want to dump texture, go to *.ff
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Call of Duty: Black Ops III (.xpak) pls

Post by aluigi »

Do you mean that they should be just concatenated one by one in one unique file?
myasa
Posts: 4
Joined: Sun Nov 15, 2015 10:04 am

Re: Call of Duty: Black Ops III (.xpak) pls

Post by myasa »

:geek:
where are textures? in .xpak files or .ff files?
what are .dat files when extracted from .xpak file?
joaosilva
Posts: 2
Joined: Sat Nov 21, 2015 6:50 am

Re: Call of Duty: Black Ops III (.xpak) pls

Post by joaosilva »

myasa wrote::geek:
where are textures? in .xpak files or .ff files?
what are .dat files when extracted from .xpak file?


Yes, where are textures and images? .xpak or .ff? How extract .dat files? Please! Thanks
toxic72
Posts: 26
Joined: Sun Mar 20, 2016 10:25 pm

Re: Call of Duty: Black Ops III (.xpak) pls

Post by toxic72 »

I managed to rip out part of the xpak_read function, hopefully this will be of use to someone... http://hastebin.com/ayuwazamah.xml
FakePlayer
Posts: 12
Joined: Wed Apr 27, 2016 5:11 pm

Re: Call of Duty: Black Ops III (.xpak) pls

Post by FakePlayer »

joaosilva wrote:
myasa wrote::geek:
where are textures? in .xpak files or .ff files?
what are .dat files when extracted from .xpak file?


Yes, where are textures and images? .xpak or .ff? How extract .dat files? Please! Thanks

you can partially dump .ff files. Wich was also commonly found in /Zone instead /Main because it used To have textures inside it