Skip to content
View in the app

A better way to browse. Learn more.

ResHax

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Help us keep the site running.

FSBext - FSB files extractor

Featured Replies

  • Replies 87
  • Views 7
  • Created
  • Last Reply

Top Posters In This Topic

  • Author
  • Localization

aluigi, posted Sun Sep 14, 2014 11:29 am (488)


http://aluigi.org/papers.htm#fsbext

Tool for extracting the files from FSB archives, used in the FMOD framework.

It supports:
FSB1, FSB2, FSB3, FSB3.1, FSB4 and FSB5

And it has been tested against a huge number of games and different FSB archives.

I have just released a new version, 0.3.3, that fixes the calculation of channels and frequency for FSB5.
Thanks to brendan19 for pointing me on this error.
  • Author
  • Localization

aluigi, posted Sat Mar 05, 2016 3:48 pm (11795)


The problem with -m apparently it's just a bug because when mpeg_fix is disabled there are no instructions at all to dump the file.

Anyway for the mp3 files in FSB my suggestion is to use the -M option that dumps all the channels separetely which is a lot better.

The other problem may be related to the rebuilding of multichannel files, I have a note in my TODO about something similar but I don't know if it's the same.

To be honest at the moment the development of fsbext is on-hold mainly because oggs are not supported yet and rebuilding was ok in the past but currently (FSB5) it appears to be useless because the official FMOD tools should do the job.
I have also a note about a certain type32 and the calculation of the number of channels that was encoutered only once.
  • Author
  • Localization

spider91, posted Sun Mar 06, 2016 12:15 pm (11813)


Quote:
The other problem may be related to the rebuilding of multichannel files, I have a note in my TODO about something similar but I don't know if it's the same.

Second file i uploaded is mono, not multichannel, so it seems to be another bug with sizes.

Hope you will fix this bugs someday, cause fsbext is wery usefull tool and it would be nice to have stable version without bugs.
  • Author
  • Localization

aluigi, posted Sat Mar 12, 2016 6:48 pm (11930)


The reason of that different byte in the rebuilt File5817.fsb is simply that fsbext automatically uses padding in the reimported files.
You can find the full details in the source code fsbext.c at line 1131.
So there is nothing to fix.
  • Author
  • Localization

AnonBaiter, posted Wed Jun 22, 2016 10:40 pm (14681)


Do you plan on adding OggS header for fsb files that use the Vorbis format?
  • Author
  • Localization

aluigi, posted Thu Jun 23, 2016 6:37 am (14686)


It will be not supported until a full working source code for "raw ogg chunks" to "ogg vorbis" or another easy solution will be provided.
  • Author
  • Localization

AnonBaiter, posted Thu Jul 14, 2016 2:09 pm (15279)


Oh, allrighty then...
  • Author
  • Localization

AnonBaiter, posted Thu Jul 21, 2016 10:33 pm (15534)


OK, so is there any way to possess all .fsb files at once using a batch mode?
  • Author
  • Localization

AnonBaiter, posted Fri Jul 22, 2016 2:35 am (15539)


Huh. Thanks for pointing me that out, it'll sure save me from processing each file at a time.
One question though is how can you find the password contained inside these FSB files?
  • Author
  • Localization

aluigi, posted Fri Jul 22, 2016 4:23 am (15541)


The type of encryption algorithm allows to see the clear-text password in the original zero bytes.
fsbext automatically show the first bytes of the archive if it's protected by password and you may guess some characters.
Usually I just run "fsbext -E 1 file.fsb" and then I check the generated file with a hex editor, looking moreover at the final bytes.
Then it's just a guess and try till the decryption is perfect.

You can also try guessfsb:
https://www.hcs64.com/vgm_ripping.html
  • Author
  • Localization

AnonBaiter, posted Fri Jul 22, 2016 4:53 am (15543)


Heh. I tried that with an .fsb file and nothing really changed between these two generated files.
Here's a sample.
  • Author
  • Localization

aluigi, posted Fri Jul 22, 2016 5:03 am (15544)


That one is not an FSB archive and it's not encrypted.
  • Author
  • Localization

AnonBaiter, posted Fri Jul 22, 2016 2:09 pm (15547)


^ Well then it's a mystery that the Speech.fsb file has a .fsb container.
  • Author
  • Localization

aluigi, posted Fri Jul 22, 2016 4:03 pm (15549)


In fact it doesn't have a FSB container.
What you have there is just a sequence of aligned Gamecube ADPCM streams with a header before each stream (for example 0x5622 is just the frequency 22050)
  • Author
  • Localization

aluigi, posted Fri Jul 22, 2016 4:39 pm (15550)


There were some things that reminded me of Rockstar Table Tennis, where you got this archive?

Code:
endian big
for
    savepos OFFSET
    get DUMMY1 long
    get DUMMY2 long # DUMMY6 1
    get FREQUENCY long
    get ZERO long
    get CHANNELS long
    get DUMMY6 long # DUMMY2 - 1
    get DUMMY7 long # 2, interleave?
    getdstring COEFF 0x20
    math SIZE = DUMMY6
    math SIZE / 2
    math SIZE 1
    math OFFSET 0x60
    set NAME string ""
    callfunction DUMP_GENH
    math OFFSET SIZE
    math OFFSET x 0x800
    goto OFFSET
next

# requirements: NAME, OFFSET, SIZE, CHANNELS, FREQUENCY, COEFF
startfunction DUMP_GENH
    endian save CURRENT_ENDIAN
    endian little
    math genhsz = 0x80
    log MEMORY_FILE 0 0
    putdstring "GENH" 4 MEMORY_FILE     // 0    magic
    put CHANNELS long MEMORY_FILE       // 4    channel_count
    put 2 long MEMORY_FILE              // 8    interleave
    put FREQUENCY long MEMORY_FILE      // c    sample_rate
    put 0xffffffff long MEMORY_FILE     // 10   loop_start
    xmath loop_end "((SIZE * 14)/8)/CHANNELS"
    put loop_end long MEMORY_FILE       // 14   loop_end
    put 12 long MEMORY_FILE             // 18   codec
    xmath start_off "genhsz (CHANNELS * 32)"
    put start_off long MEMORY_FILE      // 1c   start_offset
    xmath header_size "genhsz (CHANNELS * 32)"
    put header_size long MEMORY_FILE    // 20   header_size
    put genhsz long MEMORY_FILE         // 24   coef[0]
    xmath TMP "genhsz 32"
    put TMP long MEMORY_FILE            // 28   coef[1]
    put 1 long MEMORY_FILE              // 2c   dsp_interleave_type
    put 0 long MEMORY_FILE              // 30   coef_type
    put genhsz long MEMORY_FILE         // 34   coef_splitted[0]
    put TMP long MEMORY_FILE            // 38   coef_splitted[1]
    get i asize MEMORY_FILE
    for i = i < genhsz
        put 0 byte MEMORY_FILE
    next i
    math COEFF_PTR = 0
    for i = 0 < CHANNELS
        for x = 0 < 16
            getvarchr TMP COEFF COEFF_PTR short
            math COEFF_PTR 2
            put TMP short MEMORY_FILE
        next x
        #math COEFF_PTR 0xe    # 0x20 0xe = 0x2e
    next i
    append
    log MEMORY_FILE OFFSET SIZE
    append
    log NAME 0 SIZE MEMORY_FILE
    endian CURRENT_ENDIAN
endfunction
  • Author
  • Localization

AnonBaiter, posted Fri Jul 22, 2016 8:30 pm (15553)


Basically, I got that archive from a Wii game made by Rockstar(Bully Scholarship Edition). That's it.

EDIT: So I used your script and this is what I got. Also, the output files are supposed to be .genh, not .gen.
If you wish I can upload what's left from the archive(.bin, .lst).

EDIT2: And last but not least:
Code:
  00000000 31006      00009dcf.dat

Error: incomplete input file 0: E:\ROCKSTAR_LEL\BULLY_SCHOLARSHIP_EDITION\WII\audio\PLAYLIST\Speech.fsb
       Can't read 4 bytes from offset 4c1b8800.
       Anyway don't worry, it's possible that the BMS script has been written
       to exit in this way if it's reached the end of the archive so check it
       or contact its author or verify that all the files have been extracted.
       Please check the following coverage information to know if it's ok.

  coverage file 0    96%   1233909539 1276872704

Last script line before the error or that produced the error:
  4   get DUMMY1 long
  • Author
  • Localization

aluigi, posted Sat Jul 23, 2016 8:35 am (15562)


The error with the last file is correct because there is no end-of-file check in the script.
  • Author
  • Localization

cyberspeed, posted Thu Feb 23, 2017 3:34 am (20955)


Hey guys.
Quick question.
While using fsbext, if it can find a partial password, how many characters should it be? and you count from where?
I have the following results on a file, please advise, if possible, thank you.
Code:

FSB files extractor 0.3.5
by Luigi Auriemma
e-mail: [email protected]
web:    aluigi.org

- GUI mode activated, remember that the tool works also from command-line
  where are available various options

- select the output folder where extracting the files
- input file:   C:\Program Files (x86)\Origin Games\SHIFT 2 UNLEASHED\Audio\Musi
c\drift_music.fsb
- enter folder: C:\Users\User\Desktop\TCWD\fsbext
- probably the file uses encryption, insert the needed keyword:
  type ? for viewing the hex dump of the first 176 bytes of the file because
  it's possible to see part of the plain-text password in the encrypted file!
  ?
- encryption type 1
6c ae b4 ae ca 9a 7a c6 24 92 d2 ac c1 27 6b 5a   l.....z.$....'kZ
1e ac 56 92 d0 6c d6 e6 91 1a fb e9 f4 39 e6 e6   ..V..l.......9..
35 e8 ec d6 1b 4c 9d 04 bb 54 87 43 e3 b0 52 4f   5....L...T.C..RO
14 ac 54 d8 60 0e fc 1c 20 62 88 40 b2 98 80 c8   ..T.`... b.@....
f4 c6 70 ac 38 68 34 50 ca 32 d2 ac c2 4c 6e 7a   ..p.8h4P.2...Lnz
1f da c4 92 f1 0d d4 e6 ac 6e 72 12 da 58 84 56   .........nr..X.V
0e 24 d6 82 c3 47 7a c6 d3 32 d3 ac c3 4c 4e 7a   .$...Gz..2...LNz
1e ac 77 6e f2 6e ee 84 a6 6e 72 12 24 2e 36 56   ..wn.n...nr.$.6V
04 64 d4 c8 50 f8 50 3c a0 be 28 3e 84 da 30 fc   .d..P.P<..(>..0.
e4 5e 38 04 14 6c d6 e6 ac 6e 72 12 24 2e 36 56   .^8..l...nr.$.6V
0f d5 8c 82 c0 49 08 c6 2c 32 d2 ac 3c fd 14 7a   .....I..,2..<..z

- encryption type 2
70 26 6f 33 53 59 5e 63 24 49 4b 35 83 e4 d6 5a   p&o3SY^c$IK5...Z
78 35 6a 49 0b 36 6b 67 89 58 df 97 2f 9c 67 67   x5jI.6kg.X../.gg
ac 17 37 6b d8 32 b9 20 dd 2a e1 c2 c7 0d 4a f2   ..7k.2. .*....J.
28 35 2a 1b 06 70 3f 38 04 46 11 02 4d 19 01 13   (5*..p?8.F..M...
2f 63 0e 35 1c 16 2c 0a 53 4c 4b 35 43 32 76 5e   /c.5..,.SLK5C2v^
f8 5b 23 49 8f b0 2b 67 35 76 4e 48 5b 1a 21 6a   .[#I.. g5vNH[.!j
70 24 6b 41 c3 e2 5e 63 cb 4c cb 35 c3 32 72 5e   p$kA..^c.L.5.2r^
78 35 ee 76 4f 76 77 21 65 76 4e 48 24 74 6c 6a   x5.vOvw!evNH$tlj
20 26 2b 13 0a 1f 0a 3c 05 7d 14 7c 21 5b 0c 3f    & ....<.}.|![.?
27 7a 1c 20 28 36 6b 67 35 76 4e 48 24 74 6c 6a   'z. (6kg5vNH$tlj
f0 ab 31 41 03 92 10 63 34 4c 4b 35 3c bf 28 5e   ..1A...c4LK5<.(^

- probably the file uses encryption, insert the needed keyword:
  type ? for viewing the hex dump of the first 176 bytes of the file because
  it's possible to see part of the plain-text password in the encrypted file!

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.