52

I lost the source code from one project I did on the company I'm working for and haven't been able to find a Visual Basic 6 decompiler; does that even exists?

I only have the EXE that I've rescued from a user's machine.

Rismo
  • 6,487
  • 11
  • 37
  • 33
  • 3
    One of [several](http://stackoverflow.com/questions/414068/is-there-a-vb6-decompiler) [duplicate](http://stackoverflow.com/questions/678544/free-vb-6-0-decompiler) [questions](http://stackoverflow.com/questions/1406015/decompiler-for-visual-basic-6-program) on VB6 decompilers – MarkJ Mar 25 '11 at 14:44

6 Answers6

28

For the final, compiled code of your application, the short answer is “no”. Different tools are able to extract different information from the code (e.g. the forms setups) and there are P code decompilers (see Edgar's excellent link for such tools). However, up to this day, there is no decompiler for native code. I'm not aware of anything similar for other high-level languages either.

Konrad Rudolph
  • 530,221
  • 131
  • 937
  • 1,214
22

http://www.program-transformation.org/Transform/VisualBasicDecompilers

This link provides a lot of resources for VB6 Decompiling, but it seems like it will depend greatly on what you DO have (do you still have the pre-link Object code [EDIT: er... p-code I mean], or just the EXE?) Either way, it looks like there's something, take a look in there.

EdgarVerona
  • 1,488
  • 1
  • 15
  • 23
17

I have used VB Decompiler Lite (http://www.vb-decompiler.org/) in the past, and although it does not give you the original source code, it does give you a lot of information such as method names, some variable strings, etc. With more knowledge (or with the full version) it might be possible to get even more than this.

Jonathan Williams
  • 2,015
  • 1
  • 19
  • 23
  • 2
    This one was handy for me - it outputted a whole bunch of assembler looking code; but I was after the strings and they were easy to lift from the decompiled code. – Don Vince Sep 04 '12 at 08:23
  • Yes, I too was after some 'hardcoded' strings, so this tool really helped me. – Jonathan Williams Sep 07 '12 at 11:30
10

Did you try the tool named VBReFormer (http://www.decompiler-vb.net/) ? We used it a lot the past year in order to get back the source code of our application (source code we had lost 6 years ago) and it worked fine. We were also able to make some user interface changes directly from vbreformer and save them into the exe file.

RoastBeast
  • 1,059
  • 2
  • 22
  • 38
  • 4
    @antyrat in this case the link *is* the essential part of the answer. If the linked page changes the answer is useless. – MarkJ Jan 01 '15 at 15:26
  • Free edition gives you a good clean look for the GUI, but variables and statements are blocked. Maybe if you paid them, it would be a different look in terms of your code. But I also noticed that some codes are not supposed to be there. – Mr.J Dec 29 '16 at 06:33
1

In my own experience where I needed to try and find out what some old VB6 programs were doing, I turned to Process Explorer (Sysinternals). I did the following:

  1. Run Process Explorer
  2. Run VB6 .exe
  3. Locate exe in Process Explorer
  4. Right click on process
  5. Check the "Strings" tab

This didn't show the actual functions, but it listed their names, folders of where files were being copied from and to and if it accessed a DB it would also display the connection string. Enough to help you get an idea, but may be useless for complex programs. The programs I was looking at were pretty basic (no pun intended).

YMMV.

BRNDR
  • 11
  • 2
0

Yes I think You can get it download and separately its Help files from: vbdecompiler.org Site. and there is a Video on YouTube which explains how to Use it to Get the Code from an exe file and Save it. I hope that I helped.