Is it possible to edit and re-compile by reversing the source code?

3
For example, assuming I get an Atari ROM, if I apply reverse engineering to this ROM I would like to make edits (change a color or change a text) and generate a valid ROM only with the information contained in that ROM ?

I've already had to use a decompiler to retrieve a lost source code from my Java application, but to recompile I used the Java compiler itself, but in this case the question is whether I would have, in addition to decompile, create a compiler based only on the compiled program.

Taking advantage, is there a lot of difference between emulating a ROM and decompiling one?

    
asked by anonymous 17.01.2017 / 13:45

1 answer

6

Yes, you can change any code. Of course in ROM you will have to generate a new one, since it does not allow writing.

You can decompile virtually any code, but some are quite difficult. You need to have lots of information that is not always available. In general reverse engineering is done on top of the same assembly, which is possible to get easy in 100% of situations.

Of course, no decompiled code will be as readable as the original.

Some languages use an information-rich, intermediate bytecode , so you can recreate the original code very closely. In general there will be small changes to the original form of the algorithm, but doing the same thing, the style will obviously be the decompiler, will not have comments, and will often lose local variable names.

Java, C # and any language that does not usually generate a native binary are like this. Note that C # can generate native code .

There's nothing you can do to stop it. What you can do is make it difficult, create situations that the decompiler gets complicated, that changes meaningful names to illegible things. But obfuscators can cause code execution problems .

Emulating a ROM has nothing to do with decompiling one.

There may be some confusion as to what a compiler is. There is a question that speaks of this: What is a programming language, IDE, and compiler? . And another one that talks how it works: How is a compiler done? .

    
17.01.2017 / 14:00