Star Wars: The Force Unleashed (Xbox 360) - compression?

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
AlphaTwentyThree
Posts: 909
Joined: Sat Aug 09, 2014 11:21 am

Star Wars: The Force Unleashed (Xbox 360) - compression?

Post by AlphaTwentyThree »

Can somebody check these errornous files for a possible compression?
samples: http://www2.zippyshare.com/v/HarM8toj/file.html
The folder "normal" shows how the xp files should look, the folder "error" shows the variant.
Extraction script:

Code: Select all

open FDDE xd 0
open FDDE xp 1

endian big
get UNK long 0
get UNK long 0
get FILES long 0
get NAMESTART long 0
set NAMEOFF FILES
math NAMEOFF *= 0x1c
math NAMEOFF += 0x10
math NAMEOFF += NAMESTART # only in some files
get FOLDER basename
get FSIZE asize 1
for i = 1 <= FILES
   get CRC long 0
   get OFFSET long 0
   get OFFSET2 long 0
   get SIZE long 0
   get FFFF long 0
   get UNK long 0
   get ZERO long 0
   savepos MYOFF 0
   goto NAMEOFF 0
   get NAMEL long 0
   getDstring NAME NAMEL 0
   string NAME p= "%s~%s.swa" FOLDER NAME
   savepos NAMEOFF 0
   math OFFSET2 -= 0x800
   goto OFFSET2 1
   getDstring DUMMY 0x806 1
   get TEST byte 1
   if TEST != 0xfc
      string NAME p= "%s_0x%08x" NAME OFFSET2
   endif
   xmath TEST "OFFSET2 + SIZE"
   if TEST <= FSIZE
      log NAME OFFSET2 SIZE 1
   endif
   goto MYOFF 0
next i

Thanks for your help!
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Star Wars: The Force Unleashed (Xbox 360) - compression?

Post by aluigi »

The xp files are compressed with xbcompress.exe.
quickbms can handle them automatically when you specify comtype xmemdecompress.

For some unknown reasons cp_kaz.re.nv.xp doesn't decompress and quickbms remains freeded.
I will chek it but that feature has been tested very well some months ago so I don't know why that file gives problems.
AlphaTwentyThree
Posts: 909
Joined: Sat Aug 09, 2014 11:21 am

Re: Star Wars: The Force Unleashed (Xbox 360) - compression?

Post by AlphaTwentyThree »

Ok, that's some progress. :)
I've found dozens of other archives that lead to a non-responding: http://www79.zippyshare.com/v/53VxEQjz/file.html
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Star Wars: The Force Unleashed (Xbox 360) - compression?

Post by aluigi »

As I already said, you are supposed to use xbdecompress.exe to decompress them.

Consider that supporting those files is a feature of quickbms and not part of the xmemcompress algorithm, it's like uclpack for UCL.
I will review and try to fix the problem in quickbms 0.7.2
AlphaTwentyThree
Posts: 909
Joined: Sat Aug 09, 2014 11:21 am

Re: Star Wars: The Force Unleashed (Xbox 360) - compression?

Post by AlphaTwentyThree »

Oh ok... Tested and works fine.
Thanks for trying to fix this in quickbms!