Skip to content
View in the app

A better way to browse. Learn more.

ResHax

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Help us keep the site running.

Hitman 3 (2021) .RPKG

Featured Replies

  • Author
  • Localization

Den_krot, posted Thu Jan 21, 2021 10:16 am (61770)


Hello,
I want to extract\imports files from a new Hitman game. To localize the game to another language. The method with the last part is not suitable, could you help me?

Example of one of the files (https://goo.su/3vUX)

Sorry for my English

THX
  • Author
  • Localization

Zolodei, posted Thu Jan 21, 2021 12:59 pm (61773)


KEY?
  • Author
  • Localization

Den_krot, posted Thu Jan 21, 2021 2:00 pm (61774)


Fixed the link to the file, it led to the wrong place
(https://goo.su/3vUX)
  • Author
  • Localization

Salem, posted Thu Jan 21, 2021 7:44 pm (61777)


I would also appreciate it if someone would post a script for HITMAN 3, as I would like to extract the music.

The new magic number is "2KPR", compared to "GKPR" for the previous two Hitman games.
  • Author
  • Localization

LinkOFF, posted Thu Jan 21, 2021 9:02 pm (61778)


del
  • Author
  • Localization

DKDave, posted Thu Jan 21, 2021 11:24 pm (61779)


Just a quick correction from my own observations:

0x00 UInt - "2KPR"
0x04 UInt - version?
0x08 Threebyte - ?
0x0b Short - 0x7878
0x0d UInt - File count
0x11 UInt - Size of file table 1
0x15 UInt - Size of file table 2

File table 1 starts at 0x19 (0x14 bytes per entry)
File table 2 starts at 0xd2b9 (variable entry size)
Data starts at 0x2e669

For file table 1, each entry is as follows:

0x00 UInt64 - Checksum ?
0x08 UInt - File offset
0x0c UInt - always 0 (maybe uncompressed size for any compressed data)
0x10 UInt - File size (some values have bit 31 set)

File table 2 seems to be info about the file types - same number of entries as in table 1, but variable length.

The file data looks to be encrypted.
  • Author
  • Localization

JesWhite, posted Fri Jan 22, 2021 7:04 am (61781)


Up...
  • Author
  • Localization

hida1995, posted Fri Jan 22, 2021 7:15 am (61782)


uppp
  • Author
  • Localization

LennardF1989, posted Sat Jan 23, 2021 12:07 am (61794)


You know, bumping is just really annoying ;) It's not going to make things go faster.

Format is relatively simple, thanks to @DKDave for sparing me initial trouble ;) I'm just going to copy paste his format and extend it.

Header:
0x00 String - "2KPR"
Skip 9 bytes
0x0d UInt - File count
0x11 UInt - File table 1 size
0x15 UInt - File table 2 size

File table 1 immediately follows, loop "File count" times, each entry has:
0x00 UInt64 - Hash (Needs hash to filename mapping)
0x08 UInt - File offset
Skip 4 bytes
0x10 UInt - File size (Bit 31 determines if encrypted, if Bit 31 is set, exclude it, eg. using bitshifting with & 0x3fffffff)

Assert current offset position is total header size file table 1 size

File table 2 immediately follows, loop "File count" times, each entry has:
0x00 String - Filetype (in reverse, eg. NOSJ is JSON)
0x04 UInt - Additional number of bytes for entry (total size is 0x18 this value)
Skip 4 bytes
0x0C UInt - Decompressed size
Skip x bytes - Where x = 0x18 (Additional bytes) - 0x10 (current offset into entry)

Assert current offset position is total header size file table 1 size file table 2 size

Extraction:
Loop through all entries, use File offset and File size (adjusted if encrypted!) from File table 1, use File type for file-extension and decompressed size from File table 2.

Compression:
If file is encrypted, XOR the bytes with key [0xDC, 0x45, 0xA6, 0x9C, 0xD3, 0x72, 0x4C, 0xAB], then decompress with LZ4.

I have a program up and running for this, let me finalize that and get it on Github. Otherwise, someone else could make a QuickBMS script out of this. Don't want to spend time on creating one right now.

EDIT:
It's up, you can find the repository here: https://github.com/LennardF1989/HitmanExtractor
You can download the tool here: https://github.com/LennardF1989/HitmanE ... _1_0_0.zip

Be sure to read the README for instructions! To OP I think the bad news right now is that TEXT/LINE files are not extractable yet, there are still some holes in the fileformat. I attempted not trying to decompress them and take the "decompressed file size" as-is, but it didn't yield anything interesting. I'd have to look at the Hitman 2 format to see if there are some hints in there, but maybe someone else can fill in the blanks and make a Pull Request :)
  • Author
  • Localization

LinkOFF, posted Sat Jan 23, 2021 12:33 pm (61804)


LennardF1989, excellent work!
  • Author
  • Localization

JesWhite, posted Sat Jan 23, 2021 12:37 pm (61806)


LinkOFF wrote:
LennardF1989, excellent work!


Yea, i'm searching text localization files.
Waiting for quickbms script for extraction and import...
  • Author
  • Localization

LinkOFF, posted Sat Jan 23, 2021 1:16 pm (61808)


chunk0.rpkg extraction log:
Code:
Extraced 174925 files, skipped is 128347. LZ4 decompress errors: 100933


Due to the first incorrect LZ4 block, subsequent errors occur
  • Author
  • Localization

LennardF1989, posted Sat Jan 23, 2021 8:30 pm (61813)


@LinkOFF Is that the result of my tool or something of yours?

Either way, I fixed the extraction issue. My initial thought yesterday was right after all. I took MEWW files as a test now, and they extract fine with a proper header, so everything that skipped with the v1.0.0 should now properly extract. I'll push this when I can. Playing with a Hash-function for a bit.
  • Author
  • Localization

LinkOFF, posted Sat Jan 23, 2021 9:31 pm (61814)


LennardF1989, your tool. I added the log by try-catch exception in LZ4 decode function. Rest chunks extracted without any errors.
  • Author
  • Localization

DKDave, posted Sun Jan 24, 2021 12:54 am (61816)


Good stuff!

I can see the "PRIM" files contain the 3d geometry - just an example from one I got something from:

Image
  • Author
  • Localization

LennardF1989, posted Sun Jan 24, 2021 11:55 am (61822)


Just pushed v1.0.1, will update compiled version accordingly. This fixes the extraction of files that aren't compressed.

@LinkOFF: I didn't extract the FULL chunk yet, also due to sheer the number of files it would generate. If you can get me a bunch of failing offsets on that file, I can specifically investigate them :) Copy/paste of the log from v1.0.1 should give me enough information to find them in the table headers block.
  • Author
  • Localization

LinkOFF, posted Sun Jan 24, 2021 1:18 pm (61823)


There is a lot of compressed data in extracted files. Log-file with offsets (lz4 decode exceptions).
  • Author
  • Localization

chimera67, posted Tue Feb 02, 2021 5:28 am (61969)


Hello everyone!
I really want to access this game's models and textures:

* Will it be possible in the near future to unpack the game archives into proper directories (or to generate a document with real descriptive filenames)? Which utility is best for extracting the game files?

* What is the main model and texture format for this game and which program (plus addon?) is best to load the extracted models?

-
The two unpacking tools I found are a bit confusing... it unpacked thousands of files, but if anyone could at least kindly answer my question about model format previewing, it couldn't be too too awful previewing thousands of mystery models - oh but how do the textures correspond...... Does that directx ripping program work with this type of game at all then?

Thank you very much to anyone who can possibly provide some insight~
Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.