The rules have been updated, read them now: Rules!

[REQ] Tera Online

The Original Forum. Game archives, full of resources. How to open them? Get help here.
Post Reply
Lozzano
ultra-n00b
Posts: 1
Joined: Tue Feb 28, 2012 7:52 pm

[REQ] Tera Online

Post by Lozzano » Tue Feb 28, 2012 7:58 pm

Hi,

So I was thinking of creating some sort of DB over the items in Tera, this would however require an insight in the gamefiles (I think). Does anyone know how to access them, or how to mine them and extract the information in a XML, CSV, SQL or some other sensible format? I am good with programming languages in generel, as well as datamanipulation etc., but the whole mining it seems not to be my area of expertiese. I have spent allmost all of today looking into the area, as well as looking into the gamefiles of Tera, but I seem to need help.

I hope someone can point me in the right direction, or if someone wants, join my "project" of creating a Tera Online Database for when the game launches. As there is no DB at this present time, there might even be a penny or two to be earned by this.

In any case, help is apriciated and welcomed! Look me up if you've got something to say :-)

Best regards,
Lozzano

Ekey
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 1737
Joined: Wed Mar 31, 2010 6:54 am
Has thanked: 85 times
Been thanked: 952 times

Re: [REQ] Tera Online

Post by Ekey » Tue Feb 28, 2012 11:14 pm

So all this info contained in "Client\S1Game\DataCenter_Final.dat" file and encrypted with AES-128-CFB.
To decrypt is required key & iv hidden inside main executable and which protected by Themida.
Unpacked game client you can found -> here. Code for work DataCenter files obfuscated with Virtual Machine :)

From another forum -> Example in openssl

[Encryption is AES-128-CFB]

Code: Select all

openssl enc -aes-128-cfb -e -in data1.txt -out data2.txt
[Decryption is AES-128-CFB]

Code: Select all

openssl enc -aes-128-cfb -d -in data2.txt -out data1.txt

Code: Select all

openssl enc -aes-128-cfb -e  -K 123456789 -iv 128 -in data1.txt -out data2.txt
openssl enc -aes-128-cfb -d  -K 123456789 -iv 128 -in data2.txt -out data1.txt
Search correct key & iv and will be decrypted :)

Ekey
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 1737
Joined: Wed Mar 31, 2010 6:54 am
Has thanked: 85 times
Been thanked: 952 times

Re: [REQ] Tera Online

Post by Ekey » Sat Mar 03, 2012 11:56 pm

  • 1 - S1Data Loading -> 00D8A5A0
  • 2 - AES Decrypting 00401880 -> 0044C680
  • 3 - Additional Operations with DAT :oops: Function Protected (Virtual Machine) -> 004A7D38
  • 4 - Zlib Uncompress
Result

Image

Decrypted and Decompressed here

SystemIsGod
ultra-n00b
Posts: 2
Joined: Sun Mar 04, 2012 7:09 am

Re: [REQ] Tera Online

Post by SystemIsGod » Sun Mar 04, 2012 7:11 am

What was the program you used to open the dat? Notepad doesn't work 100% so if you wouldn't mind shedding some insight, please.

Ekey
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 1737
Joined: Wed Mar 31, 2010 6:54 am
Has thanked: 85 times
Been thanked: 952 times

Re: [REQ] Tera Online

Post by Ekey » Sun Mar 04, 2012 11:18 am

SystemIsGod wrote:What was the program you used to open the dat? Notepad doesn't work 100% so if you wouldn't mind shedding some insight, please.
Use Hex editor. Text in Unicode format. :)

finale00
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 2382
Joined: Sat Apr 09, 2011 1:22 am
Has thanked: 170 times
Been thanked: 300 times

Re: [REQ] Tera Online

Post by finale00 » Sun Mar 04, 2012 11:30 am

Use notepad++
Or any text editor that supports more than just ASCII........................

SystemIsGod
ultra-n00b
Posts: 2
Joined: Sun Mar 04, 2012 7:09 am

Re: [REQ] Tera Online

Post by SystemIsGod » Sun Mar 04, 2012 5:10 pm

Neither programs or anything similar you 2 listed really seem to help. Notepadd++ didn't and neither did any hex edit program I used.

Kritiker
ultra-n00b
Posts: 6
Joined: Sun Jan 18, 2009 1:30 pm

Re: [REQ] Tera Online

Post by Kritiker » Wed Mar 14, 2012 2:53 pm

HexWorkshop works just fine.

I would like to know more about that file structure, i can read strings but to get anything more out of it is pretty much impossible. So maybe this file is still packed or whatever

cypeh
ultra-n00b
Posts: 1
Joined: Wed Mar 14, 2012 11:44 pm
Has thanked: 1 time

Re: [REQ] Tera Online

Post by cypeh » Wed Mar 14, 2012 11:58 pm

Hey Ekey,

thanks a lot for pointing this out. But could you (or anyone else) explain how exactly did you find and retrieve the key&iv from the exe? I wanted to try the whole process myself but I'm kinda lost. :/

Ekey
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 1737
Joined: Wed Mar 31, 2010 6:54 am
Has thanked: 85 times
Been thanked: 952 times

Re: [REQ] Tera Online

Post by Ekey » Thu Mar 15, 2012 10:21 am

@Kritiker
DC itself is a heavily-indexed XML-based database of some custom format. It consists of key-value sets, value and key arrays, tree structure and several index and hashing blocks.

@cypeh
Debugging

Ekey
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 1737
Joined: Wed Mar 31, 2010 6:54 am
Has thanked: 85 times
Been thanked: 952 times

Re: [REQ] Tera Online

Post by Ekey » Sat May 19, 2012 8:36 pm

Tool for decrypting -> here

Post Reply