Thief 3 .csc format, help with quickbms script

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
oux
Posts: 39
Joined: Sun Nov 05, 2017 6:14 am

Thief 3 .csc format, help with quickbms script

Post by oux »

Hello,

I would like to rip sound from Thief 3 files. They're packed into .csc format. Could someone please help write quickbms script?
Here is an example:
https://mega.nz/#!EGxD1I7J!ZNMvvtz-Q9UN ... ilmnJRVB1w
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Thief 3 .csc format, help with quickbms script

Post by aluigi »

Concatenated ogg files without any information (probably stored in a small index file, don't know).
Luckily oggs are easy to dump so use this script:

Code: Select all

findloc OFFSET binary "OggS\x00\x02"
do
    goto OFFSET
    get DUMMY long
    findloc NEXT_OFFSET binary "OggS\x00\x02" 0 ""
    if NEXT_OFFSET == ""
        get SIZE asize
    else
        math SIZE = NEXT_OFFSET
    endif
    math SIZE -= OFFSET
    log "" OFFSET SIZE
    math OFFSET = NEXT_OFFSET
while NEXT_OFFSET != ""