Lego Worlds (.DAT)

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
Deadbot
Posts: 7
Joined: Mon Sep 28, 2015 7:07 pm

Lego Worlds (.DAT)

Post by Deadbot »

its possible extract archives from game.dat
since ttgame.bms script its not working anymone?
Xiron
Posts: 104
Joined: Sat Sep 12, 2015 7:09 am

Re: Lego Worlds (.DAT)

Post by Xiron »

So they changed it again? aluigi already fixed this at the end of August. Hmm...
Deadbot
Posts: 7
Joined: Mon Sep 28, 2015 7:07 pm

Re: Lego Worlds (.DAT)

Post by Deadbot »

yes, all text files with strange characters inside
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Lego Worlds (.DAT)

Post by aluigi »

samples?
Deadbot
Posts: 7
Joined: Mon Sep 28, 2015 7:07 pm

Re: Lego Worlds (.DAT)

Post by Deadbot »

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

Re: Lego Worlds (.DAT)

Post by aluigi »

From the link provided by Xiron:

Code: Select all

Basically these ZIPX chunks are used only for the TXT files and they
are probably obfuscated/encrypted.
Now the script no longer breaks at that point and extracts everything.
There is no solution yet for these TXT files.
Ekey
Posts: 1383
Joined: Sat Aug 09, 2014 2:34 pm

Re: Lego Worlds (.DAT)

Post by Ekey »

Encryption like xor + keygen. Key must be 256 bytes. For each file encryption key is different.
Ekey
Posts: 1383
Joined: Sat Aug 09, 2014 2:34 pm

Re: Lego Worlds (.DAT)

Post by Ekey »

Here my tool. Supported files *.TXT, *.XML, *.SF, *.CFG, *.CSV, *.LXFML

Code: Select all

[Usage]
        LWDecryptor <pScrFile> <pDstFile>


Example decrypt

Code: Select all

[Example]
        LWDecryptor GAMEVERSION.TXT GAMEVERSION_DEC.TXT


Also you can encrypt it back, example:

Code: Select all

        LWDecryptor GAMEVERSION_DEC.TXT GAMEVERSION.TXT


:)

Edited: Download -> see below
Last edited by Ekey on Tue Sep 29, 2015 11:16 am, edited 2 times in total.
Ekey
Posts: 1383
Joined: Sat Aug 09, 2014 2:34 pm

Re: Lego Worlds (.DAT)

Post by Ekey »

  • Fixed problem with files size more than 30kb
:)
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Lego Worlds (.DAT)

Post by aluigi »

It's RC4 using the size of the file as key.
I'm modifying the script to do the decryption on the fly.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Lego Worlds (.DAT)

Post by aluigi »

I have updated ttgames.bms but I don't have a sample to test.
Xiron
Posts: 104
Joined: Sat Sep 12, 2015 7:09 am

Re: Lego Worlds (.DAT)

Post by Xiron »

Tried it, this is the output:

Code: Select all

- 0 files found in 0 seconds
  coverage file 0     0%   1077448    1590135720
  coverage file -1    4%   46447      1044648   
  coverage file -2    0%   0          32768     
Error: the compressing signature at offset 485756498 ()}7Z) is not known, contact me
Deadbot
Posts: 7
Joined: Mon Sep 28, 2015 7:07 pm

Re: Lego Worlds (.DAT)

Post by Deadbot »

did u need the game.dat aluigi?

@Xiron yes, same error for me

@Ekey works very well good job!
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Lego Worlds (.DAT)

Post by aluigi »

Version 0.7.2, let me know if this one works (no errors and decrypted txt files).
Deadbot
Posts: 7
Joined: Mon Sep 28, 2015 7:07 pm

Re: Lego Worlds (.DAT)

Post by Deadbot »

empty text files with 0kb
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Lego Worlds (.DAT)

Post by aluigi »

Could you please refresh and redownload the script?
There was a bug that I fixed 2 minutes after the initial upload, you should see "math TMP2 = SIZE" at line 312
Deadbot
Posts: 7
Joined: Mon Sep 28, 2015 7:07 pm

Re: Lego Worlds (.DAT)

Post by Deadbot »

its worked but some text file still encrypted/obfuscated
all another files has been decrypted...
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Lego Worlds (.DAT)

Post by aluigi »

Ekey, do you think this problem is related to the 30k thing you said?
Any idea?
Ekey
Posts: 1383
Joined: Sat Aug 09, 2014 2:34 pm

Re: Lego Worlds (.DAT)

Post by Ekey »

You need decrypt file data by blocks with maximum size 0x8000
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Lego Worlds (.DAT)

Post by aluigi »

so I guess that the encryption is performed after the decompression (CHUNK_SIZE).
I feel blind because I don't have a ZIPX sample to test, would be cool to have just the part from the first big (>0x8000) ZIPX to the next one.