Lego Star Wars the complete saga GAME.dat won't extract.

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
Dolphin-1
Posts: 12
Joined: Thu Jun 08, 2017 9:08 pm

Lego Star Wars the complete saga GAME.dat won't extract.

Post by Dolphin-1 »

Every time I try to extract the game.dat file for lswtcs i get an error message that goes like this when trying to extract the files for the 2player dagobah level:
-------------------
*EXCEPTION HANDLER*
-------------------
An error or crash occurred:

*EH* ExceptionCode c0000005 access violation
*EH* ExceptionFlags 00000000
*EH* ExceptionAddress 1919685b
*EH* NumberParameters 00000002
*EH* 00000008
*EH* 1919685b

Last script line before the error or that produced the error:
513 clog MEMORY_FILE2 OFFSET CHUNK_ZSIZE CHUNK_SIZE

Press ENTER or close the window to quit


I'm using the latest version of everything. Could someone help me please?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Lego Star Wars the complete saga GAME.dat won't extract.

Post by aluigi »

Are you using the latest version of quickbms and the script 0.9.8?
If yes then upload the archive.
Dolphin-1
Posts: 12
Joined: Thu Jun 08, 2017 9:08 pm

Re: Lego Star Wars the complete saga GAME.dat won't extract.

Post by Dolphin-1 »

I did try it and here is a link to the archive:

http://www.mediafire.com/file/vsk0jbnew833x5a/GAME.DAT
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Lego Star Wars the complete saga GAME.dat won't extract.

Post by aluigi »

The bad news is that there is no solution.
The LZ2K compressed chunk at offset 0x1ed3689f with compressed size 0x0001d54a and uncompressed 0x00040000 is partially invalid, in fact the decompression function (which is the original one of the game) tries to terminate the execution due to an error and you get a crash due to the lack of these "kill" functions.

The size of the chunk is correct, so that's not the problem.
Maybe it's a sort of new variant of the algorithm that uses a bigger buffer/dictionary, don't know, except that this is the first chunk in years that give the problem.
Are you sure your file isn't corrupted? It's enough that one byte is invalid to cause the problem.

I can do nothing but in the next version of quickbms I can simply remove the calling of the "kill" function that does NOT solve the problem since the decompressed data obviously is wrong, but avoids the crash.