[REQ] Tales of Berseria Official version

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: [REQ] Tales of Berseria Official version

Post by aluigi »

The tofhda/tofhdb/tldat files are all encrypted just like with http://zenhax.com/viewtopic.php?f=9&t=3664
sigroon365
Posts: 330
Joined: Fri Nov 21, 2014 4:03 am

Re: [REQ] Tales of Berseria Official version

Post by sigroon365 »

aluigi wrote:The tofhda/tofhdb/tldat files are all encrypted just like with viewtopic.php?f=9&t=3664


Yes it is.. :cry:
Ekey
Posts: 1383
Joined: Sat Aug 09, 2014 2:34 pm

Re: [REQ] Tales of Berseria Official version

Post by Ekey »

ASM Code
C PseudoCode

Accepted arguments > ScrBuffer, Size, Unknown (Key?)
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: [REQ] Tales of Berseria Official version

Post by aluigi »

I already have the decryption code.
Just checking the last things regarding the handling of the keys which is the most complex part.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: [REQ] Tales of Berseria Official version

Post by aluigi »

In short tofhda is the array of 64bit keys
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: [REQ] Tales of Berseria Official version

Post by aluigi »

http://aluigi.org/bms/tales_of_berseria.bms

P.S.: the big files in TOTEXP_P are DDS with a 32bit SIZE field at the beginning (even if the real size of the file may be a bit shorter in some cases).
P.S.2: I don't know why deflate gives error and it's necessary to use deflate_noerror, it's all correct from my side (1:1 copy from the old script).
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: [REQ] Tales of Berseria Official version

Post by aluigi »

ah I guess I have found why deflate doesn't work, expect a new version of the script soon.
sigroon365
Posts: 330
Joined: Fri Nov 21, 2014 4:03 am

Re: [REQ] Tales of Berseria Official version

Post by sigroon365 »

aluigi wrote:http://aluigi.org/bms/tales_of_berseria.bms

P.S.: the big files in TOTEXP_P are DDS with a 32bit SIZE field at the beginning (even if the real size of the file may be a bit shorter in some cases).
P.S.2: I don't know why deflate gives error and it's necessary to use deflate_noerror, it's all correct from my side (1:1 copy from the old script).



Thank you!!!!!!
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: [REQ] Tales of Berseria Official version

Post by aluigi »

Script 0.1.1 :D
sigroon365
Posts: 330
Joined: Fri Nov 21, 2014 4:03 am

Re: [REQ] Tales of Berseria Official version

Post by sigroon365 »

aluigi wrote:Script 0.1.1 :D


Thank you aluigi. I already sent message to you but..
Is it impossible to something like this?

1) Decrypt FILEHEADER.TOFHDB and TLFILE.TLDAT without unpacking. I mean getting FILEHEADER.TOFHDB.dec and TLFILE.TLDAT.dec
2) Encrypt FILEHEADER.TOFHDB.dec and TLFILE.TLDAT.dec into FILEHEADER.TOFHDB and TLFILE.TLDAT

*FILEHEADER.TOFHDA doesn't need for modding. It does not relate with TOFHDB and TLDAT.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: [REQ] Tales of Berseria Official version

Post by aluigi »

TOFHDA is the container of the keys.
I don't think there are ways to use the reimport mode in other ways.

Since the encryption is just a XOR with a dynamic sequence of bytes, I was thinking to something like creating this sequence and then using Filexor or Encryption for the job.
The problem is that the sequence is generated with the input data so the xor key changes with the content of the data/file.
In short, I have already spent time for this stuff, now you need other external solutions if you want to mod the game.
Sorry.
sigroon365
Posts: 330
Joined: Fri Nov 21, 2014 4:03 am

Re: [REQ] Tales of Berseria Official version

Post by sigroon365 »

aluigi wrote:TOFHDA is the container of the keys.
I don't think there are ways to use the reimport mode in other ways.

Since the encryption is just a XOR with a dynamic sequence of bytes, I was thinking to something like creating this sequence and then using Filexor or Encryption for the job.
The problem is that the sequence is generated with the input data so the xor key changes with the content of the data/file.
In short, I have already spent time for this stuff, now you need other external solutions if you want to mod the game.
Sorry.


Thank you!
External solutions.. well I'm not sure I can deal with it by myself.
And there's one error when I unpacked TLDAT in common folder.
Image
sigroon365
Posts: 330
Joined: Fri Nov 21, 2014 4:03 am

Re: [REQ] Tales of Berseria Official version

Post by sigroon365 »

The problem is reimporting..

Image
Image
Magilou
Posts: 1
Joined: Mon Jan 30, 2017 8:27 pm

Re: [REQ] Tales of Berseria Official version

Post by Magilou »

Anyone knows how to get and open the sound files?
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: [REQ] Tales of Berseria Official version

Post by AnonBaiter »

Magilou wrote:Anyone knows how to get and open the sound files?
Can you elaborate something about these "sound files"?
xtreme1
Posts: 4
Joined: Thu Feb 02, 2017 6:02 am

Re: [REQ] Tales of Berseria Official version

Post by xtreme1 »

I'm trying to get the Japanese PS3 versions script working on PC (theoretically the ENG script on PS3 as well). I was able to dump the english script with quickBMS 0.1.1's script. But trying to use that script on the PS3 version obviously doesn't work. I tried tweaking it to work without referencing the TOFHDA but no luck.

Anyone have any ideas how to get the JP version dumped?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: [REQ] Tales of Berseria Official version

Post by aluigi »

have you tried also tales_of_xillia.bms?
sigroon365
Posts: 330
Joined: Fri Nov 21, 2014 4:03 am

Re: [REQ] Tales of Berseria Official version

Post by sigroon365 »

xtreme1 wrote:I'm trying to get the Japanese PS3 versions script working on PC (theoretically the ENG script on PS3 as well). I was able to dump the english script with quickBMS 0.1.1's script. But trying to use that script on the PS3 version obviously doesn't work. I tried tweaking it to work without referencing the TOFHDA but no luck.

Anyone have any ideas how to get the JP version dumped?


That is different from PC version. Use common tales bms script.
xtreme1
Posts: 4
Joined: Thu Feb 02, 2017 6:02 am

Re: [REQ] Tales of Berseria Official version

Post by xtreme1 »

sigroon365 wrote:
xtreme1 wrote:I'm trying to get the Japanese PS3 versions script working on PC (theoretically the ENG script on PS3 as well). I was able to dump the english script with quickBMS 0.1.1's script. But trying to use that script on the PS3 version obviously doesn't work. I tried tweaking it to work without referencing the TOFHDA but no luck.

Anyone have any ideas how to get the JP version dumped?


That is different from PC version. Use common tales bms script.

Ok so that dumped TOTEXB_D and TOTEXP_P. How can i get this game to read these files? Does it support reading extracted files already or is there a command line argument? Also It doesn't contain a file of TTF's that have the script like Berseria's English quickBMS script dumped.

Xillia says: . 0x435a4c54 . deflate . lzma_dynamic . copy . MSF, and the files are lzma, how can I decrypt them to look at the contents?