XboxHacker BBS
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
June 19, 2013, 11:58:36 AM


Login with username, password and session length


Pages: « 1 2 3
  Print  
Author Topic: kong BIGFILE  (Read 25475 times)
player98198
Newbie
*
Posts: 9


View Profile
« Reply #40 on: January 20, 2006, 04:04:46 PM »

heres a pic of the app for those of u who can't run it
i know the files are in incorrect order, i didn't have much time to fix that bug. but if anyone is still interested i could fix it up some more, with added features such as
right click extract
indivual file extract
custom "@extracted" folder rebuilder
sorting

« Last Edit: January 20, 2006, 04:06:59 PM by player98198 » Logged
Hoss
Member
**
Posts: 14


View Profile
« Reply #41 on: January 20, 2006, 06:17:16 PM »

Permanent link here:
http://www.dslinux.org/bf_unpack_v11.rar
Logged
xor37h
Newbie
*
Posts: 6


View Profile WWW
« Reply #42 on: January 21, 2006, 11:15:14 AM »

Hey guys (and gals?)

I took at little look at this, and whipped up a tool (with full source as always) that you might have fun with

You can download it here: http://hitmen.c02.at/files/releases/xbox360/unpack02.zip

Quote
JADE Game Engine .bin file unpacker v0.2 by xor37h/hitmen
using LZO real-time data compression library (v2.02, Oct 17 2005).

Usage: unpack.exe infile.bin outfile.bin

ok, the first version was really too quick a hack, it didnt work with all the .bin files
and the code was ugly as hell Smiley

Here we go with an updated version that supports ALL the .bin files, also the big ones!

---

Just a quick hack to unpack the .bin files from the extracted kingkong .bf

Q: JADE Game Engine ?
A: Yep thats the name, check http://www.mobygames.com/game_group/sheet/gameGroupId,4464/

Q: whats minilzo ?
A: A nice little opensource compression library avaliable at http://www.oberhumer.com/opensource/lzo/

Q: How did you figure out that it was using minilzo ?
A: I downloaded the release called: Peter.Jacksons.King.Kong.DEMO.XBOX-XD, and reversed the .xbe Smiley

Q: I see that the retail releases come with a file named "BUG" in its magic, whats that?
A: Its ubisofts retail bigfile format, its the "BIG" format with some xor scrambling, you can
   reverse the XBOX-XD .xbe for more information, they were nice enough to link in support for
   both formats.

Nothing more to say, the code is not amazing, it was hacked together in a few minutes, but it works
and this will maybe lead the way to even more nice things Smiley

Have fun!

 ... xor37h signing off

Yep you can decompress the .bin files with this, shouldnt be much of a problem to do a recompressor either.. have fun!
« Last Edit: January 23, 2006, 03:10:07 AM by xor37h » Logged
th0mas
Member
**
Posts: 37


View Profile WWW
« Reply #43 on: January 21, 2006, 11:57:16 AM »

nice work xor37h!
Logged

xor37h
Newbie
*
Posts: 6


View Profile WWW
« Reply #44 on: January 21, 2006, 01:23:53 PM »

ok, the first version was really too quick a hack, it didnt work with all the .bin files
and the code was ugly as hell Smiley

Here we go with an updated version that supports ALL the .bin files, also the big ones!

get it from http://hitmen.c02.at/files/releases/xbox360/unpack02.zip

Enjoy, xor37h
« Last Edit: January 23, 2006, 03:10:18 AM by xor37h » Logged
th0mas
Member
**
Posts: 37


View Profile WWW
« Reply #45 on: January 22, 2006, 12:40:59 AM »

For anyone interested in code related to how the directory structure in the BF files works (hi DarkNeo Smiley ) take a look at:

http://th0mas.sixbit.org/dumpdirs.c

takes as arguments the filename of a .bf file, and the number of directory entries to process - while looking I never found this number hardcoded in any header and didn't write a check to see if it read a blank entry - there is around 8000 directory entries so feel free to use a number around that size.  If you use a number too big the trailing entries will be obviously garbage.
Logged

Dark_Neo
Hacker
***
Posts: 89


View Profile
« Reply #46 on: January 22, 2006, 09:44:51 AM »

Got a link to bfcommon.h?

Btw the number of directories is at 0xC and 0x30. Not sure why they repeat the file + directory count twice in the header...
« Last Edit: January 22, 2006, 09:52:51 AM by Dark_Neo » Logged
th0mas
Member
**
Posts: 37


View Profile WWW
« Reply #47 on: January 22, 2006, 04:00:40 PM »

http://th0mas.sixbit.org/bfcommon.h - sorry about that.
Logged

xor37h
Newbie
*
Posts: 6


View Profile WWW
« Reply #48 on: January 23, 2006, 11:02:49 AM »

I had some freetime today, and hacked this together

You can grab it from:
   http://hitmen.c02.at/files/releases/xbox360/jadepack.zip

Quote
JADE Game Engine .bin file pack-tool v1.0 by xor37h/hitmen
using LZO real-time data compression library (v2.02, Oct 17 2005).

    Usage: jadepack [-option] infile outfile

 Examples: jadepack -c ff801b17.dec ff801b17.bin
           jadepack -d ff801b17.bin ff801b17.dec

 Switches:
    -c           compress
    -d           decompress

With this tool you can decompress and recompress the extracted .bin files
from the extracted KingKongTheGame_clean.bf bigfile on the 360 kiosk disc.

It should work on other packed .bin files using the JADE game engine.

depacking -> repacking will not produce a 1:1 identical file due to the
fact that the lzo algorithm gives different compressed output depending
on library version used aswell as the machine it is running on.

depacking -> repacking -> depacking will produce a 1:1 identical file.

Also have no fear as the lzo manual states that even the latest miniLZO
is backwards compatible.

I have been unable to find the exact version of minilzo the Ubisoft guys
used, since they removed version and date strings from the library they
used, allthough I suspect they might be using an old version 1.06.

I decided to use version 2.02 as its backwards compatible and works on
64-bit processors.

The file size of the repacked file will often (but not always) be the same.

I have allready tested the following:

 1. extract KingKongTheGame_clean.bf
 2. unpack a .bin file.
 3. change some strings
 4. repack the .binfile
 5. rebuild KingKongTheGame_clean.bf
 6. load it up on a 360 and see the changes without any problems.

Special thanks to groepaz/hitmen for porting and testing on linux.

notice:
  jadepack uses miniLZO v2.02 (c) Markus Franz Xaver Johannes Oberhumer

Enjoy guys!
« Last Edit: January 23, 2006, 11:17:02 AM by xor37h » Logged
th0mas
Member
**
Posts: 37


View Profile WWW
« Reply #49 on: January 23, 2006, 04:00:29 PM »

So has anyone tried to gently break the BF file format and then test the results?

For example, try going to the file structure offset at 0x138c0 and make a filename be 65 bytes long (or 64 followed by a null), then burn and run the disk.  You could also try the same thing with a directory from the structure at 0xea644.

Another idea would be to attempt an array read over bounds by changing the parentDir entry for a directory entry (see it's position in the struct by looking at dumpdirs.c and bfcommon.h)

Tom
Logged

Dark_Neo
Hacker
***
Posts: 89


View Profile
« Reply #50 on: January 23, 2006, 06:17:10 PM »

One thing that should be pointed out, which is quite confusing. th0mas's tool (and my plugin for my app I'm just finishing up, will post it soon) extract the files without the four bytes at the start (the size), player98198's tool however does extract these bytes, which is what xor37h's BIN unpacker is based on. Now looking at the way the BF file is structured I agree with th0mas that these four bytes shouldn't be extracted, because the size is mentioned twice (like the number of files and directories is mentioned twice) and these sizes both indicate that these four bytes shouldn't be extracted. However the BIN file is structured with multiple blocks, each starting with:

struct {
   uint32 fileSize,
   uint32 unpackedSize,
   uint32 packedSize
}

But each block after the first (assuming the file size bytes are extracted) contains 0x00000000 as the file size. If the four bytes aren't supposed to be extracted this could just be a dword padding, which is my current theory.

Hope I made sense, in a bit of a rush. What does everyone else think?
Logged
xor37h
Newbie
*
Posts: 6


View Profile WWW
« Reply #51 on: January 23, 2006, 09:09:58 PM »

Hi Dark_Neo,

I belive you are wrong.. let me explain...

In my code I do stuff like:

Code:
            // pad to blocksize 2048
            header.filesize = ftell(fout);
            i = 2048 - (header.filesize % 2048);
            memset(out,0,i);
            fwrite(out,1,i,fout);

            // update header.filesize in the start
            header.filesize += i-4;           // YES i know it says -4, thats the remaining file size _after_ the dword is read.
            fseek(fout, 0, SEEK_SET);
            fwrite(&header.filesize,1,4,fout);

The .bin files are always a multitude of 2048 (0x800) when it includes that filesize dword, this is due to the fact that we load from disc, and the sector size of such a disc is 2048..

Well actually a dvd sector size if 2064 bytes [ID.4][IED.2][CPR_MAI.6][DATA.2048][ECC.4] but out of that only 2048 is data, and reading a full sector is nearly as fast as say, reading half a sector, simply due to the drives mechanies.

The reason the filesize is there is for the decompression routine, I know this for a fact, since I reversed on the xbox1 .xbe to figure out the compression format.

Anyways, youre natururally welcome to use my code to integrate .bin de/compression it into your bigfile manipulation tools, as the .bin format is a intermediate chunked and padded format, the file wont actually be truely extracted before its unpacked.
Logged
Hoss
Member
**
Posts: 14


View Profile
« Reply #52 on: January 23, 2006, 11:04:26 PM »

if you guys got together and made one package that does it all, that would be great.  I will host if needed.
Logged
th0mas
Member
**
Posts: 37


View Profile WWW
« Reply #53 on: January 24, 2006, 12:39:53 AM »

Hi xor37h,

I can see how it might make sense with the .bin, but it makes no sense for other files, such as the wave files inside the Sound_Common.bf..  If we don't include that first dword then we have a properly formed WAVE file.  Otherwise we don't.  I'm assuming that the .bin unpacker in the xbox1 XBE that you looked at was unpacking the bin file at the same time as reading it from the .bf?  Or was it a two step process - extract the .bin from the .bf (including the starting filesize dword), then decompress.  Because if it's doing it all at once then there is no real "proper" way to do it so to speak, except for someone to include .bin de/compressing as a part of their bf unpacker.

Cheers,
Tom
Logged

player98198
Newbie
*
Posts: 9


View Profile
« Reply #54 on: January 24, 2006, 12:58:05 PM »

that would be some tedious work to do.
im thinking it would require a few different steps

extract file
->check header to see if correct file
->if correct run decompress tool
->go to next file

its easier said than done. but it would help for multple files
Logged
Assassin X
Newbie
*
Posts: 2


View Profile
« Reply #55 on: April 20, 2006, 05:05:16 PM »

heres a pic of the app for those of u who can't run it
i know the files are in incorrect order, i didn't have much time to fix that bug. but if anyone is still interested i could fix it up some more, with added features such as
right click extract
indivual file extract
custom "@extracted" folder rebuilder
sorting



Sorry to bump this after so long, heck I am not sure what this forum is under besides "xbox". I found this after hours of searching! Maybe you "1337" people can help me out.

I bumped this because I am trying to extract/access...etc "bigfiles" from a pc version of "Tomb Raider: Legend". Any game that comes out I try to get its music because I just love game music! But I can't figure out how to get the files out! I seen this extractor but it doesn't work, obviously I realized its for XBOX related stuff. Anyone know a BIGFILE extractor for PC items?
Logged
Assassin X
Newbie
*
Posts: 2


View Profile
« Reply #56 on: April 20, 2006, 05:22:18 PM »

Seems at a Russian site someone figured out how to extract the music for this game only. http://www.ag.ru/files/software/373/16521/agc

Its ashame there are so many diffrent file types, game music is so awsome.
Logged
annerajb
Newbie
*
Posts: 2


View Profile
« Reply #57 on: January 05, 2007, 11:56:17 AM »

i know this tread is old but would like to contribute something here the sounds reference u found in that file or the whole file could be a debug dump left in the game and those could be the things that while the game loaded spitted out to the debug log. not sure about this also the xbox360 not sure if always do but i thing yes uses xact xbox auditioning content tool for sounds so the sounds need to first be put in a xgs and xws xsb those files can be generated in the pc using the xact tool included in directxsdk so if u wanna take a try on recreating that file and trying to load a custom sound go ahead. hope that helped
Logged
Pages: « 1 2 3
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM