Hacking Chadderz' GHS Demangler

BullyWiiPlaza

Nintendo Hacking <3
OP
Member
Joined
Aug 2, 2014
Messages
1,932
Trophies
0
XP
2,477
Country
Germany
What is a demangler?
Some compilers encode information into the symbol name. Getting those information back in form of a readable function signature is demangling. Read the C part on Wikipedia.

What is GHS?
GHS is the Wii U's compiler.

What is this even good for?

It helps reverse engineering and developing for Wii U.

Where do I download the application?
Check the attachment below.

Where do I get the source code?
Here.

How do I compile it?
Using Visual Studio by opening the ghs-demangle.sln file and building the project.

How do I use this?
It's a command line application:
Code:
D:\Consoles\WiiU\Applications\PC\GHS Demangler\bin\Debug>ghs-demangle.exe
ghs-demangle [OPTION].. [--] [FILE]..
Demangles all symbols in FILE(s) to standard output.
Error messages are displayed on standard error.
Use "-" as file for standard input.

  --help     Display this help message and exit.
  --version  Display version message and exit.

D:\Consoles\WiiU\Applications\PC\GHS Demangler\bin\Debug>
To interactively demangle symbol names, you have to use the "-" command line argument:
Code:
ghs-demangle -
... followed by the symbol name from an RPL you want to demangle, for example:
Code:
R_StableSortSurfs_NonAuto__tm__43_26GfxSortCloudSurfsInterface12GfxCloudSurf__FPCZ2ZUiPZ2Z_Ui
Result:
Code:
unsigned int R_StableSortSurfs_NonAuto<class Z1 = GfxSortCloudSurfsInterface, class Z2 = GfxCloudSurf>(Z2 const *, unsigned int, Z2 *)
Awesome. The once "trashy and spammy" symbol name is now a useful function signature to work with. Also thanks to @NWPlayer123 for mentioning the interactive mode which is what you want to use. :D

NOTE: The attached code may not be the compiled version of the latest demangler source. Check the source code repository linked above for updates.
 

Attachments

  • ghs-demangle.rar
    7.2 KB · Views: 180
Last edited by BullyWiiPlaza,
D

Deleted User

Guest
he's at WHB and his skype is the same as his twitch name. Be warned though, he will need to somehow know you :P
EDIT: He went back to Cambridge today so you may not get any replies for a few days.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Psionic Roshambo @ Psionic Roshambo: https://www.youtube.com/watch?v=4N-3vv4kzdk