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

luathnat

New Member
Newbie
Joined
Oct 1, 2019
Messages
1
Trophies
0
Age
44
XP
53
Country
Switzerland
I cannot get this to work, the log file says:


'decrypt' is not recognized as an internal or external command,
operable program or batch file.

Any idea?
 

Ocxin

New Member
Newbie
Joined
Feb 1, 2020
Messages
2
Trophies
0
Age
22
XP
44
Country
Germany
Everything works as it should, I try to install the dlc, it should a loading bar and... nothing, as if I never installed anything...
 

brandon916

Well-Known Member
Newcomer
Joined
Sep 1, 2017
Messages
90
Trophies
0
Age
53
XP
390
Country
United States
 


This is a very simple batch file to decrypt CIA & 3DS files for beginner, the CIA will be decrypted and converted to CCI or only be decrypted CIA which able to install in Citra.
GitHub: https://github.com/matiffeder/stuff
Downlaod: https://gbatemp.net/download/batch-cia-3ds-decryptor.35098/download?version=35152



Please use legal way to get game files before use this pack.



Usage:
Put XXX.cia and XXX.3ds games, DLC & Patch to the folder of the pack, support multi-files.
Run "Batch CIA 3DS Decryptor.bat".
Then waiting it finished. (It will take a lot of memory/ram when these files are too big.)
If there are some games not able to decrypt, please put your seeddb.bin in the folder of the pack.


Features & Effects:
One key batch decrypt CIA & 3DS files.
DLC/Patch CIA > Decrypted CIA, able to install in Citra.
3DS Games > Decrypted and trimmed 3DS, so it is smaller.
CIA Games > Decrypted CCI (NCSD), not CXI (NCCH).
Auto dectect CIA type (DLC/Patch/Game).


Authors:
54634564 - decrypt.exe
profi200 - makerom.exe, ctrtool.exe
matif - Batch CIA 3DS Decryptor.bat



 
Works like a charm. Thanks.
 

miinikuni

Member
Newcomer
Joined
Jul 20, 2019
Messages
8
Trophies
0
Age
35
XP
95
Country
Canada
Anyone have an updated version of this? I get

struct.error: unpack requires a string argument of length 4

when trying to decrypt an NCCH inside an encrypted .cia from the eShop.

Google says this is an issue with python reading the file padding but I have no knowledge of how to fix it.
 

acrash

Active Member
Newcomer
Joined
Mar 18, 2020
Messages
32
Trophies
0
Age
44
XP
585
Country
United States
Hi
I used this tool and it seems to work just great. But I have three question about it.
Q1: When I decrypt a 3ds/cia file, the outputted file is not always the same. Meaning that if I do the following:
1- Decrypt the file {Game.3ds} and it gives me the file {Game-decrypted.3ds}
2- Move {Game-decrypted.3ds} to another place (desktop)
3- Decrypt the file {Game.3ds} again and it gives me the second {Game-decrypted.3ds}
The hashes (MD5) for the two outputted files are not the same. Why? is the process somehow different each time I use the program?
Q2: Is there a way to disable the trimming feature. Just in case I want to use another program to trim like (NDSTokyoTrim 3.1) or don't want to trim at all?
Q3: Is there a way to reverse the process (getting the encrypted files back, with the original hash) ?If it is impossible with this tool (or after the use of this tool), then is there a way to decrypt 3ds/cia files that is reversible?
*I use the tool for decrypting my files for emulation with Citra.
*I didn't decrypt the already decrypted files again, but I decrypted the original file twice to check if it gives me different results, which it did (MD5 mismatch). Also, I did check if the original file was changed after the first decryption, and it wasn't (MD5 match).
So, this tool seems to give slightly different results when applied on the same file. The inconsistency is surprising (and maybe unreliable), which made me ask Q1.
*I want the ability to return my decrypted files to their original encrypted form (MD5 perfect) for archival purposes, which made me ask Q2, Q3

Note: I'm a noob .So, if there are Windows tools (so that I don't brick my 3DS) or ways to do this (or some step by step explanation) it would be appreciated. If there isn't, then go ahead and hit me hard with what you have.
 
Last edited by acrash,

amandasb

New Member
Newbie
Joined
Apr 22, 2020
Messages
1
Trophies
0
Age
22
XP
32
Country
Brazil
how do I use the code? I have a Mac OS... I don't know what to do lol helppp pls

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

I don't know what to do with the code, I have a MAC OS, help please lol
 
D

Deleted User

Guest
Why when i open the .bat, it says "Finished, please press any key to exit" right off the bat and does not a single progress?
Update: it was my fault to run this as administrator. Oopsie oopsy?
 
Last edited by ,

matif

Well-Known Member
OP
Member
Joined
Jan 19, 2010
Messages
127
Trophies
0
XP
1,045
Country
Taiwan
Anyone have an updated version of this? I get

struct.error: unpack requires a string argument of length 4

when trying to decrypt an NCCH inside an encrypted .cia from the eShop.

Google says this is an issue with python reading the file padding but I have no knowledge of how to fix it.
Try yo update your seed.bin. Make sure your cia is intact.


how do I use the code? I have a Mac OS... I don't know what to do lol helppp pls
I don't know what to do with the code, I have a MAC OS, help please lol
At this moment I don't have mac version. If you need more helping, you can PM me.


Why when i open the .bat, it says "Finished, please press any key to exit" right off the bat and does not a single progress?
Update: it was my fault to run this as administrator. Oopsie oopsy?
Do you have a log.txt? Could you tell me what it wrote in the file? Which file you were trying to decrypt? Thanks.


Im having the same issue, but same happens just whenever I open it through any means
can someone please help me with this
Could you tell me more detailed steps that you did? Also, maybe you could answer the questions that I asked above. Thanks.

 
 
Last edited by matif,

matif

Well-Known Member
OP
Member
Joined
Jan 19, 2010
Messages
127
Trophies
0
XP
1,045
Country
Taiwan
Hi
I used this tool and it seems to work just great. But I have three question about it.
Q1: When I decrypt a 3ds/cia file, the outputted file is not always the same. Meaning that if I do the following:
1- Decrypt the file {Game.3ds} and it gives me the file {Game-decrypted.3ds}
2- Move {Game-decrypted.3ds} to another place (desktop)
3- Decrypt the file {Game.3ds} again and it gives me the second {Game-decrypted.3ds}
The hashes (MD5) for the two outputted files are not the same. Why? is the process somehow different each time I use the program?
Q2: Is there a way to disable the trimming feature. Just in case I want to use another program to trim like (NDSTokyoTrim 3.1) or don't want to trim at all?
Q3: Is there a way to reverse the process (getting the encrypted files back, with the original hash) ?If it is impossible with this tool (or after the use of this tool), then is there a way to decrypt 3ds/cia files that is reversible?
*I use the tool for decrypting my files for emulation with Citra.
*I didn't decrypt the already decrypted files again, but I decrypted the original file twice to check if it gives me different results, which it did (MD5 mismatch). Also, I did check if the original file was changed after the first decryption, and it wasn't (MD5 match).
So, this tool seems to give slightly different results when applied on the same file. The inconsistency is surprising (and maybe unreliable), which made me ask Q1.
*I want the ability to return my decrypted files to their original encrypted form (MD5 perfect) for archival purposes, which made me ask Q2, Q3

Note: I'm a noob .So, if there are Windows tools (so that I don't brick my 3DS) or ways to do this (or some step by step explanation) it would be appreciated. If there isn't, then go ahead and hit me hard with what you have.

A1: I think the way that "makerom" does is like packing, it packs up ncch files. You could try to pack up any same files to zip two or more times. The md5 of those zip are always different.

A2: I would like to help you to do that thing, but I need time to find that file.

A3: The original file is always there. The tool will not delete that.

 
 

GamerJAx

New Member
Newbie
Joined
Apr 28, 2020
Messages
1
Trophies
0
Age
24
XP
33
Country
India
I am getting error

[CCI ERROR] Not enough memory
[RESULT] Failed to build CCI

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

I am getting error
[CCI ERROR] Not enough memory
[RESULT] Failed to build CCI
 

matif

Well-Known Member
OP
Member
Joined
Jan 19, 2010
Messages
127
Trophies
0
XP
1,045
Country
Taiwan
I cannot get this to work, the log file says:


'decrypt' is not recognized as an internal or external command,
operable program or batch file.

Any idea?
There is a file called decrypt.exe needs to be in the folder. Check if you extracted all the files.

Everything is working as intended, I install the DLC, it shows a loading bar and... nothing, as if I didn't install any DLC.
Which game and dlc you are trying?

Hi
I used this tool and it seems to work just great. But I have three question about it.
Q1: When I decrypt a 3ds/cia file, the outputted file is not always the same. Meaning that if I do the following:
1- Decrypt the file {Game.3ds} and it gives me the file {Game-decrypted.3ds}
2- Move {Game-decrypted.3ds} to another place (desktop)
3- Decrypt the file {Game.3ds} again and it gives me the second {Game-decrypted.3ds}
The hashes (MD5) for the two outputted files are not the same. Why? is the process somehow different each time I use the program?
...
A1: I think the way that "makerom" does is like packing, it packs up ncch files. You could try to pack up any same files to zip two or more times. The md5 of those zip are always different.
Anyway, this way is safe. If you need, I can give you .3ds version which will not change md5 and not trim, now.
 
 
Last edited by matif,

matif

Well-Known Member
OP
Member
Joined
Jan 19, 2010
Messages
127
Trophies
0
XP
1,045
Country
Taiwan
I am getting error

[CCI ERROR] Not enough memory
[RESULT] Failed to build CCI

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

I am getting error
[CCI ERROR] Not enough memory
[RESULT] Failed to build CCI
Sorry, I forgot to reply.
About your problem, it's because of that your memory/ram in the computer was not enough while you were decrypting the rom. So, you should close the game you are playing or any software which are not needed, or reduce the number of roms that you are trying to decrypt.
 
Last edited by matif,

torp

New Member
Newbie
Joined
May 4, 2020
Messages
1
Trophies
0
Age
25
XP
44
Country
Portugal
Do you have a log.txt? Could you tell me what it wrote in the file? Which file you were trying to decrypt? Thanks.



Could you tell me more detailed steps that you did? Also, maybe you could answer the questions that I asked above. Thanks.

 
I´m having the same issue with some files. I've successfully decrypted Pokemon Omega Ruby but for some reason whenever I try to decrypt Pk Ultra Sun the bat file says "Finished, press any key to leave".
I do have a log file, it says: 04/05/2020 18:01:37,41 which I suppose is the time I tried to decrypt.
Thanks
 

uglyrhubarb

New Member
Newbie
Joined
May 24, 2020
Messages
1
Trophies
0
Age
20
XP
33
Country
Germany
hey, i get following error message when trying to use it:

[TIK WARNING] Failed to sign header
[TMD WARNING] Failed to sign header

am I the only one with that problem and is there a way i can fix it?
cheers

edit: trying over and over again somehow worked for me. problem got fixed
 
Last edited by uglyrhubarb,

papermanzero

Well-Known Member
Member
Joined
Nov 20, 2009
Messages
353
Trophies
0
XP
273
Country
Gambia, The
I tried it with No-Intro encrypted roms. normally after the process it should fit the No-Intro decrypted hash, which is not the case.
So something with this tool is not working correctly.
 

acrash

Active Member
Newcomer
Joined
Mar 18, 2020
Messages
32
Trophies
0
Age
44
XP
585
Country
United States
I tried it with No-Intro encrypted roms. normally after the process it should fit the No-Intro decrypted hash, which is not the case.
So something with this tool is not working correctly.
You can use a tool called "3DS + CIA Rom Script" (Actually it's a collection of tools in one package). This should give you the same hashes as the ones found in the No-Intro database

You can find the tool in the google link found HERE
Tools --> Nintendo 3DS
 
Last edited by acrash,

eqagunn

Active Member
Newcomer
Joined
Jun 8, 2020
Messages
35
Trophies
0
XP
142
Country
Ireland
Tested on a few already decrypted ROMs to see if this tool can be used just for trimming.

Worked fine for "Super Mario 3D Land", "A Link Between Worlds" and "Pokemon Ultra Sun".
On the other hand, "TriForce Heroes" reports invalid region in Citra and wont start.

Upon further inspection I noticed all trimmed ROMs ended up with first 256 bytes being overwritten with FF for "HeaderNCSD.bin", "HeaderNCCH6.bin" and "HeaderNCCH7.bin".
3DSExplorer and NDSTokyoTrim don't do these overwrites and end up with a functional "TriForce Heroes".

I asume this tool doesn't support already decrypted ROMs.
 
Last edited by eqagunn,

OldDevel

New Member
Newbie
Joined
Jun 9, 2020
Messages
1
Trophies
0
Age
43
XP
33
Country
United States
I'm getting an error with multiple .cia files

C:\..\Batch CIA 3DS Decryptor>decrypt.exe sun.cia
Error -3 from inflate: incorrect data check
Error decompressing _ssl.pyd
Failed to write all bytes for _ssl.pyd

I'll try on another computer...
 

vollehballah

New Member
Newbie
Joined
Jul 14, 2020
Messages
1
Trophies
0
Age
34
XP
42
Country
United States
I'm receiving an error trying to decrypt Pokemon Ultra Sun:

"NCCH/CCI/CIA archiver and more has stopped working: a problem caused the program to stop working correctly. Windows will close the program and notify you if a solution is available."

Anyone else encounter and resolve this?
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • SylverReZ @ SylverReZ:
    Had a ton of bugs and often crashed. It even didn't support DOS compatibility with older games. :feelsbadman:
  • SylverReZ @ SylverReZ:
    I only grew up with Windows XP because I was lucky.
  • RedColoredStars @ RedColoredStars:
    I downloaded XP on dialup when it came out. Overnights for like a week. cuz I couldn't tie up the phone line during the day. It was so awesome and worked so great going from ME to XP.
  • K3Nv2 @ K3Nv2:
    Vga pins were a dick
  • K3Nv2 @ K3Nv2:
    I kind of want down a large pizza at 10am then crash out
  • ZeroT21 @ ZeroT21:
    Having pizza all day? done it
  • K3Nv2 @ K3Nv2:
    Nah pizza hut open at 10:30
  • ZeroT21 @ ZeroT21:
    just buy a stack of pizza and keep the rest you don't need yet frozen
  • K3Nv2 @ K3Nv2:
    Or buy frozen pizza
  • ZeroT21 @ ZeroT21:
    I buy the regular kind, not the frozen stuff
  • ZeroT21 @ ZeroT21:
    supermarket pizza is ass
  • K3Nv2 @ K3Nv2:
    x65 would just yell at me
  • ZeroT21 @ ZeroT21:
    sounds ok, he didn't pull a gun out ,so...
  • K3Nv2 @ K3Nv2:
    $12 large any style pizza deal
  • K3Nv2 @ K3Nv2:
    Each bite is a $1 well spent
  • SylverReZ @ SylverReZ:
    @ZeroT21, Agreed. I hate oven pizza, only from pizza place.
    +1
  • K3Nv2 @ K3Nv2:
    Nah I can still go for totinos
  • RedColoredStars @ RedColoredStars:
    i like totinos party pizzas. lol.
  • RedColoredStars @ RedColoredStars:
    the cracker-like crust is great on those
  • RedColoredStars @ RedColoredStars:
    My neighbor and I are going to make this next month....
  • SylverReZ @ SylverReZ:
    Tiger crust is great.
  • K3Nv2 @ K3Nv2:
    I'm beefing with a neighbor currently each time I ask him for help with something he makes bs excuses then ignores my calls text but seems to randomly speak when I'm done with the project after doing things to help him
  • RedColoredStars @ RedColoredStars:
    DiGiorno Crispy Pan Pizza tasted pretty dang close to Pizza hut pan pizza, but Im not sure if theyve been discontinued or not. Havent seen them locally for a couple of months now.
  • RedColoredStars @ RedColoredStars:
    The croissant crust is still available though, but not quite as good imo.
    RedColoredStars @ RedColoredStars: The croissant crust is still available though, but not quite as good imo.