0

I need to decompile an executable file into its source code and put the source code together again in such a way that it can be recompiled and work as it should. The only issue that I have with this is that I do not know in what language the program was written initially. Since Visual Basic is the programming language that I know best, I would prefer to decompile the executable to it. Is this possible? As far as I understand, executable files, regardless of what language they were written in, all compile to some form of ASM, meaning that it should be possible to decompile to any language that one wants to. Do I understand this correctly?

1

You are slightly correct. Languages like C and C++ do get compiled to native code(what you refer to as ASM), however decompiling them back to pseudo C/C++ is difficult and sometimes impossible. And even if successful, the code will not be 1:1 to the original.

It is also not possible(or rather, very very difficult) to decompile native code to something like Java or Python. These languages come with their own bytecode format and interpreters and hence do not compile to native code. However this does mean they can be decompiled to more or less their original format.

  • I understand that languages such as Java and Python are exceptions to this rule since Java uses the JRE and Python uses the Interpreter. Although it may be difficult and/or impossible to decompile to native code, could you suggest a possible way to do it? ASM stands for Assembly. I am not sure if this is technically the correct term for the native code that is created, but I believe it is. – DaveTheMinion Nov 8 '14 at 21:58
  • To answer your question, it is not possible to decompile an arbitrary program to an arbitrary language, as far as I am aware. If the program is a Visual Basic program compiled to P-code then you might be able to decompile it to pure Visual Basic. – farmdve Nov 8 '14 at 22:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.