Important information: this site is currently scheduled to go offline indefinitely by end of the year.

Battlefield 3 PC Beta .SB archives

Read or post about compression. And decompression. Or ask questions how to decompress your files.
Orion
ultra-n00b
Posts: 3
Joined: Thu Sep 29, 2011 5:29 pm

Re: Battlefield 3 PC Beta .SB archives

Post by Orion »

Hey guys, I'm new here, but I've been doing some modding in different games for a while. I was in the BF3 alpha and did a bit of poking around, it looks like they've changed the .toc files since then. Anyone know how they are encoded? I'm just trying some different stuff with the raw bytes from the file atm.
Rick
Moderator
Posts: 388
Joined: Tue Aug 09, 2005 10:10 pm
Been thanked: 84 times
Contact:

Re: Battlefield 3 PC Beta .SB archives

Post by Rick »

I'll take a look again but I'm sure they encrypted the TOC to slow people down from poking around.
https://blog.gib.me/

Don't ask me about localization tools; if you don't have the resources to develop them yourself you don't need them.
Orion
ultra-n00b
Posts: 3
Joined: Thu Sep 29, 2011 5:29 pm

Re: Battlefield 3 PC Beta .SB archives

Post by Orion »

Yeah that's what it looked like to me too. Interestingly, in the three TOC files I've looked at, there are sections that look like hex values - from ascii (so, when the bytes are put into ascii, the results are hex characters) enclosed within the 'x' character. The hex values don't correspond to characters themselves though as far as I can tell.
User avatar
Vosvoy
veteran
Posts: 127
Joined: Fri Feb 18, 2011 4:58 pm
Has thanked: 15 times
Been thanked: 15 times

Re: Battlefield 3 PC Beta .SB archives

Post by Vosvoy »

OrangeC wrote:Well there are no tools yet to extract it i just did it with vgmtoolbox and extracted the audio files.
Ow ... Can you share the Xbox360 files ( .sb ) to us ? I would like to analyze these files .

( Please )

Vosvoy
Vosvoy
Rick
Moderator
Posts: 388
Joined: Tue Aug 09, 2005 10:10 pm
Been thanked: 84 times
Contact:

Re: Battlefield 3 PC Beta .SB archives

Post by Rick »

New obfuscation on .toc is extremely simple.

If the first dword is 0x00CED100 (D1CE) then the file is obfuscated, otherwise it's normal.

Magic data starts at 0x128 and is 257 bytes.
Real data starts at 0x22C until end of file.

Code: Select all

for (int i = 0; i < length; i++)
{
  data[i] = data[i] ^ magic[i % 257] ^ 0x7B;
}
https://blog.gib.me/

Don't ask me about localization tools; if you don't have the resources to develop them yourself you don't need them.
Ekey
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 1823
Joined: Wed Mar 31, 2010 6:54 am
Has thanked: 92 times
Been thanked: 1058 times

Re: Battlefield 3 PC Beta .SB archives

Post by Ekey »

Pepper wrote:I got the beta for xbox, but the tools for extracting live dlc/betas/etc dont work on the chunk file, its too big for it to handle i guess. the tool itself is called x360Tool.exe, and apears to be working on smaller dlc's/betas.

edit: worded that confusingly, the dlc/beta format is a 1.5gb numerical (4C207D8B97D4F42D1A2C2E201490E71651835FA045) file with no extension. (only 1.5gb... no caspian border on 360 maybe?) and i can see the files inside, but i can't extract the one with most of the sounds.

Oh wait (edit 2) it's working, its just going slow. REALLY slow.
It's default XBOX Pirs file. Use wxPirs tool for unpack. x360Tool not correctly work with big files.
redspider
ultra-n00b
Posts: 7
Joined: Sun Jul 11, 2010 3:48 pm

Re: Battlefield 3 PC Beta .SB archives

Post by redspider »

Also VERY interested in this. Anybody have any tools/guides?

thanks
rengareng
veteran
Posts: 131
Joined: Fri Feb 18, 2011 10:23 am
Has thanked: 7 times
Been thanked: 49 times

Re: Battlefield 3 PC Beta .SB archives

Post by rengareng »

@Rick
have you ever thought making a tool to edit .sb and .toc files?
and 0x00D1CE00 is nice header DICE :)
redspider
ultra-n00b
Posts: 7
Joined: Sun Jul 11, 2010 3:48 pm

Re: Battlefield 3 PC Beta .SB archives

Post by redspider »

OrangeC wrote:Well there are no tools yet to extract it i just did it with vgmtoolbox and extracted the audio files.
Do you have a tut for this? :)
Rick
Moderator
Posts: 388
Joined: Tue Aug 09, 2005 10:10 pm
Been thanked: 84 times
Contact:

Re: Battlefield 3 PC Beta .SB archives

Post by Rick »

rengareng wrote:@Rick
have you ever thought making a tool to edit .sb and .toc files?
and 0x00D1CE00 is nice header DICE :)
It's beta so no. I have a working unpacker but I doubt I'll push the code anywhere until the game is actually out.
https://blog.gib.me/

Don't ask me about localization tools; if you don't have the resources to develop them yourself you don't need them.
redspider
ultra-n00b
Posts: 7
Joined: Sun Jul 11, 2010 3:48 pm

Re: Battlefield 3 PC Beta .SB archives

Post by redspider »

Rick wrote:It's beta so no. I have a working unpacker but I doubt I'll push the code anywhere until the game is actually out.
Can you take a request then? :P I'm after the Battlefield theme that plays when you about to win a round... i want it for my ringtone :P
Rick
Moderator
Posts: 388
Joined: Tue Aug 09, 2005 10:10 pm
Been thanked: 84 times
Contact:

Re: Battlefield 3 PC Beta .SB archives

Post by Rick »

Sorry, taking a quick look I have no idea where any of the music is, it's probably buried in the chunks data somewhere.
https://blog.gib.me/

Don't ask me about localization tools; if you don't have the resources to develop them yourself you don't need them.
redspider
ultra-n00b
Posts: 7
Joined: Sun Jul 11, 2010 3:48 pm

Re: Battlefield 3 PC Beta .SB archives

Post by redspider »

Rick wrote:Sorry, taking a quick look I have no idea where any of the music is, it's probably buried in the chunks data somewhere.
Damn. Thanks for taking a look. Any chance you can post (or PM) details on how i could try and unpack? Then i can have a good ol' nosy myself :)
Rick
Moderator
Posts: 388
Joined: Tue Aug 09, 2005 10:10 pm
Been thanked: 84 times
Contact:

Re: Battlefield 3 PC Beta .SB archives

Post by Rick »

redspider wrote:Damn. Thanks for taking a look. Any chance you can post (or PM) details on how i could try and unpack? Then i can have a good ol' nosy myself :)
.toc format is self-describing once you get past the obfuscation...
https://blog.gib.me/

Don't ask me about localization tools; if you don't have the resources to develop them yourself you don't need them.
redspider
ultra-n00b
Posts: 7
Joined: Sun Jul 11, 2010 3:48 pm

Re: Battlefield 3 PC Beta .SB archives

Post by redspider »

Rick wrote:
redspider wrote:Damn. Thanks for taking a look. Any chance you can post (or PM) details on how i could try and unpack? Then i can have a good ol' nosy myself :)
.toc format is self-describing once you get past the obfuscation...
How would one do this? As my forum rank states, im an ultra-n00b at this :p
Post Reply