Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve decryption process #7

Open
MikillRosen opened this issue Dec 2, 2023 · 5 comments
Open

Improve decryption process #7

MikillRosen opened this issue Dec 2, 2023 · 5 comments
Labels
enhancement New feature or request

Comments

@MikillRosen
Copy link

Since I assume this is still in active development, I'd like to put my 2 cents into contributing to this program.

There's a type of encrypted MIX files that are somewhat hard to decrypt but still possible through one very specific trick. The MIX files in question are the ones from Tiberium Crisis 1 and 2. My method for decrypting works, but is very tedious. If this method can be made easier with your help, me and the community would be able to create fan-made content for it easily. My method involves using a tool called "MixTool", which comes from Vanilla Conquer. This tool cannot seem to read the real filenames of the mod files, but it can extract the files, and it can perfectly translate a real filename to an ID name in the MIX creation process, which is interesting, but also a good breakthrough. I have made a step-by-step guide for this
TC2 MIX DECRYPTION TUTORIAL.TXT
Hopefully you're willing to help with this, it would mean so much to be able to do more with this amazing mod.

@Aldrin-John-Olaer-Manalansan
Copy link
Owner

I'm not really open onto extending support to other games than RA2YR due to the work and compatibility i need implement for those games, which I don't even play. But I'll try to dig informations that I think is beneficial for RA2YR MIX. So compatibility between RA2YR and those games are near equal, then lucky for everyone.



Step 1: Get a hex editor, open YR's gamemd.exe with it, and find the original filenames.
Step 2: Open the mod's gamemd.exe with a hex editor, and find where the original filenames were.
You should notice the filenames are different compared to the original. You have now found the mod's modified filenames.

If your're talking about scanning for file names by opening a binary file(gamemd.exe in your case), I doubt it'll be effective in general since we got ARES that doesn't need modification of binary files, but instead directly injects the modifications to its game process upon startup. I don't want to implement something that only works for that specific case. I might implement a similar approach which instead, do the file name scan hooked at the game's runtime process to make sure that I extract the missing file names just like your method. Maybe in the future.



Step 1: Pick a real filename mentioned in the mod's files, and make an empty file with this filename. (Case sensitive, better if all low caps)

I might implement this idea in the future. Where for example, the tool will scan all possible file names inside a user multiple selected text files(eg. rulesmd.ini, artmd.ini, soundmd.ini), and use them for file name recovery.



"real" File name recovery through LMD Lookup by File name to CRC32 was already implemented. But the tool is currently limited to that for now(no LMD inside the MiX = no file name recovery).



This ticket will be marked as enhancement

@Aldrin-John-Olaer-Manalansan Aldrin-John-Olaer-Manalansan added the enhancement New feature or request label Dec 2, 2023
@MikillRosen
Copy link
Author

The mods have their own gamemd.exe

@Aldrin-John-Olaer-Manalansan
Copy link
Owner

The mods have their own gamemd.exe

Not quite "have their own" gamemd. Like I said there are some mods out there that doesn't need to "modify" the gamemd binary. You might like to take a look at ARES Expansion DLL which offers the best way to expand C&C game features safely. You can even play two or more mods that are entirely different to each other, found at the same folder, by doing the ARES's way because it doesn't limit the gamemd binary.

So that OldSchool way of expanding C&C game features through gamemd.exe modification isn't recommended anymore since the release of ARES. I'm even surprise that mod developers still follow the oldfashioned way of modding C&C games.

@MikillRosen
Copy link
Author

It seems I have not made myself clear enough. Tiberium Crisis 1 and 2 do actually have a modified version of gamemd.exe shipped with the download. Here is proof
Capture

@Nyerguds
Copy link

Nyerguds commented Dec 29, 2023

I'm not really open onto extending support to other games than RA2YR due to the work and compatibility i need implement for those games, which I don't even play. But I'll try to dig informations that I think is beneficial for RA2YR MIX. So compatibility between RA2YR and those games are near equal, then lucky for everyone.

The mix format of TS and RA2 is completely identical, so any protection schemes used for TS can potentially be used for RA2 as well. Only the older games differ, in that RA1 and C&C1 use a different filename hashing algorithm, and C&C1 doesn't have support for the encryption and checksum flags in the header.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants