As far as I’m aware, the main problem with decompilers is the fact that they can’t name variables and functions automaticly. But that doesn’t matter if you are just going from binary -> decompiler -> compiler -> binary

And I know there’s a lot of platform dependent code like OS APIs (such as DirectX, and WinAPI). But surely there are substitutions of the functions defined in these APIs right? I think automated porting could be performed 90% of the time and the remaining 10% could be fixed with community patches

This feels like a incredibly stupid idea after writing down but I just want to know

  • MetaRobert@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    3 months ago

    Generally speaking, the initial compile is where your theory breaks. The initial compile process creates a binary that is very specific to its target system. When you decompile, you get code that is, no surprise, very specific that same target OS and hardware architecture.

    Its probably a bit like English to Mandarin (random language choice). If you translate and lose the original english, you can never get the original english back, never be sure exactly what words and phrases were used.