Homebrew Batch CIA 3DS Decryptor - A simple batch file to decrypt CIA & 3DS

Tsucube

New Member
Newbie
Joined
Jun 6, 2021
Messages
1
Trophies
0
Age
19
XP
34
Country
United States
Sat 06/05/2021 18:56:21.67
'decrypt' is not recognized as an internal or external command,
operable program or batch file.


Whenever I try to use it, it opens and instantly closes. What Should I do?
 

Bimmel

~ Game Soundtrack Collector ~
Member
Joined
Jan 28, 2014
Messages
2,302
Trophies
2
Age
43
XP
3,797
Country
Gambia, The
I believe .cci files are the same as .3ds files (two extensions same format). So, you can just rename one to the other.
I don't know about FBI, but l think Citra plays .cci files just like .3ds files. If FBI supports .3ds files, just rename the .cci files to .3ds and try them.
See the following link (this link is old. Citra supports .cia formats now):
https://community.citra-emu.org/t/3ds-vs-cci-rom-file-formats/191

----------------
with "batch cia 3ds decryptor" if you try to decrypt a .cia GAME file , it seems to just extract the .cci/.3ds file from it and decrypt that.
If you try to decrypt a DLC/UPDATE .cia file, it seems to keep the format as .cia
-----------------
With "3ds + cia rom script" it seems to decrypt ANY .cia to a .cia file.
It has the ability to do conversation between .3ds and .cia from its conversation menu.


With using "3ds + cia rom script" I've never had problems with any decrypted .cia DLC/UPDATE files even though it always gives me the warning.
(only used them with Citra)
Hello,

I'm trying to decrypt my .cia game files to .cia, not to .cci. Can you help me with that?
 

InvalidName

New Member
Newbie
Joined
Jun 17, 2021
Messages
1
Trophies
0
Age
25
XP
32
Country
United States
Also missing the Content.txt file. I used it for one rom and that appeared. Kept using different roms and that message popped up all the time
 

Chi_z_bread

New Member
Newbie
Joined
Jun 20, 2021
Messages
2
Trophies
0
Age
27
XP
33
Country
United States
I've tried decrypting 2 .3ds files (Professor Layton vs Phoenix Wright and Monster Hunter Stories), but I'm getting the same error for both. It seems like no one else knows how to fix it. Here's the log for Professor Layton vs Phoenix Wright:

Parsing NCSD in file "3DS1028 - Professor Layton vs Phoenix Wright Ace Attorney (USA).3ds":
Parsing Main NCCH
Product code: CTR-P-AVSE
KeyY: 01D40D4057E00B50DB34109ABE2F86B1
Title ID: 0004000000100700
Format version: 2
ExHeader offset: 00000200
ExHeader counter: 00040000001007000100000000000000
ExHeader size: 2048 bytes
ExeFS offset: 00000C00
ExeFS counter: 00040000001007000200000000000000
ExeFS size: 1709568 bytes
RomFS offset: 001A3000
RomFS counter: 00040000001007000300000000000000
RomFS size: 1466527744 bytes
Parsing Manual NCCH
Traceback (most recent call last):
File "decrypt.py", line 421, in <module>
File "decrypt.py", line 263, in parseNCSD
File "decrypt.py", line 278, in parseNCCH
File "decrypt.py", line 74, in __new__
ValueError: Buffer size too small (0 instead of at least 512 bytes)
Failed to execute script decrypt
[MAKEROM ERROR] Content 0 is corrupt
 

pistoldust

Member
Newcomer
Joined
Jun 7, 2021
Messages
7
Trophies
0
Age
30
XP
61
Country
United States
I think I found a fix for this. If you're getting the "Finished" message instantly, try renaming your game file into something simple (without any special symbols, even spaces), like "SMT4". It worked for me.

EDIT: still have no idea what to do with patch/DLC files since for me they're still in CIA format, how do I even use them if I'm using citra on switch via retroarch?
Would like an answer to this question as well! anyone know where we put the DLC files?


Hello,

I'm trying to decrypt my .cia game files to .cia, not to .cci. Can you help me with that?
this is late but i believe you can use V12 of HackingToolkit9DS to decrypt&extract the encrypted CIA. then rebuild it with V9 of the HackingToolkit9DS which in my experience doesn't encrypt the .cia (at least not properly??). worth a shot since the other method is GodMode9 which requires you to use your 3ds.
 
Last edited by pistoldust,
  • Like
Reactions: Bimmel

Chi_z_bread

New Member
Newbie
Joined
Jun 20, 2021
Messages
2
Trophies
0
Age
27
XP
33
Country
United States
I've tried decrypting 2 .3ds files (Professor Layton vs Phoenix Wright and Monster Hunter Stories), but I'm getting the same error for both. It seems like no one else knows how to fix it. Here's the log for Professor Layton vs Phoenix Wright:

I tried it with a .cia file, and it worked fine. MHS still doesn't run on Citra, but that's a problem with Citra (hopefully a future update will fix that :/ ). At least, I now know the decryptor is working for me.
 

vlvt

Well-Known Member
Member
Joined
Jul 12, 2021
Messages
101
Trophies
0
Age
33
XP
45
Country
Singapore
I tried it with a .cia file, and it worked fine. MHS still doesn't run on Citra, but that's a problem with Citra (hopefully a future update will fix that :/ ). At least, I now know the decryptor is working for me.
sounds like a citra issue, decrypter seems to work fine in other cases
 

Geela

New Member
Newbie
Joined
Aug 18, 2021
Messages
2
Trophies
0
Age
36
XP
38
Country
Malaysia
when i click on the BAT file, it says "FINISH, please press any key" ??? please help

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

when I click on the BAT file, it says "FINISH, please press any key"???
Please help
 

swosho

Well-Known Member
Newcomer
Joined
Nov 2, 2015
Messages
52
Trophies
0
XP
1,269
Country
Ukraine
If anyone came here looking for a straight encrypted game CIA -> decrypted game CIA solution,
simply remove or comment out the lines 64-69 in the batch file and, optionally, rename "-decfirst.cia" to "-decrypted.cia" on the line 41.
Better save it as a separate batch ofc.
 
Last edited by swosho,

Deleted member 568468

State of dormancy
Member
Joined
Sep 9, 2021
Messages
129
Trophies
0
XP
103
Country
Taiwan
If anyone came here looking for a straight encrypted CIA -> decrypted CIA solution,
simply remove or comment out the lines 64-69 in the batch file and, optionally, rename "-decfirst.cia" to "-decrypted.cia" on the line 41.
this doesn't work for me, tried to decrypt some .cia but they are being left untouched by the decryptor :(
 

swosho

Well-Known Member
Newcomer
Joined
Nov 2, 2015
Messages
52
Trophies
0
XP
1,269
Country
Ukraine
Hmm. Tried it out again with a couple of encrypted CIAs I have on hand and it worked fine.
I'll attach the batch file here just in case.
 

Attachments

  • Batch CIA 3DS Decryptor encrcia2decrcia.zip
    1 KB · Views: 342

Deleted member 568468

State of dormancy
Member
Joined
Sep 9, 2021
Messages
129
Trophies
0
XP
103
Country
Taiwan
Hmm. Tried it out again with a couple of encrypted CIAs I have on hand and it worked fine.
I'll attach the batch file here just in case.
still nothing, works as the original

DLC gets divided into ncch files, but then goes back and file isn't decrypted, whereas firmware apps' CIA are literally *untouched*
 
  • Like
Reactions: swosho

swosho

Well-Known Member
Newcomer
Joined
Nov 2, 2015
Messages
52
Trophies
0
XP
1,269
Country
Ukraine
Ah! I should've clarified that the edited batch is good just for the regular game CIAs, as the one included in the OP already performs the encrypted DLC/patch CIA -> decrypted CIA conversion. And I guess the firmware apps have to decrypted via GodMode9/Decrypt9WIP.
 

Deleted member 568468

State of dormancy
Member
Joined
Sep 9, 2021
Messages
129
Trophies
0
XP
103
Country
Taiwan
Ah! I should've clarified that the edited batch is good just for the regular game CIAs, as the one included in the OP already performs the encrypted DLC/patch CIA -> decrypted CIA conversion. And I guess the firmware apps have to decrypted via GodMode9/Decrypt9WIP.
yeah i guess so, still even when using OP's batch file the DLC CIA is not decrypted :(

Does GodMode/Decrypt9WIP require a 3DS?
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    S @ salazarcosplay: good morning everyone