Link to home
Start Free TrialLog in
Avatar of Caxxcann
Caxxcann

asked on

Open .exe file

I have an .exe file I created several years ago and I lost the original code files.  Is it possible to open an .exe file to view the VB code?

ASKER CERTIFIED SOLUTION
Avatar of cookre
cookre
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi Caxxcann,
Agree with cookre's answer.
And it is lucky that is true, otherwise anybody could view anybody else's source code!

Dabas
Avatar of sunnycoder
It is not possible to recover the source code ... However, you may be able to get a few things ...

Check this link
http:Q_20907880.html
Avatar of Kavar
Kavar

If you wrote the program with vb 5 or earlier, it is possible to decompile (although vb5 decompile was not ever fully explored)


let me know if you need the links to the decompilers
Currently there is NO way to view the original source of .exe's.  You can run OllyDBG or SoftICE on the file to view the assembly code.  

For VB6 (maybe VB5 too) apps, try Numega's SmartCheck.  You won't get the source, but you can see what the program is doing.
No you can't. Just for security reasons!
If you like more info about you "reverse" process You have to search for word like "Reverse Enginearing" on the web.
Probley would be quite the mess to deal with, as compliers take away function names when being comverted to ASM....
Currently there are no tools available to do this conversion. And i think there is very less possibilty of developing such a tool.Actually the VB compiler, infact every compiler converts the source code to the machine code of the native processor. How would any tool determine if the machine code is converted by the VB compiler or VC++ compiler. If this would have been possible we could get an equivalent VB program from machine code (.EXE file) which have been compiled using VC++ compiler.
I not totally agree with you dear atulmoglewar! There aresome tools that are able to tell you which compiler was used to generate a specific executable (EXE). This is possible because every Compiler/Linker has a kind of 'signature' that is present in the final EXE. Search for STUD_PE or File_Inspector for more info.
Your last sentence is a little bit confusing because if you have coded some lines you know that there are many way to perform the same results. Moreover any compiler has many switches to enable code-optimization that could delete some of your coded lines: so this is not possible!
To all that are saying it's impossible, you are wrong!

Caxxcann says it's an old program, and was VB, so chances are it's older than vb6.

si it can be decompiled to vb code,  as Kavar says. Ahh... P-Code ...

Of course, all variables and functions won't be recovered, but it can still be usefull, especially for it's own writer.

the decompiler are easy to find on the web...

Unless it was in VB6 and he has the PDB!  If you have the PDB you have the source, kind of.
Are you really able to read a PDB file and get back to the source app???????????????
I not believe it! It's a binary file, created by the compiler for debugging purpose!
Last of all you can create a PDB file only from the compiler (VB, VC, etc.) from the SOURCES!!!!!!!!!!!
Sure, just debug the app with the PDB file.  Open the EXE in MS VC6 and step into it.  After all the init stuff you should get into the source.  I'm fairly certain that the PDB contains a listing of the source, as at work I've done just this and debugged an application that I was given no access to the source.  I guess I will have to try it again to verify.

Cheers
No .
Maybe you cannot regeberate the original VB Code, but it is possible to disassamble the exe-File to get the Assembler Code. Depending on what you want to do which the source code this could be a solution. If you want to do bigger changes in the source code this solution could be a little tricky...
lol. no
Sure you can.........Convert EXE's into ASM!
Go here to Download the Trial Version.
 http://www.datarescue.com/idabase/
None of you who don't know what your talking about need to be answering in this post. Mainly the ones who are saying no to so many things. First of all VB apps and C++ apps are very easy to distiguish i can do this using note pad (the main thing to look for is msvbm6.dll or 5 4 etc) this reference means the VB runtime library was included. the c++ library is mscvrt.dll. Anyways their are many converison tools out their many do not know about. The most known for any program is Dissasembly OllyDebugger is the best in my opniion because it works on XP easily and has alot of code analyations that help it not to crash the program as softice many times does. IT also is lesser protected agianst for tits is newer. With softice theirs frog ice and black ice and many variants of patches and resistance for S ice debugging. Olly debug is really for debugging a running program as you would debug one in C++ or VB. for Static editing W32Dasm is a nice addition although oll can do this too.  Visual basics generated code cannot be interepted easily by a experienced asm coder or dissambler guy. Because of the librarys and way VB compiles it is much harder to go along twith the ASM than in  a C++ app. This is why SmartCheck is existent. Smartcheck will recover many parts of important VB applications. Thiers is also 3-5 rarer tools that recover the forms the buttons the code to the buttons and most functions as wel as even a ew modukles here and their. Dissasembled ASM can be convert into C by some recompilers, with questionable statements stuck in with inline ASM. All you people who are saying no are wrong. No you cannot recover a perfect working source but with the tools you can recover enough to maybe regenerate the original app. And ALL Windows Executables can be dissasebled. Many of them have protections such as the Int21s but with good skill this can be avoided. Btw their is also a few VB to C++ converters out their that do ok. The above dissaemlber he metioned is IDA Pro which is better than w32dasm but is harder to obatiai na full version free. With enough skill you can do anything to any compiled app. You can even rewrite and add Direct X code into games and  make direct X funcitoning menus (DX hooking.) It is also possible to inject you own ASM code using code caves........Hope this helps.
Btw yyes programs are all converted to machine code but the output is much different in what librays and code they incliude and access usually runtime libraries. For what you are saying to be true, you would have to has a specific compiler built to include all funtional code to run on its own and maybe even an OS shell. This is inefficent and is not how things work. Unless your talking about the operating system. Or a OS other than Linux or Windoze.
lol one more thing the reason VB5< is decompilable is because it uses Psuedo Code which is much more compact becasue its almost the raw source. In fact anything compiled in VB under Psuedo COde (any version of VB) included can be reopened and decompiled. However most applications  on VB 6 are compiled to an actual full executable for more speed and optimization. VB 5 also suppoorts Full executable generation.