Page 1 of 3
Train Driver 2005 - .ja files (Complete archive attached)
Posted: Fri Dec 16, 2005 5:39 pm
by nikita
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
Posted: Fri Dec 16, 2005 10:24 pm
by aluigi
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?
Posted: Fri Dec 16, 2005 11:00 pm
by nikita
Dunno why theres no demo.. I bought the game in Game Workshop in Denmark yesterday..
Posted: Fri Dec 16, 2005 11:06 pm
by nikita
yeah alot of errors :/
but the trainz are so beautyfull

, i would like to drop a cc50 tank train inthere hehe!
Posted: Fri Dec 16, 2005 11:25 pm
by aluigi
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.
Posted: Sat Dec 17, 2005 9:57 am
by nikita
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
Posted: Sat Dec 17, 2005 11:27 pm
by Sly
In short, without the game is not possible to make something.
It's possible.
Posted: Sat Dec 17, 2005 11:46 pm
by Mr.Mouse
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?

Posted: Sun Dec 18, 2005 8:36 pm
by mambox
this place rules!
from nowhere a guy post a tool who do the work

Posted: Sun Dec 18, 2005 11:42 pm
by nikita
kiss kiss kiss! thanx hun.. case closed

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.
Posted: Mon Dec 26, 2005 8:13 pm
by Mr.Mouse
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.
Posted: Sun Jan 08, 2006 1:32 am
by Mr.Mouse
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
Posted: Sun Jan 08, 2006 2:01 pm
by Sly
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).

Posted: Sun Jan 08, 2006 2:48 pm
by Mr.Mouse
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.
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!

Posted: Sun Jan 08, 2006 5:02 pm
by mambox
@sly:
all links appreciated for your work
