ZenHAX

Free Game Research Forum | Official QuickBMS support | twitter @zenhax | SSL HTTPS://zenhax.com
It is currently Wed May 22, 2019 11:38 am

All times are UTC




Post new topic  Reply to topic  [ 77 posts ]  Go to page 1 2 3 4 Next
Author Message
PostPosted: Tue Apr 14, 2015 8:59 pm 

Joined: Sun Aug 24, 2014 5:26 pm
Posts: 229
It's something about FMOD, but i can't see any FSB header, only the FEV file. Can someone take a look and manage how to unpack mkx sounds? Not sure, but fsb's seems to be encrypted.

https://mega.co.nz/#!IsRDABjI!135retu2s ... 43NZvTPgZ4

Update. Fsb files are encrypted. The key is 996164B5FC0F402983F61F220BB51DC6 , but steel need unpacker for .xxx files, cause gildor's extractor doesn't work.


Top
   
PostPosted: Wed Apr 15, 2015 4:57 am 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 10256
Let's take the SND_MUS_DestroyedCity.xxx example.
Basically there you have "data" (encrypted fsb) from offset 0x4d21 till the end of the file and it looks like one unique file, so in that case you can just dump it with the hex editor.
Same thing for the other file with data from 0x2cf23.

And now the script :)
Code:
get XXX_SIZE asize
    findloc OFFSET binary "\xfe\x56\x2e\x20"
math i = 0
for OFFSET = OFFSET < XXX_SIZE
    goto OFFSET
    get SKIP long

    findloc NEXT_OFF binary "\xfe\x56\x2e\x20" 0 ""
    if NEXT_OFF == ""
        get NEXT_OFF asize
    endif

    xmath SIZE "NEXT_OFF - OFFSET"

    get NAME basename
    string NAME p "%s_%d.fsb" NAME i
    log NAME OFFSET SIZE

    math OFFSET = NEXT_OFF
next i
If you are interested just to the sound and music, this is the easiest way.

*EDIT* script updated


Top
   
PostPosted: Wed Apr 15, 2015 12:14 pm 

Joined: Sun Aug 24, 2014 5:26 pm
Posts: 229
Thats not unique fsb file. Lets take a look at SND_MUS_DestroyedCity.xxx. First file offset is 0x00004d21 and size is 0x01302f40. Second file offset is 0x01307c61 and size is 0x001ae3c0. There is TOC with offsets and sizes at the beginning (for first file it starts from 0x00002f50), but i'm not much familiar with unreal packages, so i don't know how to get number of files and universal way to get the start of the TOC.


Top
   
PostPosted: Wed Apr 15, 2015 12:19 pm 

Joined: Sun Aug 24, 2014 5:26 pm
Posts: 229
Also i have a problem with extracted ima adpcm files. With -A or without it i can't get playable sounds. And not even can decode it to PCM with ffmpeg.

http://puu.sh/heKc4/5020d388e5.png
http://puu.sh/heKdF/1ae81aef6c.png


Here is the first fsb from SND_MUS_DestroyedCity.xxx and files extracted with fsbext using -A option.

https://mega.co.nz/#!ow5xTAgR!_Djys9dut ... qHExCnJsks


Upd.

Voices are in fsb ogg format. Aluigi, we need new version of fsbext with ogg support, please. More and more games starts to use it.


Top
   
PostPosted: Wed Apr 15, 2015 8:43 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 10256
For the ogg files there are some solutions to explore:

- rebuilding the raw data of the fsb file in a normal ogg file
- playing the raw data with fmod (don't know if it's possible with the extracted data)
- creating a decoder

It's not even necessary to have this embedded in fsbext, anyone can try to make something that works on the data dumped by fsbext.
I was looking for the first solution but it's more difficult then what it seems.
Any idea is welcome.


Regarding the ima adpcm files I have no solution.
They should be multichannel but even with xbadpdec (the Xbox and IMA adpcm are similar) the output file given to Audacity is not ok.


I have updated the script in the previous post to extract all the FSB archives inside the XXX archives.


Top
   
PostPosted: Wed Apr 15, 2015 9:02 pm 

Joined: Sun Aug 24, 2014 5:26 pm
Posts: 229
Fmod can't play extracted raw data, it can play only fsb files with its API, but don't know how to extract them.

As about decoder i don't know nothing about oggs. For example in wav files you can simply add header and change freq,channels, etc that your fsbext shows. It shows this info for oggs as well, but i dont know how to recreate ogg header.

As about ideas, is it possible to make a kind of fsb splitter? For example fsb contains 200 files inside, so if you recreate 200 fsbs with only one file inside its possible to use method i described here.


Top
   
PostPosted: Thu Apr 16, 2015 1:36 am 

Joined: Sun Aug 24, 2014 8:54 am
Posts: 157
aluigi wrote:
Let's take the SND_MUS_DestroyedCity.xxx example.
Basically there you have "data" (encrypted fsb) from offset 0x4d21 till the end of the file and it looks like one unique file, so in that case you can just dump it with the hex editor.
Same thing for the other file with data from 0x2cf23.

And now the script :)
Code:
get XXX_SIZE asize
    findloc OFFSET binary "\xfe\x56\x2e\x20"
math i = 0
for OFFSET = OFFSET < XXX_SIZE
    goto OFFSET
    get SKIP long

    findloc NEXT_OFF binary "\xfe\x56\x2e\x20" 0 ""
    if NEXT_OFF == ""
        get NEXT_OFF asize
    endif

    xmath SIZE "NEXT_OFF - OFFSET"

    get NAME basename
    string NAME p "%s_%d.fsb" NAME i
    log NAME OFFSET SIZE

    math OFFSET = NEXT_OFF
next i
If you are interested just to the sound and music, this is the easiest way.

*EDIT* script updated


hi~~aluigi~Can the script support fev file extract?


Top
   
PostPosted: Thu Apr 16, 2015 1:47 am 

Joined: Sun Aug 24, 2014 5:26 pm
Posts: 229
Its only for fsb files. Btw, why do you need fev files? Normally they are useless.


Top
   
PostPosted: Thu Apr 16, 2015 2:08 am 

Joined: Sun Aug 24, 2014 8:54 am
Posts: 157
FMOD event player support fev file play fsb file


Top
   
PostPosted: Thu Apr 16, 2015 2:13 am 

Joined: Sun Aug 24, 2014 8:54 am
Posts: 157
http://img11.hostingpics.net/pics/389863fev1.png
http://img11.hostingpics.net/pics/409313fev2.png

http://www43.zippyshare.com/v/eU7qA2HY/file.html


Top
   
PostPosted: Thu Apr 16, 2015 3:18 am 

Joined: Sun Aug 24, 2014 5:26 pm
Posts: 229
You can extract it using ravioli game tools.

Well, it plays files, but can't extract them :|, so we steel need an extractor.


Top
   
PostPosted: Thu Apr 16, 2015 9:58 am 

Joined: Sun Mar 22, 2015 7:09 pm
Posts: 865
It was relatively easy to unpack the sounds with fmod using their provided API. Working on the tool now.


Top
   
PostPosted: Thu Apr 16, 2015 12:08 pm 

Joined: Sun Mar 22, 2015 7:09 pm
Posts: 865
Here you go, a universal FSB extractor for any formats. Needs fmodL.dll from the official fmod package. No error handling, no interface, because I'm lazy. Just give it the .fsb name and it will put all the sounds contained in .WAV format into the same folder.

p.s. tool updated. Please also note that you need the latest fmodL.dll, because it will not work with old versions.


Top
   
PostPosted: Sat Apr 18, 2015 7:44 am 

Joined: Sun Mar 22, 2015 7:09 pm
Posts: 865
A little mistake found in wav header (data length calculated twice longer). Updated.


Top
   
PostPosted: Tue Apr 21, 2015 8:26 pm 

Joined: Sun Mar 22, 2015 7:09 pm
Posts: 865
ahem, things got complicated now.

It seems there are 2 kinds of FSB banks in MKX:

1 - big files connected to the end of a package (these can be split with luigi's script)
2 - small files INSIDE of a package

If someone want to get files from there, one needs to unpack .xxx package. It will give many "fmodsourcedata" files, half of them encrypted, half not. He must somehow cut the first 32 bytes of them, decrypt the decrypted ones, and after that, extract FSB with my tool, but it somehow works a little wrong with these small files - some of them are a little cut in the end. I don't know how to fix this yet.


Top
   
PostPosted: Tue Apr 21, 2015 8:48 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 10256
Maybe the size is aligned?
Or there is a wrong usage of the offset and size, maybe the offset is 32 bytes lower than the real one?
Just trying to give you some possible ideas, I have not checked the files.


Top
   
PostPosted: Tue Apr 21, 2015 9:30 pm 

Joined: Sun Mar 22, 2015 7:09 pm
Posts: 865
aluigi wrote:
Maybe the size is aligned?


No, these 32 bytes are added by the engine. This is just an information for those who want to extract them.


Top
   
PostPosted: Sun Apr 26, 2015 9:05 am 

Joined: Tue Apr 21, 2015 2:15 pm
Posts: 27
aluigi wrote:
Let's take the SND_MUS_DestroyedCity.xxx example.
Basically there you have "data" (encrypted fsb) from offset 0x4d21 till the end of the file and it looks like one unique file, so in that case you can just dump it with the hex editor.
Same thing for the other file with data from 0x2cf23.

And now the script :)
Code:
get XXX_SIZE asize
    findloc OFFSET binary "\xfe\x56\x2e\x20"
math i = 0
for OFFSET = OFFSET < XXX_SIZE
    goto OFFSET
    get SKIP long

    findloc NEXT_OFF binary "\xfe\x56\x2e\x20" 0 ""
    if NEXT_OFF == ""
        get NEXT_OFF asize
    endif

    xmath SIZE "NEXT_OFF - OFFSET"

    get NAME basename
    string NAME p "%s_%d.fsb" NAME i
    log NAME OFFSET SIZE

    math OFFSET = NEXT_OFF
next i
If you are interested just to the sound and music, this is the easiest way.

*EDIT* script updated

does quick BMS able to decrypt/encrypt fsb?


Top
   
PostPosted: Sun Apr 26, 2015 1:10 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 10256
No because the algorithm is specific only for the fsb archive and so not worth to be implemented in quickbms.
fsbext is the only to support this encryption and there is even a command-line option to decrypt the archives without extracting them.


Top
   
PostPosted: Sun Apr 26, 2015 10:05 pm 

Joined: Tue Apr 21, 2015 2:15 pm
Posts: 27
happyend wrote:
Can the script support fev file extract?

Extraction of fmod files (.fev and .fsb)
from decompresed MKX packages(SND_.XXX)

Put your SND_ files in "input" folder
Run "extract_SND.bat"
In "FMOD" folder you will find decrypted fev's and fsb's


Attachments:
MKX_FMOD_Extractor.zip [2.91 MiB]
Downloaded 1073 times
Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 77 posts ]  Go to page 1 2 3 4 Next

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron
Powered by phpBB® Forum Software © phpBB Limited