Skip to content

Repair incomplete SS files#950

Draft
Deterous wants to merge 20 commits intoSabreTools:masterfrom
Deterous:repair-ss
Draft

Repair incomplete SS files#950
Deterous wants to merge 20 commits intoSabreTools:masterfrom
Deterous:repair-ss

Conversation

@Deterous
Copy link
Member

@Deterous Deterous commented Feb 24, 2026

This is my initial attempt at implementing a repair mechanism into MPF for incomplete Xbox/360 SS files. It is a C# implementation of my (research-only) python script here: https://github.com/Deterous/ParseXboxMetadata/blob/main/RepairSS.py

I use the built-in Cryptography library for the AES computation, and a bunch of inscrutable logic for checking and shuffling around data. I still need to test this, but in the meantime a review of the code changes would be nice.

Note: This is necessary for OmniDrive SS dumps, as they are always incomplete. It is also required for any Kreon redumper dumps that are incomplete (such as when dumping with --kreon-partial-ss or just an unlucky SS read that failed for some reason).

Extra note: While this logic ideally runs in redumper not MPF, implementing the AES code in redumper's codebase is currently infeasible. MPF is the next best place.

using var aes = Aes.Create();
#endif
aes.Key = [0xD1, 0xE3, 0xB3, 0x3A, 0x6C, 0x1E, 0xF7, 0x70, 0x5F, 0x6D, 0xE9, 0x3B, 0xB6, 0xC0, 0xDC, 0x71];
aes.Mode = CipherMode.CBC;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed the original code was using ECB, not CBC

Copy link
Member Author

@Deterous Deterous Feb 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I basically implemened CBC in the python script with EBC, this should technically work. I need to debug this code but haven't got VS, so I need it to do a bunch of logging

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, that's odd. If you do need to use EBC, it's available at least.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants