DarkestDungeon (.bank)

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
happyend
Posts: 157
Joined: Sun Aug 24, 2014 8:54 am

DarkestDungeon (.bank)

Post by happyend »

aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: DarkestDungeon (.bank)

Post by aluigi »

Use fsbext with the -o -1 option which scans the file for FSB archives.
happyend
Posts: 157
Joined: Sun Aug 24, 2014 8:54 am

Re: DarkestDungeon (.bank)

Post by happyend »

thanks,but how to get have fsb head Original raw data??
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: DarkestDungeon (.bank)

Post by aluigi »

The easy way is opening the file with a hex editor and searching "FSB5", dump everything from there till the end of the file as a fsb archive.
Why you need that?
happyend
Posts: 157
Joined: Sun Aug 24, 2014 8:54 am

Re: DarkestDungeon (.bank)

Post by happyend »

Because need .fev+fsb file, use FMOD Designer play,or converts a multi-stream .fsb into a set of single-stream .fsbs, suitable for use with vgmstream
Savage
Posts: 176
Joined: Thu Oct 02, 2014 4:58 pm

Re: DarkestDungeon (.bank)

Post by Savage »

Hi! i asked time ago if it's possible to make bms script to dump the raw data like @happyend is requesting
Actually we have a FSB4 dumper

Code: Select all

# dump FSBs
# script for QuickBMS http://quickbms.aluigi.org

for
    findloc OFFSET string "FSB" 0 ""
    if OFFSET == ""
        cleanexit
    endif
    goto OFFSET
    getdstring FSB_SIGN 3
    get FSB_VER byte
    get DUMMY long
    get HEADER_SIZE long
    get DATA_SIZE long
    if FSB_VER == '4'
        math SIZE = 0x30
    elif FSB_VER == '3'
        math SIZE = 0x18
    elif FSB_VER == '2'
        math SIZE = 0x10
    elif FSB_VER == '1'
        math SIZE = 0x10
        math DATA_SIZE = HEADER_SIZE
        math HEADER_SIZE = 0
    else
        #print "FSB version %FSB_VER% not supported"
        #cleanexit
        math SIZE = -1
    endif
    if SIZE == -1
        math SIZE = 4
    else
        math SIZE += HEADER_SIZE
        math SIZE += DATA_SIZE
        log "" OFFSET SIZE
    endif
    math OFFSET += SIZE
    goto OFFSET
next


Aluigi or any other, i't s possible to enhance" the script?
Thanks!
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: DarkestDungeon (.bank)

Post by aluigi »

Don't you really like fsbext -o -1 ?
Savage
Posts: 176
Joined: Thu Oct 02, 2014 4:58 pm

Re: DarkestDungeon (.bank)

Post by Savage »

aluigi wrote:Don't you really like fsbext -o -1 ?

Not really in this case, the idea is to dump the full FSB5 files, not extract the data form the FSB5
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: DarkestDungeon (.bank)

Post by aluigi »

for FSB5 try with:

Code: Select all

    elif FSB_VER == '5'
        math SIZE = 0x3c
Savage
Posts: 176
Joined: Thu Oct 02, 2014 4:58 pm

Re: DarkestDungeon (.bank)

Post by Savage »

Thanks, but only dumps a few bytes

Code: Select all

# dump FSBs
# script for QuickBMS http://quickbms.aluigi.org

for
    findloc OFFSET string "FSB" 0 ""
    if OFFSET == ""
        cleanexit
    endif
    goto OFFSET
    getdstring FSB_SIGN 3
    get FSB_VER byte
    get DUMMY long
    get HEADER_SIZE long
    get DATA_SIZE long
    if FSB_VER == '4'
        math SIZE = 0x30
    elif FSB_VER == '3'
        math SIZE = 0x18
    elif FSB_VER == '5'
        math SIZE = 0x3c
    elif FSB_VER == '2'
        math SIZE = 0x10
    elif FSB_VER == '1'
        math SIZE = 0x10
        math DATA_SIZE = HEADER_SIZE
        math HEADER_SIZE = 0
    else
        #print "FSB version %FSB_VER% not supported"
        #cleanexit
        math SIZE = -1
    endif
    if SIZE == -1
        math SIZE = 4
    else
        math SIZE += HEADER_SIZE
        math SIZE += DATA_SIZE
        log "" OFFSET SIZE
    endif
    math OFFSET += SIZE
    goto OFFSET
next
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: DarkestDungeon (.bank)

Post by aluigi »

Code: Select all

for OFFSET = 0
    goto OFFSET
    findloc OFFSET string "FSB5"
    goto OFFSET
    getdstring FSB_SIGN 4   # FSOUND_FSB_HEADER_FSB5 (fsb.h)
    get version long
    get numsamples long
    get shdrsize long
    get namesize long
    get datasize long
    xmath SIZE "0x3c + shdrsize + namesize + datasize"
    log "" OFFSET SIZE
next OFFSET + SIZE
Savage
Posts: 176
Joined: Thu Oct 02, 2014 4:58 pm

Re: DarkestDungeon (.bank)

Post by Savage »

Thanks! works great :D
HoundMaster
Posts: 1
Joined: Wed Aug 05, 2015 7:40 pm

Re: DarkestDungeon (.bank)

Post by HoundMaster »

Thanks. :)
Dark10
Posts: 1
Joined: Sat Aug 22, 2015 5:35 pm

Re: DarkestDungeon (.bank)

Post by Dark10 »

Hey guys, I don't know how to dumb the .bank file. Even, I don't know how to use the Hex editor!
Any updates for fsbext or FsbExtractor to do the job? Anyone can make a tool to make these .wav files playable?
Thanks.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: DarkestDungeon (.bank)

Post by aluigi »

I don't have the game so I can't help with these output files.
Anyway the OGG files of FSB5 are not supported yet by fsbext (it dumps them as-is) while the other files are extracted with the appropriate header like RIFF for pcm wav or vag and genh for the ps* and Nintendo files. Obviously you need the appropriate player to play them, usually the vgmstream plugin for winamp does the job.
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: DarkestDungeon (.bank)

Post by AnonBaiter »

Here is an "updated" version of dump_fsbs.bms script, this time I added (as-of-yet-untested) FSB5 support.

Code: Select all

for
    findloc OFFSET string "FSB" 0 ""
    if OFFSET == ""
        cleanexit
    endif
    goto OFFSET
    getdstring FSB_SIGN 3
    get FSB_VER byte
    get DUMMY long
    get HEADER_SIZE long
    get DATA_SIZE long
   if FSB_VER == '5'
      getdstring FSB_SIGN 4
      get VERSION long
      get TOTALSAMPLES long
      get SHDRSIZE long
      get NAMESIZE long
      get DATASIZE long
      xmath SIZE "0x3c + SHDRSIZE + NAMESIZE + DATASIZE"
    elif FSB_VER == '4'
        math SIZE = 0x30
    elif FSB_VER == '3'
        math SIZE = 0x18
    elif FSB_VER == '2'
        math SIZE = 0x10
    elif FSB_VER == '1'
        math SIZE = 0x10
        math DATA_SIZE = HEADER_SIZE
        math HEADER_SIZE = 0
    else
        #print "FSB version %FSB_VER% not supported"
        #cleanexit
        math SIZE = -1
    endif
    if SIZE == -1
        math SIZE = 4
    else
        math SIZE += HEADER_SIZE
        math SIZE += DATA_SIZE
      callfunction GET_NAME 1
        log NAME OFFSET SIZE
    endif
    math OFFSET += SIZE
    goto OFFSET
next

startfunction GET_NAME
   if FSB_VER != '5'
      if DUMMY == 1
         xmath NAME_OFFSET "OFFSET + 0x32"
         goto NAME_OFFSET
         savepos TMP
         getdstring NAME 0x1e
         string NAME += ".fsb"
         goto TMP
      else
         set NAME string ""
      endif
   else
      break   # I don`t have any FSB5 files at the moment
   endif
endfunction
pastranario3
Posts: 10
Joined: Mon Apr 23, 2018 1:44 pm

Re: DarkestDungeon (.bank)

Post by pastranario3 »

I need to extract only the .fev from the .bank