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.

[XBOX] Tenchu: Return from Darkness - ".con" File format

Featured Replies

  • Localization

Even after searching extensively, I couldn't find any game with the same format, or a program or script that would help with this. The game was released in 2004 for the original Xbox; the headers indicate that they are kinda like archives with connected files within inside. If anyone could help, I would appreciate it.

m.icon.png

i.zip m.zip

Solved by Rabatini

3 hours ago, hohenheim said:

Even after searching extensively, I couldn't find any game with the same format, or a program or script that would help with this. The game was released in 2004 for the original Xbox; the headers indicate that they are kinda like archives with connected files within inside. If anyone could help, I would appreciate it.

m.icon.png

i.zip 1.87 MB · 2 downloads m.zip 22.55 MB · 1 download

Just a few initial observations: It's definitely encrypted.  The file table and filenames from offset 0x18 are encrypted with the xor key "\xbc\x90\x91\x91", but then the files themslves seem to have a different xor key which varies per file.

 

 

 

 

  • Author
  • Localization
2 hours ago, DKDave said:

Just a few initial observations: It's definitely encrypted.  The file table and filenames from offset 0x18 are encrypted with the xor key "\xbc\x90\x91\x91", but then the files themslves seem to have a different xor key which varies per file.

 

 

 

 

It seems that the "key" to this format, although it varies from file to file, maintains some consistency, such as being largely structured and repetitive. Perhaps the executable file contains some clues. analyzing it shows that the game uses DDS textures. I only have a prototype localization version with me, but it's very close to the final build, so it may help.

default.zip

I'm not 100% sure how to calculate the xor key for the actual files, but it seems as though there's some blank space at the end of each file where the key is clear, so I've made some assumptions - I haven't checked every single file, but it seems to work for most of them.

This QuickBMS script should extract them.  I've tested some of the meshes in Model Researcher and they seem ok.

 

tenchu_con.zip

  • Supporter
  • Solution
9 hours ago, hohenheim said:

It seems that the "key" to this format, although it varies from file to file, maintains some consistency, such as being largely structured and repetitive. Perhaps the executable file contains some clues. analyzing it shows that the game uses DDS textures. I only have a prototype localization version with me, but it's very close to the final build, so it may help.

default.zip 1.67 MB · 0 downloads

Thank you for the .exe, it was crucial to understand the how the game analyse and take the xor without guesses.

Here what i find it.

XOR 1: Container Decryption (The Header)

function FUN_0001ee20 revealed the initialization logic.

The Logic:

The game reads the first 4 bytes of the m.con file.

It calculates the bitwise NOT (~) of these 4 bytes to create the XOR key.

It applies this key to the rest of the header to reveal the file table (offsets, sizes, and filenames).

Formula: Decrypted_Byte = Encrypted_Byte ^ (~File_Header[0:4])

So, the XOR 1 is dynamic:

XOR 2: File Content Decryption (The Data)

Files typically end with Null Padding (00 00 00 00) for memory alignment.

The Logic:

Since 0x00 XOR Key = Key, the encrypted zeros at the end of the file explicitly reveal the key.

Formula: Decrypted_Data = Encrypted_Data ^ (Last_4_Bytes_of_File)

Good catch @DKDave

attached .py

TENCHU-XBOX-XOR.py

  • Author
  • Localization
3 minutes ago, DKDave said:

I had a look at the meshes as well, just to make sure the decryption was working correctly.  This is an initial attempt of BS00:

BS00.thumb.jpg.f7fe8efc138998d8fbef22e2c105f307.jpg

 

Wow, it worked perfectly so far, thank you all! I thought it would be more of a headache than the compression of the PS2 version. But im glad i was wrong.

  • Author
  • Localization
25 minutes ago, DKDave said:

I had a look at the meshes as well, just to make sure the decryption was working correctly.  This is an initial attempt of BS00:

BS00.thumb.jpg.f7fe8efc138998d8fbef22e2c105f307.jpg

 

Can you tell me what program you used to view the model?

  • Author
  • Localization
5 hours ago, DKDave said:

I used Noesis.  This is my script so far.  It doesn't process the textures in the file correctly, I just extracted them manually for testing.  It should should the meshes correctly in the .s4 mesh files.

tenchu_return_s4.zip 1.02 kB · 1 download

The script doesn't seem to work with .s4, .msh, or .bgm files (supposedly 3D models). But I think ill open a thread in the correct topic (2D/3D models).

  • 4 months later...
  • 2 weeks later...

I’ve read your message. I’m sorry, but since this post hasn’t received any replies in several months, I decided to message you privately.

image.thumb.png.ddce444fb78305c33d832d5c49537e90.png

There are only S4 files here. Using Noesis to open them won’t display the textures. You said the texture data is in a folder, but I couldn’t find it. Please help me out. Thank you.

 

Create an account or sign in to comment

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.