54

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.

1

6 Answers 6

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.

0
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.

1
  • sorry for the flag but many of the links in this answer are to download a virus.
    – user875234
    Commented Nov 26, 2018 at 16:30
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.

2
  • 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
    Commented Sep 4, 2012 at 8:23
  • Yes, I too was after some 'hardcoded' strings, so this tool really helped me. Commented Sep 7, 2012 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.

2
  • 4
    @antyrat in this case the link is the essential part of the answer. If the linked page changes the answer is useless.
    – MarkJ
    Commented Jan 1, 2015 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
    Commented Dec 29, 2016 at 6: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.

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.

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