ROM Hack [Release] 3DS_CTR_Decryptor-VOiD

intermet

Well-Known Member
Member
Joined
Jul 19, 2012
Messages
152
Trophies
0
XP
138
Country
France
I get "00040000000EC400.Main.romfs.xorpad" , "00040000000EC400.Main.exefs_norm.xorpad" when i decrypt legend of zelda a link between world.
Is it correct ?
 

banxian

Active Member
Newcomer
Joined
Oct 30, 2014
Messages
40
Trophies
0
Age
41
XP
276
Country
Switzerland
ctrtool crashed on extract romfs of Monster hunter 4G.

here is a quick fix on romfs.c for this bug.
Code:
void romfs_visit_file(romfs_context* ctx, u32 fileoffset, u32 depth, u32 actions, filepath* rootpath)
{
    u32 siblingoffset = 0;
    filepath currentpath;
    romfs_fileentry* entry = &ctx->fileentry;
 
    do {
        if (!romfs_fileblock_readentry(ctx, fileoffset, entry))
            return; // need breakall?
 
 
        //    fprintf(stdout, "%08X %08X %016llX %016llX %08X ",
        //        getle32(entry->parentdiroffset), getle32(entry->siblingoffset), ctx->datablockoffset+getle64(entry->dataoffset),
        //            getle64(entry->datasize), getle32(entry->unknown));
        //    fwprintf(stdout, L"%ls\n", entry->name);
 
        if (rootpath && rootpath->valid)
        {
            filepath_copy(&currentpath, rootpath);
            filepath_append_utf16(&currentpath, entry->name);
            if (currentpath.valid)
            {
                fprintf(stdout, "Saving %s...\n", currentpath.pathname);
                romfs_extract_datafile(ctx, getle64(entry->dataoffset), getle64(entry->datasize), &currentpath);
            }
            else
            {
                fprintf(stderr, "Error creating directory in root %s\n", rootpath->pathname);
                return; // <- need add a &break in argument
            }
        }
        else
        {
            filepath_init(&currentpath);
            if (settings_get_list_romfs_files(ctx->usersettings))
            {
                u32 i;
 
                for(i=0; i<depth; i++)
                    printf(" ");
                fwprintf(stdout, L"%ls\n", entry->name);
            }
        }
 
        fileoffset = getle32(entry->siblingoffset);
    } while (fileoffset != (~0));
}
original code is a recursion call with only fileoffset upate. always carshed on folder contains lots of file.
if depth is untouched, recursion must be prevent.
 

einstein95

Well-Known Member
Member
Joined
Aug 31, 2013
Messages
230
Trophies
0
Age
29
XP
312
Country
New Zealand
and here's
ctrtool crashed on extract romfs of Monster hunter 4G.

here is a quick fix on romfs.c for this bug.

-snip-

original code is a recursion call with only fileoffset upate. always carshed on folder contains lots of file.
if depth is untouched, recursion must be prevent.

and here's a compiled version for everyone unable to install Visual Studio.
 

Attachments

  • ctrtool.zip
    87.8 KB · Views: 307

gamesquest1

Nabnut
Former Staff
Joined
Sep 23, 2013
Messages
15,153
Trophies
2
XP
12,247
http://3dbrew.org/wiki/NCCH#CFA
"The CFA (CTR File Archive) specialisation of the NCCH container, is not executable, but are used in conjunction with CXI files."
How can an installed title not be executable?
if its a dlc/addon pack...i think its used for the manuals too on games, basically anything that is read but doesn't contain any sort of running code its just read by something else
 

Vappy

Well-Known Member
Member
Joined
May 23, 2012
Messages
1,508
Trophies
2
XP
2,613
Country
So are any of the current public tools capable of building the header and metadata to remake into a .cia, or is that still a manual process?
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • Xdqwerty @ Xdqwerty:
    I regret saying it :cry:
  • AncientBoi @ AncientBoi:
    :sad::sad::sad::sad::sad: l8er guys ..................... 🚪
  • Xdqwerty @ Xdqwerty:
    Later too...
  • BigOnYa @ BigOnYa:
    Damn @Xdqwerty chasing off users like a Juan
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    Welcome to the internet! Lol
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    He just means that some conversations are light and funny, Madonna having sex with a dog? Hilarious! Your uncle beating your dog then making you watch him molest it? Kinda ehhhh drama lol
    +2
  • Xdqwerty @ Xdqwerty:
    @BigOnYa, why do people hate seasons 20 and 23 of south park?
  • BigOnYa @ BigOnYa:
    I don't know. People hate and down vote everything nowdays. I see it especially on gamestores, like every game has a negative rating, even though they are good games.
  • BigOnYa @ BigOnYa:
    With south park, they speak the truth, whether people like it or not, then peeps get they're panties in a bunch.
    +1
  • Xdqwerty @ Xdqwerty:
    See ya later fr
    +1
  • BigOnYa @ BigOnYa:
    Later gator
    +2
  • G @ GamerGatorDoesTech:
    @BigOnYa i thought that was like a specific comment towards me
    +1
  • BigOnYa @ BigOnYa:
    Lol
  • ModernSithLord @ ModernSithLord:
    lol later gator that was good one @BigOnYa
    +1
  • Shgofc @ Shgofc:
    if i think i exist, then, i dont exi...
  • K3Nv2 @ K3Nv2:
    They started hating later seasons because it turned into half seasons and specials
    +1
  • K3Nv2 @ K3Nv2:
    People in youtube comments are such dick riders "oh I can't believe he said that to you" clicks on other video "wow this is amazing."
    +1
  • BigOnYa @ BigOnYa:
    Everyone is triggered nowadays too easy, bunch of pansies.
  • BigOnYa @ BigOnYa:
    1st video- That's why I hate ordering stuff online, if I can just go pick it up myself nearby. Wal-Mart online did that to me years ago, sent wrong item, I went to Wal-Mart by me to return, but noo, I had to mail it back and wait.
  • Psionic Roshambo @ Psionic Roshambo:
    99% of the time ordering online I have had flawless experiences, only time something was messed up, I ordered a big TV from Amazon and it came smashed the box was literally like some one jumped up and down on it, didn't even open it, contacted Amazon sent them pictures, they made me open it and take more pictures, free label to return it and they sent another. So it was relatively painless. But still annoying.
    +1
    Psionic Roshambo @ Psionic Roshambo: 99% of the time ordering online I have had flawless experiences, only time something was messed... +1