Chadderz' GHS Demangler

Discussion in 'Wii U - Hacking & Backup Loaders' started by BullyWiiPlaza, Sep 22, 2016.

  1. BullyWiiPlaza
    OP

    BullyWiiPlaza Nintendo Hacking <3

    Member
    1,727
    1,409
    Aug 2, 2014
    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
     

    Attached Files:

    Last edited by BullyWiiPlaza, Sep 22, 2016
  2. Conn0r

    Conn0r GBAtemp Fan

    Member
    327
    187
    Jan 10, 2016
    United States
    Yes!! What is it?
     
  3. PokeAcer

    PokeAcer Banned

    Banned
    1,430
    1,061
    May 28, 2015
    United Kingdom
    Wales
    >Dont post unless you read.
     
  4. KiiWii

    KiiWii GBAtemp Psycho!

    Member
    3,780
    1,323
    Nov 17, 2008
    United Kingdom
    VERY COOL! Chadderz would be great to have on the temp.
     
    TotalInsanity4 and BullyWiiPlaza like this.
  5. Bug_Checker_

    Bug_Checker_ GBAtemp Advanced Fan

    Member
    950
    444
    Jun 10, 2006
    United States
  6. PokeAcer

    PokeAcer Banned

    Banned
    1,430
    1,061
    May 28, 2015
    United Kingdom
    Wales
    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.
     
  7. asper

    asper GBAtemp Advanced Fan

    Member
    610
    306
    May 14, 2010
    United States
    Is there any good Ida pro library to correctly decompile uncompressed rpx?
     
  8. BullyWiiPlaza
    OP

    BullyWiiPlaza Nintendo Hacking <3

    Member
    1,727
    1,409
    Aug 2, 2014
    Germany
    I use this plugin with good success
     
    asper likes this.
  9. asper

    asper GBAtemp Advanced Fan

    Member
    610
    306
    May 14, 2010
    United States
    I think someone (@NWPlayer123 ?) has a much better one... isn't him?
     
  10. BullyWiiPlaza
    OP

    BullyWiiPlaza Nintendo Hacking <3

    Member
    1,727
    1,409
    Aug 2, 2014
    Germany
    Why would she?
     
  11. NWPlayer123

    NWPlayer123 GBAtemp Addict

    Member
    2,629
    6,226
    Feb 17, 2012
    United States
    The Everfree Forest
    Nope, I've been using chadderz' version from Github cause I was the one poking him to get it working
     
    asper and TotalInsanity4 like this.