Jump to content

RTL Ski Jumping 2002 (PC) - PAK file


ikskoks
Go to solution Solved by Thief1987,

Recommended Posts

Hi. Any tools or scripts available for PAK file from "RTL Ski Jumping 2002" (PC)?
Sample file --> https://drive.google.com/file/d/1BKKgEBWTSye_9ayMGSggAeZ6uBg27AeW/view?usp=sharing

Compression method is currently unknown.

File format should look like this:

// PAK file format

// directory
number_of_files *
{
   4 bytes (uint32) - compressed file size
   4 bytes (uint32) - file ID?
   4 bytes (uint32) - unknown
   4 bytes (uint32) - unknown
   64 bytes (char) - file path  // e.g. "SOUND\TEXTPL\10_001A.WAV"
}

x bytes - padding (nulls)

// data
number_of_files *
{
   8 bytes (uint64) - uncompressed file size??
   x bytes - compressed file data
   x bytes - padding  (filled with 0xAA 0xAA 0xAA...)
}


 

Link to comment
Share on other sites

On 3/13/2024 at 11:11 PM, ikskoks said:

Hi. Any tools or scripts available for PAK file from "RTL Ski Jumping 2002" (PC)?
Sample file --> https://drive.google.com/file/d/1BKKgEBWTSye_9ayMGSggAeZ6uBg27AeW/view?usp=sharing

Compression method is currently unknown.

File format should look like this:

// PAK file format

// directory
number_of_files *
{
   4 bytes (uint32) - compressed file size
   4 bytes (uint32) - file ID?
   4 bytes (uint32) - unknown
   4 bytes (uint32) - unknown
   64 bytes (char) - file path  // e.g. "SOUND\TEXTPL\10_001A.WAV"
}

x bytes - padding (nulls)

// data
number_of_files *
{
   8 bytes (uint64) - uncompressed file size??
   x bytes - compressed file data
   x bytes - padding  (filled with 0xAA 0xAA 0xAA...)
}


 

Not sure of compression, looks like some RLE variation, maybe not too complicated.

In the file table, the second value is the file offset - multiply by 0x800 to get actual offset.

The third value is unknown but always seems to be slightly bigger than the decompressed size.

The fourth value is the decompressed size - it should be the same value as in the file data header

 

 

  • Like 1
Link to comment
Share on other sites

set base_off = 0x800

for
get comp long
if comp == 0
break
endif
get offset long
get size long
get decomp long
math offset * base_off
getdstring name 0x40
log name offset size
next

 

  • Like 1
Link to comment
Share on other sites

On 3/19/2024 at 7:11 PM, Thief1987 said:

Here is the tool for unpacking, with the decompression. To use it just enter archive name in the command line

Thanks. Any chance for source code?

And I have some additional questions:
 1. Is the compression method well known or is it something custom?
 2. What was the purpose of 8 bytes right before compressed data?

Link to comment
Share on other sites

1 hour ago, ikskoks said:

Thanks. Any chance for source code?

And I have some additional questions:
 1. Is the compression method well known or is it something custom?
 2. What was the purpose of 8 bytes right before compressed data?

well, no problem, but I'm just an amateur so it might be hard to read

 

1. I'm not sure it may be some known LZ variation but I reversed it from exe.

2. It's a decompressed size. Why they need to write it again here when it's already present in the TOC I don't know))

RTL Ski Jumping 2002.rar

Edited by Thief1987
  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...