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.

Phoenix Wright Ace Attorney Trilogy Pc(file mdt)

Featured Replies

  • Replies 52
  • Views 1
  • Created
  • Last Reply

Top Posters In This Topic

  • Author
  • Localization

Haoose, posted Wed Apr 10, 2019 3:50 pm (46764)


Decrypt script for text-files:
Code:
encryption Rijndael "\x35\x38\x9A\xFF\xF2\x61\xB3\xE8\x87\x22\x24\x0B\x6B\x0B\x25\xC8" "\x01\x85\x40\xA5\x57\xDE\x8C\x4E\x86\xE4\x23\xE3\x3A\xB9\x77\x84"
get SIZE asize
log "decrypted_file.dat" 0 SIZE
  • Author
  • Localization

Ogoshi, posted Wed Apr 10, 2019 6:28 pm (46776)


Haoose wrote:
Decrypt script for text-files:
Code:
encryption Rijndael "\x35\x38\x9A\xFF\xF2\x61\xB3\xE8\x87\x22\x24\x0B\x6B\x0B\x25\xC8" "\x01\x85\x40\xA5\x57\xDE\x8C\x4E\x86\xE4\x23\xE3\x3A\xB9\x77\x84"
get SIZE asize
log "decrypted_file.dat" 0 SIZE


And how i use this script? QuickBMS?
  • Author
  • Localization

Haoose, posted Wed Apr 10, 2019 8:10 pm (46778)


Ogoshi
Code:
quickbms.exe -w DecryptAceAttorney.bms option_text_u.bin UnPack\
  • Author
  • Localization

Ogoshi, posted Wed Apr 10, 2019 10:32 pm (46781)


Haoose wrote:
Ogoshi
Code:
quickbms.exe -w DecryptAceAttorney.bms option_text_u.bin UnPack\


Thanks Haoose!
  • Author
  • Localization

Siengried, posted Thu Apr 11, 2019 6:18 am (46783)


How did you found the way to decrypt?
  • Author
  • Localization

Dj_Mike238, posted Thu Apr 11, 2019 10:57 am (46804)


Haoose wrote:
Decrypt script for text-files:
Code:
encryption Rijndael "\x35\x38\x9A\xFF\xF2\x61\xB3\xE8\x87\x22\x24\x0B\x6B\x0B\x25\xC8" "\x01\x85\x40\xA5\x57\xDE\x8C\x4E\x86\xE4\x23\xE3\x3A\xB9\x77\x84"
get SIZE asize
log "decrypted_file.dat" 0 SIZE


This works successfully with .bin text files, but it doesn't work with .mdt script files.

Has anyone got any luck with those ones?
  • Author
  • Localization

Kaplas, posted Thu Apr 11, 2019 2:05 pm (46814)


Siengried wrote:
How did you found the way to decrypt?


If you open "Assembly-CSharp.dll" with dnSpy (or another .NET disassembler) you can find the decryption code:

Code:
public byte[] load(string in_path)
{
    byte[] array = File.ReadAllBytes(in_path);
    RijndaelManaged rijndaelManaged = new RijndaelManaged();
    rijndaelManaged.KeySize = 128;
    rijndaelManaged.BlockSize = 128;
    string password = "u8DurGE2";
    string s = "6BBGizHE";
    byte[] bytes = Encoding.UTF8.GetBytes(s);
    Rfc2898DeriveBytes rfc2898DeriveBytes = new Rfc2898DeriveBytes(password, bytes);
    rfc2898DeriveBytes.IterationCount = 1000;
    rijndaelManaged.Key = rfc2898DeriveBytes.GetBytes(rijndaelManaged.KeySize / 8);
    rijndaelManaged.IV = rfc2898DeriveBytes.GetBytes(rijndaelManaged.BlockSize / 8);
    ICryptoTransform cryptoTransform = rijndaelManaged.CreateDecryptor();
    byte[] result = cryptoTransform.TransformFinalBlock(array, 0, array.Length);
    cryptoTransform.Dispose();
    return result;
}


Dj_Mike238 wrote:
This works successfully with .bin text files, but it doesn't work with .mdt script files.

Has anyone got any luck with those ones?


.mdt are encrypted in the same way, but then you have to substract 128 from every text character to get the real character. The problem is that .mdt files contains the game scripts, so I'm still looking for a way to extract just the texts without breaking anything else.
  • Author
  • Localization

Siengried, posted Thu Apr 11, 2019 2:35 pm (46815)


Well, we have first to find a way to expand files without to cause crash in games... How we can do? Files don't seems to have a size check
  • Author
  • Localization

Siengried, posted Sun Apr 14, 2019 4:09 pm (46932)


How we can make the file bigger without to make the game crash?
  • Author
  • Localization

Kaplas, posted Sun Apr 14, 2019 7:36 pm (46936)


What do you mean? I've been able to add text without crashing the game.

Image
  • Author
  • Localization

Siengried, posted Mon Apr 15, 2019 12:20 pm (46954)


Kaplas wrote:
What do you mean? I've been able to add text without crashing the game.

Image


How? If i just add two bytes the game crash... did you modified something else?
  • Author
  • Localization

Kaplas, posted Mon Apr 15, 2019 1:16 pm (46955)


Once decrypted, .mdt files have the following header:

Code:
ushort numberOfScenesInFile;
ushort dummy; // 0
uint[numberOfScenesInFile] sceneStartOffset;

And after this header goes the data.

If you add or remove bytes, you have to update the "sceneStartOffset" pointers.
  • Author
  • Localization

Siengried, posted Mon Apr 15, 2019 1:20 pm (46956)


Kaplas wrote:
Once decrypted, .mdt files have the following header:

Code:
ushort numberOfScenesInFile;
ushort dummy; // 0
uint[numberOfScenesInFile] sceneStartOffset;

And after this header goes the data.

If you add or remove bytes, you have to update the "sceneStartOffset" pointers.

I know it. But i added two bytes at the very last word:
E?O??0A?A?E?D?O?N?I?L?A??? ORIGINAL
E?O??0A?A?E?D?O?N?I?L?A?A???NEW
And the game crash. The last scene is the last, so no pointer have to be modified(pointer=Scene offset)
  • Author
  • Localization

Kaplas, posted Mon Apr 15, 2019 1:51 pm (46958)


Have you encrypted the file after modifying?
  • Author
  • Localization

Siengried, posted Mon Apr 15, 2019 1:51 pm (46959)


Kaplas wrote:
Have you encrypted the file after modifying?

Yes, i have.
  • Author
  • Localization

Kaplas, posted Mon Apr 15, 2019 1:58 pm (46960)


What file are you trying to modify? I've tried with "sc0_text_u.mdt" in "GS1\scenario" folder and it works, may be other files have other structure.
  • Author
  • Localization

Siengried, posted Mon Apr 15, 2019 2:03 pm (46961)


Kaplas wrote:
What file are you trying to modify? I've tried with "sc0_text_u.mdt" in "GS1\scenario" folder and it works, may be other files have other structure.

I have modified the same. Can i send you the file decripted and none? The modified one i mean
  • Author
  • Localization

Kaplas, posted Mon Apr 15, 2019 2:11 pm (46962)


Yes, send me the file and I'll take a look
  • Author
  • Localization

Kaplas, posted Mon Apr 15, 2019 2:55 pm (46965)


I think the QuickBMS script is not encrypting the file properly.

Here you have a small app to decrypt/encrypt game files: https://we.tl/t-nQILZCBPcw

If you drag&drop a game file, the app will create the decrypted version with ".decrypted" extension.
If you drag&drop a ".decrypted" file, the app will encrypt it.
  • Author
  • Localization

Siengried, posted Mon Apr 15, 2019 3:14 pm (46966)


Kaplas wrote:
I think the QuickBMS script is not encrypting the file properly.

Here you have a small app to decrypt/encrypt game files: https://we.tl/t-nQILZCBPcw

If you drag&drop a game file, the app will create the decrypted version with ".decrypted" extension.
If you drag&drop a ".decrypted" file, the app will encrypt it.

Thanks m8
  • Author
  • Localization

Dj_Mike238, posted Mon Apr 15, 2019 4:48 pm (46971)


Kaplas wrote:
Once decrypted, .mdt files have the following header:

Code:
ushort numberOfScenesInFile;
ushort dummy; // 0
uint[numberOfScenesInFile] sceneStartOffset;

And after this header goes the data.

If you add or remove bytes, you have to update the "sceneStartOffset" pointers.


Do you use any specific tools to do that or do you just edit the file with an hex editor?
  • Author
  • Localization

Kaplas, posted Mon Apr 15, 2019 5:22 pm (46976)


I'm coding a tool to make a translation, but it isn't finished yet.
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.