ZenHAX

Free Game Research Forum | Official QuickBMS support | twitter @zenhax | SSL HTTPS://zenhax.com
It is currently Mon Oct 23, 2017 10:23 pm

All times are UTC




Post new topic  Reply to topic  [ 85 posts ]  Go to page Previous 1 2 3 4 5 Next
Author Message
PostPosted: Thu Oct 29, 2015 5:32 pm 

Joined: Mon Oct 19, 2015 4:55 pm
Posts: 2
For properly encrypt lua from minecraft:

Code:
int ttarch_import_lua(u8 *ext, u8 *buff, int size, u8 **outBuff, int *outSize, int encrypt) {
    if(ext && (!stricmp(ext, ".lua") || !stricmp(ext, ".lenc"))) {
        if((size >= 3) && (IS_LUA(buff) || (encrypt && gamenum >= 58))) {
         (*outBuff) = buff;
         (*outSize) = size;

         if (gamenum >= 58) {
            u8 *newbuff = malloc(sizeof(u8) * (size + 4));
            memcpy(newbuff, "\x1bLEo", 4);
            memcpy(newbuff + 4, buff, size);
            blowfish(newbuff + 4, size, encrypt);

            (*outBuff) = newbuff;
            (*outSize) = size + 4;

            //blowfish(buff, size, encrypt);
         } else if (gamenum >= 56) {
                memcpy(buff, "\x1bLEn", 4);
                blowfish(buff + 4, size - 4, encrypt);
            } else {
                blowfish(buff, size, encrypt);
            }
         return 0;
        }
    }
    return -1;
}


Code:
u64 crypt_it(FILE *fd, u8 *fname, u64 offset, int wanted_size /*signed!*/, int encrypt) {
...
   u8      *outBuff = NULL;
   int      outSize = 0;
...

if(wanted_size < 0) {
        if(ttarch_import_lua(ext, buff, size, &outBuff, &outSize, encrypt) < 0) {
            blowfish(buff, size, encrypt);
        }
    } else {
        if(ttarch_import_lua(ext, buff + offset, wanted_size, &outBuff, &outSize, encrypt) < 0) {
            blowfish(buff + offset, wanted_size, encrypt);
        }
    }

   if (outBuff != NULL) {
      dumpa(fname, outBuff, outSize, NULL, 0);
      return(outSize);
   }

    dumpa(fname, buff, size, NULL, 0);
    return(size);
}


When use:
Quote:
ttarchext -o -e 0 58 file.lua ..\Output


Top
   
PostPosted: Sun Nov 01, 2015 1:46 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 6915
Thanks for the info.


Top
   
PostPosted: Tue Aug 02, 2016 5:25 pm 

Joined: Sat Feb 13, 2016 8:52 am
Posts: 28
Attachment:
example batman ttarch.rar [3.68 MiB]
Downloaded 56 times
¨
Hello Aluigi,
can you please update your tools for new Batman game?

Thank you


Top
   
PostPosted: Wed Aug 03, 2016 6:43 am 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 6915
Currently the only obstacle is the compression used on the "eCTT" archives like the one you provided.

What I mean is that the chunks like the one attached to this post should decompress to 65536 bytes but I don't know what's the algorithm used.

P.S.: please note that I don't have the game


Attachments:
File comment: compressed 4ATT chcunk -> 65536 bytes
compressed.zip [29.1 KiB]
Downloaded 75 times
Top
   
PostPosted: Wed Aug 03, 2016 1:51 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 6915
Uhmmm oodle...
And it's oodle 2.3.0 that still uses the same algorithms of 2.2.0 (already available in quickbms) BUT the data compressed with kraken is no longer compatible with the kraken algorithm of 2.2.0:
http://www.radgametools.com/oodlehist.htm
I guess we have the culprit even if I have made no tests yet.

*edit* it's oodle, confirmed at 100%.


Top
   
PostPosted: Sat Aug 06, 2016 2:24 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 6915
I confirm that it's necessary oodle 2.3.0 for correctly decompressing the data (exactly as I said before about kraken).
Everything works perfectly, the only downside is that I have to release ttarchext as a 64bit application because the only oodle 2.3.0 available is 64bit.
It's not a problem (Batman is 64bit only), so I guess I will finish the new version of the tool and I will release it.


Top
   
PostPosted: Sat Aug 06, 2016 3:18 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 6915
Done, ttarchext 0.2.10:
http://aluigi.altervista.org/papers.htm#ttarchext


Top
   
PostPosted: Sat Aug 06, 2016 3:39 pm 

Joined: Tue Jan 05, 2016 11:26 pm
Posts: 2
aluigi wrote:


Thanks!
I know you are familiar with "You are AWESOME!" but i have to say it! YOU ARE AWESOME!!!1!!!


Top
   
PostPosted: Sat Aug 06, 2016 7:44 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 6915
:D


Top
   
PostPosted: Sun Aug 07, 2016 10:42 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 6915
A little note about the audio files extracted from the *ms.ttarch2 archives, the FSB files are not real fsb and the bank files contain a FEV file and FSB archive at certain offsets.
The codec of the data in the FSB archives is ogg so fsbext is not good for the job, I suggest to use this tool:
viewtopic.php?f=17&t=1901

You can use this simple script for dumping the FSB archive from the bank file:
Code:
findloc OFFSET string "FSB5"
get SIZE asize
math SIZE - OFFSET
get NAME basename
string NAME + ".fsb"
log NAME OFFSET SIZE

I don't know if this confusing fsb/riff/bank/fev+fsb solution was adopted also in the previous games from Telltale.


Top
   
PostPosted: Sat Dec 17, 2016 8:32 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 6915
The idea comes from an user while I realized the script for decrypting the chunks of the eCTT/ECTT ttarch archives.
Code:
# Decrypts all the chunks of the input eCTT/ECTT ttarch archive
# Usage:
# quickbms -C -w ttarch_test.bms batman\BM_pc_Arabic_txmesh.ttarch2
# The input file will be modiefied so use a backup!!!


Attachments:
ttarch_test.zip [18.9 KiB]
Downloaded 81 times
Top
   
PostPosted: Tue Dec 20, 2016 6:29 pm 
User avatar

Joined: Thu Aug 07, 2014 9:43 pm
Posts: 51
aluigi
The Walking Dead A New Frontier
Code:
ttarchext.exe -k A60B31D1ACB5DF98DB72FD2FB7DF1AD0EDAFE1B8967E266A45907CBA997F2CF14799A124F76C91B3E2F2010816FC8E85D8206963694E57 0 "c:\ttarchext\WD3_pc_Boot_data.ttarch2" WD3\

Quote:
- open file c:\ttarchext\WD3_pc_Boot_data.ttarch2
- set output folder WD3\
- set custom blowfish key
- found 3 compressed chunks

Error: the compressed zlib/deflate input at offset 0x0000002c (1059 -> 65536) is wrong or
incomplete

Sample: http://rgho.st/6D7V9mBBK
EXE: http://rgho.st/8JGsKrdrX

_________________
-= GP-team =-
https://twitter.com/Haoose


Top
   
PostPosted: Tue Dec 20, 2016 7:04 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 6915
Wrong key man :)
http://aluigi.altervista.org/papers.htm#ttarchext


Top
   
PostPosted: Tue Dec 20, 2016 7:42 pm 
User avatar

Joined: Thu Aug 07, 2014 9:43 pm
Posts: 51
aluigi
Perfect. Thanks!

_________________
-= GP-team =-
https://twitter.com/Haoose


Top
   
PostPosted: Mon Jan 02, 2017 7:03 am 

Joined: Mon Jan 02, 2017 6:56 am
Posts: 1
aluigi wrote:

hi aluigi
I want to localization for my friends. however, korean font is not supported.
i want to know how to change .font file or how to create.
Is it possible?
(i'm try localization for minecraft story mode)


Top
   
PostPosted: Tue Apr 18, 2017 2:46 pm 

Joined: Thu Dec 22, 2016 6:04 am
Posts: 3
Marvel's Guardians of the Galaxy
Code:
86DE8EA688D594B1E59DA59479DAB4C9CD938EE5B0A6669FAC96D0C79DD5C2A2D276627FA8D89ADED9DDD9DAAA63829F8CD887A5D4DBA0


Top
   
PostPosted: Tue Jun 06, 2017 10:48 am 

Joined: Tue Dec 13, 2016 7:37 pm
Posts: 3
Hi)
How decrypt ttarch2 from TWD New Frontier Complete Season (Episode 5) without unpack? Thx


Top
   
PostPosted: Tue Jun 06, 2017 4:15 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 6915
As far as I remember it's not possible because it's not just one unique compressed file, it's composed by various parts that are encrypted and aren't.
Anyway the command-line option is -d 0 (0 is the offset you have to specify), hopefully other users are able to help you but I think that someone else already asked something similar.


Top
   
PostPosted: Wed Jun 07, 2017 7:06 am 
User avatar

Joined: Tue Jun 23, 2015 3:45 pm
Posts: 5
aluigi, when you can add the game Marvel's Guardians of the Galaxy: The Telltale Series in the program ttarchext?

_________________
Не знать, не стыдно - стыдно не хотеть узнать.


Top
   
PostPosted: Wed Jun 07, 2017 7:12 am 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 6915
You can specify the key of that game with the option:
-k 86DE8EA688D594B1E59DA59479DAB4C9CD938EE5B0A6669FAC96D0C79DD5C2A2D276627FA8D89ADED9DDD9DAAA63829F8CD887A5D4DBA0

https://forum.xentax.com/viewtopic.php?p=129874#p129874
That option makes everything easy (moreover for me eh eh eh), that's why I have not updated the tool yet.
Anyway I'm aware of a new episode two so maybe I can update it adding also the key of this new one.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 85 posts ]  Go to page Previous 1 2 3 4 5 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:
Powered by phpBB® Forum Software © phpBB Limited