Sounds like something that can easily be done with some powerful ai. So the reason it takes so long (why this post is claiming it’s 80%completed) is because of all the manual work. The code is already fully “decompiled” technically as the process of doing so is automatic and only as slow as the device it runs on. If my understanding is correct 80% is roughly how much of the code is rewritten with human readable code. In other words - we understand most of it and we could literally ship it like this with the remaining 20% obfuscated, we just can’t make any changes to that part because we don’t know wtf it does
Yes, the problem is readability. You can get “better” code of you know the exact tooling and settings for compilation, as you can then better guess what optimisations and tricks were used (by the compiler) and you may be able to “undo” them. There are so many places where this will only let you make guesses. You write a loop in your code, the compiler removes the loop and replaced it with another construct that may be a bit faster to execute, but may be way harder to understand - or tedious to change if you need to edit it especially if it’s not a simple change (character can now run faster!) but needs new functionality that would completely break this optimisation (but it’d be trivial to add in the original code).
Also all context is removed. You won’t work with code like this:
(Both pseudocode, not bothered to make a real example that maybe even compiles)
Sounds like something that can easily be done with some powerful ai. So the reason it takes so long (why this post is claiming it’s 80%completed) is because of all the manual work. The code is already fully “decompiled” technically as the process of doing so is automatic and only as slow as the device it runs on. If my understanding is correct 80% is roughly how much of the code is rewritten with human readable code. In other words - we understand most of it and we could literally ship it like this with the remaining 20% obfuscated, we just can’t make any changes to that part because we don’t know wtf it does
Im inclined to answer with “Yesn’t”
Yes, the problem is readability. You can get “better” code of you know the exact tooling and settings for compilation, as you can then better guess what optimisations and tricks were used (by the compiler) and you may be able to “undo” them. There are so many places where this will only let you make guesses. You write a loop in your code, the compiler removes the loop and replaced it with another construct that may be a bit faster to execute, but may be way harder to understand - or tedious to change if you need to edit it especially if it’s not a simple change (character can now run faster!) but needs new functionality that would completely break this optimisation (but it’d be trivial to add in the original code).
Also all context is removed. You won’t work with code like this:
(Both pseudocode, not bothered to make a real example that maybe even compiles)
if keyPressed(MOVE_RIGHT){ player.speed = min(player.MAX_SPEED, player.speed + player.acceleration*frametime) } else{ player.speed = player.speed * player.MOVEMENT_DAMPENING * frametime }You’d get something like this:
int *fi93836290= 0x7363728 int *fi22425 = &fi93836290+0x23 fi22425 = fun7362782(0x63627)? fun42638(...) //and so on