Phoenix Wright Ace Attorney Trilogy Pc(file mdt)
-
- Posts: 29
- Joined: Sun Nov 25, 2018 11:18 pm
Phoenix Wright Ace Attorney Trilogy Pc(file mdt)
Hi all...
i found this file that should contains text file of this game.
But i can't open it. Someone can help me?
https://www23.zippyshare.com/v/iGuCWa9Y/file.html
i found this file that should contains text file of this game.
But i can't open it. Someone can help me?
https://www23.zippyshare.com/v/iGuCWa9Y/file.html
-
- Posts: 68
- Joined: Thu Aug 07, 2014 9:43 pm
Re: Phoenix Wright Ace Attorney Trilogy Pc(file mdt)
Decrypt script for text-files:
Code: Select all
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
-
- Posts: 72
- Joined: Fri Oct 09, 2015 1:41 am
Re: Phoenix Wright Ace Attorney Trilogy Pc(file mdt)
Haoose wrote:Decrypt script for text-files:Code: Select all
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?
-
- Posts: 68
- Joined: Thu Aug 07, 2014 9:43 pm
Re: Phoenix Wright Ace Attorney Trilogy Pc(file mdt)
Ogoshi
Code: Select all
quickbms.exe -w DecryptAceAttorney.bms option_text_u.bin UnPack\
-
- Posts: 72
- Joined: Fri Oct 09, 2015 1:41 am
Re: Phoenix Wright Ace Attorney Trilogy Pc(file mdt)
Haoose wrote:OgoshiCode: Select all
quickbms.exe -w DecryptAceAttorney.bms option_text_u.bin UnPack\
Thanks Haoose!
-
- Posts: 29
- Joined: Sun Nov 25, 2018 11:18 pm
Re: Phoenix Wright Ace Attorney Trilogy Pc(file mdt)
How did you found the way to decrypt?
-
- Posts: 13
- Joined: Fri Nov 16, 2018 8:18 am
Re: Phoenix Wright Ace Attorney Trilogy Pc(file mdt)
Haoose wrote:Decrypt script for text-files:Code: Select all
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?
-
- Posts: 60
- Joined: Fri Jan 25, 2019 2:47 pm
Re: Phoenix Wright Ace Attorney Trilogy Pc(file mdt)
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: Select all
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.
-
- Posts: 29
- Joined: Sun Nov 25, 2018 11:18 pm
Re: Phoenix Wright Ace Attorney Trilogy Pc(file mdt)
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
-
- Posts: 29
- Joined: Sun Nov 25, 2018 11:18 pm
Re: Phoenix Wright Ace Attorney Trilogy Pc(file mdt)
How we can make the file bigger without to make the game crash?
-
- Posts: 60
- Joined: Fri Jan 25, 2019 2:47 pm
Re: Phoenix Wright Ace Attorney Trilogy Pc(file mdt)
What do you mean? I've been able to add text without crashing the game.
-
- Posts: 29
- Joined: Sun Nov 25, 2018 11:18 pm
Re: Phoenix Wright Ace Attorney Trilogy Pc(file mdt)
Kaplas wrote:What do you mean? I've been able to add text without crashing the game.
How? If i just add two bytes the game crash... did you modified something else?
-
- Posts: 60
- Joined: Fri Jan 25, 2019 2:47 pm
Re: Phoenix Wright Ace Attorney Trilogy Pc(file mdt)
Once decrypted, .mdt files have the following header:
And after this header goes the data.
If you add or remove bytes, you have to update the "sceneStartOffset" pointers.
Code: Select all
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.
-
- Posts: 29
- Joined: Sun Nov 25, 2018 11:18 pm
Re: Phoenix Wright Ace Attorney Trilogy Pc(file mdt)
Kaplas wrote:Once decrypted, .mdt files have the following header:Code: Select all
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:
É˙Ó˙€0Á˙Ä˙Ę˙Ď˙Ő˙Ň˙Î˙Ĺ˙Ä˙˙ ORIGINAL
É˙Ó˙€0Á˙Ä˙Ę˙Ď˙Ő˙Ň˙Î˙Ĺ˙Ä˙Ä˙˙NEW
And the game crash. The last scene is the last, so no pointer have to be modified(pointer=Scene offset)
-
- Posts: 60
- Joined: Fri Jan 25, 2019 2:47 pm
Re: Phoenix Wright Ace Attorney Trilogy Pc(file mdt)
Have you encrypted the file after modifying?
-
- Posts: 29
- Joined: Sun Nov 25, 2018 11:18 pm
Re: Phoenix Wright Ace Attorney Trilogy Pc(file mdt)
Kaplas wrote:Have you encrypted the file after modifying?
Yes, i have.
-
- Posts: 60
- Joined: Fri Jan 25, 2019 2:47 pm
Re: Phoenix Wright Ace Attorney Trilogy Pc(file mdt)
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.
-
- Posts: 29
- Joined: Sun Nov 25, 2018 11:18 pm
Re: Phoenix Wright Ace Attorney Trilogy Pc(file mdt)
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
-
- Posts: 60
- Joined: Fri Jan 25, 2019 2:47 pm
Re: Phoenix Wright Ace Attorney Trilogy Pc(file mdt)
Yes, send me the file and I'll take a look
-
- Posts: 29
- Joined: Sun Nov 25, 2018 11:18 pm
Re: Phoenix Wright Ace Attorney Trilogy Pc(file mdt)
I added some bytes at the offset 016F95
https://www109.zippyshare.com/v/zhiVAZkf/file.html
Obliously i change everytime the name in sc0_text_u.mdt and encrypt it again with reimport.bat(tried the reimport2 too)
https://www109.zippyshare.com/v/zhiVAZkf/file.html
Obliously i change everytime the name in sc0_text_u.mdt and encrypt it again with reimport.bat(tried the reimport2 too)