Homebrew Official [Download] Decrypt9 - Open Source Decryption Tools (WIP)

  • Thread starter d0k3
  • Start date
  • Views 840,140
  • Replies 4,476
  • Likes 71

Madridi

Card Collector
Member
Joined
May 9, 2008
Messages
3,562
Trophies
2
Age
38
Location
Doha
XP
3,071
Country
Qatar
It does look better in the console, and just take a look at the new font in GM9. It looks absolutely great there. If more people dislike the new font, I might make the original one the default in D9 again, though.

Thanks a ton for this! And this means, the issue is actually in CakeHax or ctrulib, cause none of the other changes could have caused it. If you use your current ctrulib to compile the last release yourself - will it work? If not we will have it at least pinpointed to ctrulib.
Compile the last release (26th June)? It shouldn't work due to ctrulib update
 

Madridi

Card Collector
Member
Joined
May 9, 2008
Messages
3,562
Trophies
2
Age
38
Location
Doha
XP
3,071
Country
Qatar
And... does the new compile work?
oh lol, my bad. I misunderstood what you asked me. I thought you only wanted me to test whether it compiles or not :P

Yes, I tested the .dat generated by that commit, and it works

--------------------- MERGED ---------------------------

@d0k3
Since I can compile with "make cakehax" without running into the libkhax issue, I was able to pinpoint the commit where it stopped working.
It's this one: ec1d089

I hope this makes it simpler :)
 
  • Like
Reactions: d0k3

d0k3

3DS Homebrew Legend
OP
Member
Joined
Dec 3, 2004
Messages
2,786
Trophies
1
XP
3,896
Country
Germany
oh lol, my bad. I misunderstood what you asked me. I thought you only wanted me to test whether it compiles or not :P

Yes, I tested the .dat generated by that commit, and it works

--------------------- MERGED ---------------------------

@d0k3
Since I can compile with "make cakehax" without running into the libkhax issue, I was able to pinpoint the commit where it stopped working.
It's this one: ec1d089

I hope this makes it simpler :)
Thanks a lot! This really helps!

UPDATE: Okay, one more thing that you could do for me... Could you try most recent GodMode9 (master) and see if it works? When you have time, I'll be off for a few hours now anyways.
 
  • Like
Reactions: Madridi

Madridi

Card Collector
Member
Joined
May 9, 2008
Messages
3,562
Trophies
2
Age
38
Location
Doha
XP
3,071
Country
Qatar
Thanks a lot! This really helps!

UPDATE: Okay, one more thing that you could do for me... Could you try most recent GodMode9 (master) and see if it works? When you have time, I'll be off for a few hours now anyways.
Well what do you know, it worked :)

So it's cakehax issue :)
 
  • Like
Reactions: d0k3

Madridi

Card Collector
Member
Joined
May 9, 2008
Messages
3,562
Trophies
2
Age
38
Location
Doha
XP
3,071
Country
Qatar
It does look better in the console, and just take a look at the new font in GM9. It looks absolutely great there. If more people dislike the new font, I might make the original one the default in D9 again, though.
Thanks for the cakehax reverts. All work fine now :)

So coming back to this, I just ran GM9 (using this new font), D9 (using new font), and E9 (using old font), and here are my observations (albeit I'm fully aware that, in the end, this is all boils down to preferences):

D9 & E9 comparison: I stand by the other comment, the new font looks horrible compared to the old one. The old one looks better.

D9 & GM9 comparison: yeah, the font looks great on GM9. Maybe due to the "listing" style like ctrxplorer, but it does look great. Then, looking once again at D9, it still looks horrible there.


Make of that as you will :P
 
Last edited by Madridi,
  • Like
Reactions: Xenosaiga and d0k3

Spiderman8081

New Member
Newbie
Joined
Jul 2, 2016
Messages
4
Trophies
0
Age
36
XP
53
Country
United States
You're not the first one with this issue, but this issue is rare. As a matter of fact, to solve it, we may need someone to donate (not saying you should, we might find another way) an affected cartridge so that it can be debugged.

How would i go about donating this?
 

c4388354

Well-Known Member
Member
Joined
Jan 23, 2015
Messages
142
Trophies
0
XP
623
Country
United States
just wanted to report a small, very minor error with the NCSD decryptor:
When decrypting an NCSD file, and it has an ExeFS that uses the 7x encryption method (type 0x01 or 0x0A)
the size of the file in the exefs doesn't get rounded up to the next 0x200 byte block boundary.
(it gets aligned to a 16 byte boundary by the AES engine as it works with multiples of 16 bytes)
This just leaves a small amount of still encrypted data after the end of the file
(which is harmless) which continues until the end of the 0x200 byte sector.
it probably should all be 00's like it is when decrypting exeFS that use the 'standard' crypto-type 0x00.

In the file: /source/decryptor/game.c @ line #379 and line #1082.
https://github.com/d0k3/Decrypt9WIP/blob/master/source/decryptor/game.c#L379
https://github.com/d0k3/Decrypt9WIP/blob/master/source/decryptor/game.c#L1082

On these lines above - the value needs to get rounded up to the next 0x200 bytes to fill the sector.
Code:
u32 size_exefs_file = getle32(buffer + (i*0x10) + 0xC);
 

d0k3

3DS Homebrew Legend
OP
Member
Joined
Dec 3, 2004
Messages
2,786
Trophies
1
XP
3,896
Country
Germany
just wanted to report a small, very minor error with the NCSD decryptor:
When decrypting an NCSD file, and it has an ExeFS that uses the 7x encryption method (type 0x01 or 0x0A)
the size of the file in the exefs doesn't get rounded up to the next 0x200 byte block boundary.
(it gets aligned to a 16 byte boundary by the AES engine as it works with multiples of 16 bytes)
This just leaves a small amount of still encrypted data after the end of the file
(which is harmless) which continues until the end of the 0x200 byte sector.
it probably should all be 00's like it is when decrypting exeFS that use the 'standard' crypto-type 0x00.

In the file: /source/decryptor/game.c @ line #379 and line #1082.
https://github.com/d0k3/Decrypt9WIP/blob/master/source/decryptor/game.c#L379
https://github.com/d0k3/Decrypt9WIP/blob/master/source/decryptor/game.c#L1082

On these lines above - the value needs to get rounded up to the next 0x200 bytes to fill the sector.
Code:
u32 size_exefs_file = getle32(buffer + (i*0x10) + 0xC);
That's actually a pretty good find, thank you!
 

noctis90210

Well-Known Member
Member
Joined
Dec 24, 2013
Messages
969
Trophies
0
Age
37
XP
1,635
Country
@d0k3
good day sir, just want to ask question about seed files...
newer games need seed file to properly boot (no seed file=stuck on 3ds boot logo upon launching a game)
In order to get seed for a certain game, we need to go to eShop, specifically on page of "that" certain game
and the seed of the game will automatically injected to our nand,
if we do this, no more stuck on 3ds boot logo...

my question is...
is there any way to backup and then inject seed file to our nand so that in the far future if 3ds eshop shuts down,
we can still inject our seed back up on a newly formated 3ds without going online/without going to eshop...

thanks and have a nice day...
 

Pacman`

Well-Known Member
Member
Joined
Dec 19, 2006
Messages
492
Trophies
1
XP
717
Country
@d0k3

I just noticed this in my Decrypt9.log file:

0x24 KeyY: not found
Finalizing Initialization...
Initialization: partially failed

I looked on that google site, and this key is blank.
Is there another place I can look?
 

d0k3

3DS Homebrew Legend
OP
Member
Joined
Dec 3, 2004
Messages
2,786
Trophies
1
XP
3,896
Country
Germany
@d0k3

I just noticed this in my Decrypt9.log file:

0x24 KeyY: not found
Finalizing Initialization...
Initialization: partially failed

I looked on that google site, and this key is blank.
Is there another place I can look?
I'll give you a hint... The filename is slot0x24KeyY, and usually stuff like that get's leaked on pastebin. Enough said?
 
  • Like
Reactions: Pacman`

Yuuyuun

Active Member
Newcomer
Joined
Mar 6, 2016
Messages
38
Trophies
0
Age
31
Location
Netherworld.
XP
177
Country
Brazil
Please, can someone tell me how to inject GBA VC saves? I can dump it just fine, but I can't seem to make an injected save work in-game.

Set-up: O3DS, A9LH, latest version of Decrypt9 and the key.
 
Last edited by Yuuyuun,

Yuuyuun

Active Member
Newcomer
Joined
Mar 6, 2016
Messages
38
Trophies
0
Age
31
Location
Netherworld.
XP
177
Country
Brazil
I'm aware of that method, but that's not it, the latest decrypt9 (I mean, if you compile it from the source) has the option to dump and inject GBA VC saves.

44b03a47834042b7807b9a7bf9506884.png
 
Last edited by Yuuyuun,

c4388354

Well-Known Member
Member
Joined
Jan 23, 2015
Messages
142
Trophies
0
XP
623
Country
United States
re: my bug report a few posts above, I forgot to add that if the exefs file size is already
a multiple of the sector size (512 bytes) then it doesn't get rounded up. example:
16383 bytes gets rounded up to 16384. (1 byte difference)
16384 bytes stays as 16384. (0 byte difference)
16385 bytes gets rounded up to 16896. (511 byte difference)

see: "Kirby - Planet Robobot (USA) (Demo) (Kiosk)" (you'll need to decrypt it first)
the banner is at offset 0x234A00, the filesize is 524288 bytes (which is a multiple of the sector size)
the icon is at offset 0x2B4A00 which is exactly 524288 bytes (0x80000) after the start of the banner.
 

d0k3

3DS Homebrew Legend
OP
Member
Joined
Dec 3, 2004
Messages
2,786
Trophies
1
XP
3,896
Country
Germany
Please, can someone tell me how to inject GBA VC saves? I can dump it just fine, but I can't seem to make an injected save work in-game.

Set-up: O3DS, A9LH, latest version of Decrypt9 and the key.
It should work. Keep in mind that saves coming from emulators can have a a differing format and may not work (I can't check this). If you dump, edit and reinject, there should be no problems. Also, keep in mind you have to reboot (not poweroff) the console after the injection.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    Sonic Angel Knight @ Sonic Angel Knight: :ninja: