Homebrew Decompling NSPS

  • Thread starter Thread starter NotErista
  • Start date Start date
  • Views Views 5,529
  • Replies Replies 19
Is there a way to decompile nsp such as youtube for example

Why would you ever want to decompile it? It would be easier to write your own YouTube app than decompiling and then recompiling the existing one.

I think if you start with explaining what you actually want rather than what you THINK you need, we might actually be able to help you.

decompilation project usually take a lot of time and effort and are rarely started for products that are still around. It’s more common in cases where the source code is thought to be lost forever.
 
  • Like
Reactions: Slluxx
Why would you ever want to decompile it? It would be easier to write your own YouTube app than decompiling and then recompiling the existing one.

I think if you start with explaining what you actually want rather than what you THINK you need, we might actually be able to help you.

decompilation project usually take a lot of time and effort and are rarely started for products that are still around. It’s more common in cases where the source code is thought to be lost forever.
iam not going to recompile it when did i say that

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

iam not going to recompile it when did i say that
Iam only wanting it code?

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

decompilation project usually take a lot of time and effort and are rarely started for products that are still around. It’s more common in cases where the source code is thought to be lost forever.
thanks for the info
 
  • Like
Reactions: Saviouz
You can use hactool but the exact command lines arguments you need will depend on what you want. https://github.com/SciresM/hactool . If you can give a bit more info I'll try to help but there's plenty of guides for using it. When you say decompile what do you mean? Do you want the binaries? You'll need to dump the exefs. Want assets? You'll need the romfs. Iirc meta data and icons have their own file system but I don't remember the name.
 
Last edited by CompSciOrBust,
You can use hactool but the exact command lines arguments you need will depend on what you want. https://github.com/SciresM/hactool . If you can give a bit more info I'll try to help but there's plenty of guides for using it. When you say decompile what do you mean? Do you want the binaries? You'll need to dump the exefs. Want assets? You'll need the romfs. Iirc meta data and icons have their own file system but I don't remember the name.

when someone says decopile I guess they want an actuall compilable sourcecode that is readable.
 
when someone says decopile I guess they want an actuall compilable sourcecode that is readable.
I considered that too but they said they don't want to recompile it. If they don't want to recompile it I don't know why they would want to get the source code. I thought maybe they were planning on doing asset mods or hex editing the raw binary.
 
You can use hactool but the exact command lines arguments you need will depend on what you want. https://github.com/SciresM/hactool . If you can give a bit more info I'll try to help but there's plenty of guides for using it. When you say decompile what do you mean? Do you want the binaries? You'll need to dump the exefs. Want assets? You'll need the romfs. Iirc meta data and icons have their own file system but I don't remember the name.

Yea I did want the srouce code
But i may use this in the future

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

What I did find tho is the in the intellectual property Notices was google had the srouce I think I have not checked yet but here is the link cobalt.googlesource.com/cobalt
 
AFAIK there is a ghidra plugin for NSPs but im not sure if its usecase is to reverse engineer code. And even if it would be, you'd see a language you wont understand on the left and gibberish decompiled code that doesnt make sense at all to you on the right. And you also wouldnt be able to copy paste that gibberish code even if you wanted to, because you would need to reverse engineer and adapt it so you could use it with libnx.

So to answer your question "Is there a way to decompile nsp such as youtube for example": yeah, there might actually be one.
But the real question should be "would it make sense to decompile an existing app to learn from or re-use its code" and the answer is: no.
 
Last edited by Slluxx,
AFAIK there is a ghidra plugin for NSPs but im not sure if its usecase is to reverse engineer code. And even if it would be, you'd see a language you wont understand on the left and gibberish decompiled code that doesnt make sense at all to you on the right. And you also wouldnt be able to copy paste that gibberish code even if you wanted to, because you would need to reverse engineer and adapt it so you could use it with libnx.

So to answer your question "Is there a way to decompile nsp such as youtube for example": yeah, there might actually be one.
But the real question should be "would it make sense to decompile an existing app to learn from or re-use its code" and the answer is: no.
K Thanks alot
 
Ok, how about this? Farsight Studios makes The Pinball Arcade for Nintendo Switch as well as PC. I've noticed that some of the tables on PC are missing on the Switch. I'd like to pull apart the Farsight Studios Pinball Arcade NSP so I can see the tables and assets involved with them. Perhaps I can find a way to import the tables from PC over to the Switch. But I don't know how to view the assets in a Nintendo NSP file.
 
Perhaps the decompilation, and later compilation, serve to change the path of the servers of the Free to Play games, instead of the CDNs. By those of the game server itself directly, just like its other versions on other devices (Not consoles)
 
Ok, how about this? Farsight Studios makes The Pinball Arcade for Nintendo Switch as well as PC. I've noticed that some of the tables on PC are missing on the Switch. I'd like to pull apart the Farsight Studios Pinball Arcade NSP so I can see the tables and assets involved with them. Perhaps I can find a way to import the tables from PC over to the Switch. But I don't know how to view the assets in a Nintendo NSP file.

Perhaps the decompilation, and later compilation, serve to change the path of the servers of the Free to Play games, instead of the CDNs. By those of the game server itself directly, just like its other versions on other devices (Not consoles)

you two will probably have more luck with dumping the RomFS section of the game and poke in those files.
 
  • Like
Reactions: Impossible_Igntiz
Yea I did want the srouce code
But i may use this in the future

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

What I did find tho is the in the intellectual property Notices was google had the srouce I think I have not checked yet but here is the link cobalt.googlesource.com/cobalt

Just as has been said, decompilation takes a lot of time and effort, and unless you can recompile it and obtain a 1:1 compilation compared to the original, then the decompilation will be wrong.

Having the source code of a recent product (aka, software) not owned by you, and using it on your own projects, will get you in court facing thievery for sure.

That's the main reason why all those recent source code leaks can't be used for improving other software in a direct manner.
 
Last edited by CMDreamer,
  • Like
Reactions: NotErista
Just as has been said, decompilation takes a lot of time and effort, and unless you can recompile it and obtain a 1:1 compilation compared to the original, then the decompilation will be wrong.

Having the source code of a recent product (aka, software) not owned by you, and using it on your own projects, will get you in court facing thievery for sure.

That's the main reason why all those recent source code leaks can't be used for improving other software in a direct manner.
I know that perfectly well. Talking about what you want to achieve does not mean that it can be done. But it is not an impediment to discuss it.
 
  • Like
Reactions: NotErista
and you no more than decompose the thread.
the fuck is your problem dude? its not my problem that you dont know a thing about how this works. I gave a real and valid hint on how you would go about to "change the path of the servers of the Free to Play games, instead of the CDNs.".

Ways to reach your goal where you know it cant be done are useless to discuss. So why not focus on alternative ways? One way beeing to poke in the RomFS section.

If you cant handle someone telling you that something you say (because you clearly have no idea of what the fuck you are talking about) is impossible, you shouldnt be on the internet.
 
  • Like
Reactions: NotErista
Do this:

hactool -t pfs0 -k keys.dat file.nsp --pfs0dir=extract
hactool -k keys.dat --exefsdir=exefs --romfsdir=romfs extract/largest.nca
hactool -t nso0 -k keys.dat exefs/main --uncompressed=mainDec

Use google to find nxo64.py - put that into IDA loaders folder.

Mod the mainDec file, then Do this: (apparently):

In order to make the executable accepted when it's launched, the NSO0 header has to be modified where the ".text" part hash is located (see https://switchbrew.org/wiki/NSO for further details).
 
  • Like
Reactions: Naminave

Site & Scene News

Popular threads in this forum