READ THE RULES: Click here

Follow us on Facebook: https://www.facebook.com/xentax/ :)

Train Driver 2005 - .ja files (Complete archive attached)

Old posts about game archives and other formats.
nikita
VIP member
VIP member
Posts: 28
Joined: Sun Dec 11, 2005 12:34 pm

Train Driver 2005 - .ja files (Complete archive attached)

Post by nikita » Fri Dec 16, 2005 5:39 pm

The filenames arent encrypted but are in the file 1 by 1. however i think a list of the files is in the end!

Hope u can figure out which compression it uses (hopefully zlib))

http://rapidshare.de/files/9282149/Core.rar.html
4mb

User avatar
aluigi
VVIP member
VVIP member
Posts: 1917
Joined: Thu Dec 08, 2005 12:26 pm
Location: www.ZENHAX.com
Has thanked: 4 times
Been thanked: 644 times
Contact:

Post by aluigi » Fri Dec 16, 2005 10:24 pm

If something is compressed with zlib within the file you can check it by yourself with Offzip:

http://aluigi.altervista.org/mytoolz.htm#offzip

create a temp folder and then type:

offzip -a yourfile.dat temp 0
and if finds nothing:
offzip -z -15 -a yourfile.dat temp 0

(the tool supports also other search-only options)
it will extract all the compressed data in the package or will display many errors (in this case press CTRL-C and we need to find what other compression algorithm has been used).
Why doesn't exist a demo or an official homepage for this game?

nikita
VIP member
VIP member
Posts: 28
Joined: Sun Dec 11, 2005 12:34 pm

Post by nikita » Fri Dec 16, 2005 11:00 pm

Dunno why theres no demo.. I bought the game in Game Workshop in Denmark yesterday..

nikita
VIP member
VIP member
Posts: 28
Joined: Sun Dec 11, 2005 12:34 pm

Post by nikita » Fri Dec 16, 2005 11:06 pm

yeah alot of errors :/
but the trainz are so beautyfull :P, i would like to drop a cc50 tank train inthere hehe!

User avatar
aluigi
VVIP member
VVIP member
Posts: 1917
Joined: Thu Dec 08, 2005 12:26 pm
Location: www.ZENHAX.com
Has thanked: 4 times
Been thanked: 644 times
Contact:

Post by aluigi » Fri Dec 16, 2005 11:25 pm

That's bad, means the game uses encryption or other types of compression.
Unfortunately only zlib and another small number of libraries allows to know if a piece of data is correctly compressed with that algorithm.
I have written a simple tool which uses many algorithms for unpacking data but it cannot "search" the compressed data for the above reason, it's useful only when you know where the compressed data starts and what are the first bytes of the decompressed data.
In short, without the game is not possible to make something.

nikita
VIP member
VIP member
Posts: 28
Joined: Sun Dec 11, 2005 12:34 pm

Post by nikita » Sat Dec 17, 2005 9:57 am

yeah maybe encrypted but so many words inthere, so i dont think its encrypted just compressed.. The words i spot is like dynamic.braks etc.. Inside the what looks like compressed data!

however everyfile has that CFIL header
after that i founc several values which shows offset position in the main archive file, and length of each file..
Fileend is marked with FIL

Sly
n00b
Posts: 11
Joined: Tue Aug 03, 2004 11:19 pm
Been thanked: 4 times

Post by Sly » Sat Dec 17, 2005 11:27 pm

In short, without the game is not possible to make something.
It's possible.
You do not have the required permissions to view the files attached to this post.

User avatar
Mr.Mouse
Site Admin
Posts: 4041
Joined: Wed Jan 15, 2003 6:45 pm
Location: Dungeons of Doom
Has thanked: 412 times
Been thanked: 561 times
Contact:

Post by Mr.Mouse » Sat Dec 17, 2005 11:46 pm

Sly, where did you get this from? Did you make this? Can you please explain the compression algorithm that was used if you made this? This is something we really need explained in the WIKI. http://wiki.xentax.com Please help us out. If you didn't write this tool, then who did? :?

mambox
mega-veteran
mega-veteran
Posts: 188
Joined: Wed Mar 24, 2004 2:06 pm
Has thanked: 5 times
Been thanked: 4 times

Post by mambox » Sun Dec 18, 2005 8:36 pm

this place rules!

from nowhere a guy post a tool who do the work ;)

nikita
VIP member
VIP member
Posts: 28
Joined: Sun Dec 11, 2005 12:34 pm

Post by nikita » Sun Dec 18, 2005 11:42 pm

kiss kiss kiss! thanx hun.. case closed :P
For ppl modding! For making the game read the unpacked data! Place it like this!

F.ex..
World\Core.ja

place in World\Core\*.*

or root\data.ja

to root\data\*.*

when decompressed! u can remove the ja files.

User avatar
Mr.Mouse
Site Admin
Posts: 4041
Joined: Wed Jan 15, 2003 6:45 pm
Location: Dungeons of Doom
Has thanked: 412 times
Been thanked: 561 times
Contact:

Post by Mr.Mouse » Mon Dec 26, 2005 8:13 pm

Sly, I ask you once again. Will you explain the algorithm used to compress in the .JA archives?

If not, why not? If you come here to bloat about your achievements only, we'd rather have you leave. The purpose of this forum is to openly share knowledge, not keep them to ourselves.

User avatar
Mr.Mouse
Site Admin
Posts: 4041
Joined: Wed Jan 15, 2003 6:45 pm
Location: Dungeons of Doom
Has thanked: 412 times
Been thanked: 561 times
Contact:

Post by Mr.Mouse » Sun Jan 08, 2006 1:32 am

Thanks to Rahly's excellent reverse engineering of Sly's attachment (hello Sly, Pespin doesn't protect enough!), we now have the .ja compression solved for the most part.

I've written a plugin for MultiEx Commander that will enable you to extract the core.ja archive attached to this thread. Hopefully it'll work with other ja files as well. Scroll down to get the plugin! Make a JA folder in MexCom's data/plugins folder and put the dll there.

Here's the raw VB source code for the routine:

Code: Select all



' Rahly's cool effort resulted in a Delphi application
' Mr.Mouse converted Rahly's code to VB and adapted it to fit CFIL files. 

Public Function DecompressJAFile(source As String, dest As String) As Boolean

Dim MyFile
Dim Buffer1() As Byte, Buffer2() As Byte
Dim Count As Long, Count2 As Long
Dim Temp1(255) As Byte, Temp2(255) As Byte, Temp3(255) As Byte, Temp4(255) As Byte
Dim TempChar As Long, Counter As Long, Temp As Long, Temp2value As Long, TempIt As Long
Dim CFIL As Long, U1 As Long, UnCom As Long
Dim BlockSize As Integer

On Error GoTo Hell

MyFile = FreeFile
Open source For Binary Access Read As MyFile
Get MyFile, , CFIL
Get MyFile, , U1
Get MyFile, , UnCom
ReDim Buffer2(UnCom - 1)


 For Count = 0 To 255
 Temp3(Count) = Count
 Next Count
 
 Count2 = 0
 
Do

Get MyFile, , BlockSize

If BlockSize > 0 Then ' compression , max bock 7fff?

ReDim Buffer1(BlockSize - 1)

Get MyFile, , Buffer1
 
 Counter = 0
 
 Do
 
   For Count = 0 To 255
   Temp1(Count) = Temp3(Count)
   Next Count
   
   TempChar = Buffer1(Counter)
   Counter = Counter + 1
   Temp = 0

    Do
      If TempChar > &H7F Then
        Temp = TempChar + Temp - &H7F
      Else
        If TempChar >= 0 Then
          TempIt = TempChar + 1
           Do
            Temp1(Temp) = Buffer1(Counter)
            Counter = Counter + 1
            If Temp <> Temp1(Temp) Then
              Temp4(Temp) = Buffer1(Counter)
              Counter = Counter + 1
            End If
            Temp = Temp + 1
            TempIt = TempIt - 1
           Loop Until TempIt = 0
          End If ''tempchar >= 0
       End If '' else

      If Temp < &H100 Then
        TempChar = Buffer1(Counter)
        Counter = Counter + 1
      End If
        
    Loop Until Temp >= &H100
     
    TempIt = LShiftLong(Buffer1(Counter), 8) Or Buffer1(Counter + 1)

    Counter = Counter + 2
    Temp2value = 0
    Do
      
      If Temp2value <> 0 Then
        Temp2value = Temp2value - 1
        Temp = Temp2(Temp2value)
      Else
        Temp = TempIt
        TempIt = TempIt - 1
        If Temp = 0 Then Exit Do
  

        Temp = Buffer1(Counter)
        Counter = Counter + 1

      End If
      TempChar = Temp1(Temp)
      If Temp = (TempChar And &HFF) Then
        Buffer2(Count2) = Temp
        Count2 = Count2 + 1
      
      Else
        Temp = Temp4(Temp)
        Temp2(Temp2value) = Temp
        Temp2(Temp2value + 1) = TempChar
        Temp2value = Temp2value + 2
      End If
  Loop
  
  Loop Until Counter >= UBound(Buffer1) + 1
  
  Else ' maxblock
  ReDim Buffer1(32768 - Abs(BlockSize) - 1)
  Get MyFile, , Buffer1
  For t = 0 To (UBound(Buffer1))   Buffer2(Count2) = Buffer1(t)
  Count2 = Count2 + 1
  Next t
  End If
  
  'YES, I KNOW I SHOULD HAVE USED SOME 
  'COLONEL MEMCOPY BITCHING ROUTINE FOR THAT BUFFER1->2 BIT!!!!!!
  
  Loop Until Count2 >= UnCom
  
  Close MyFile
  ReDim Preserve Buffer2(Count2 - 1)
  
  On Error Resume Next
  Kill dest
  On Error GoTo Hell
  
  MyFile = FreeFile
  Open dest For Binary Access Write As MyFile
  Put MyFile, , Buffer2
  Close MyFile
  DecompressJAFile = True
  
  Exit Function

Hell:
 DecompressJAFile = False


End Function
You do not have the required permissions to view the files attached to this post.
Last edited by Mr.Mouse on Mon Jan 09, 2006 12:11 am, edited 2 times in total.

Sly
n00b
Posts: 11
Joined: Tue Aug 03, 2004 11:19 pm
Been thanked: 4 times

Post by Sly » Sun Jan 08, 2006 2:01 pm

Well, if you can't write your own code then try to find and RE my unpackers for Guild Wars, Blood Magic and StarForce protected games (Bet on Soldier, etc). :)

User avatar
Mr.Mouse
Site Admin
Posts: 4041
Joined: Wed Jan 15, 2003 6:45 pm
Location: Dungeons of Doom
Has thanked: 412 times
Been thanked: 561 times
Contact:

Post by Mr.Mouse » Sun Jan 08, 2006 2:48 pm

Sly wrote:Well, if you can't write your own code then try to find and RE my unpackers for Guild Wars, Blood Magic and StarForce protected games (Bet on Soldier, etc). :)
You have missed the point of this forum completely, Sly. This forum is not about feeling good about yourself because you can do things others can't (yet), it's about sharing knowledge.

Coding extractors and stuff, like we do here, is not magic, it just takes some basic skill to do it. If you think you must act like a child who doesn't recieve much attention, so be it. :)

But remember one thing, whatever you code, it means nothing. Don't make a big thing about nothing. We certainly don't, we are just here to help out others and have fun at solving puzzles. If we solve it, we post the solution, so others don't have to go through that again. You can see the result at the WIKI. And we are proud of it. :D

Have fun at lurking at this forum! Hope you learn something, so you can use it in your own programs, to boast about it at other forums! ;)

mambox
mega-veteran
mega-veteran
Posts: 188
Joined: Wed Mar 24, 2004 2:06 pm
Has thanked: 5 times
Been thanked: 4 times

Post by mambox » Sun Jan 08, 2006 5:02 pm

@sly:

all links appreciated for your work :)

Post Reply