You lost the source code of a VB6 application. Here is what can be recovered.
Dead disk, developer gone, backup of a version too old: only the compiled program is left. A VB6 decompiler gets much more out of it than people expect, and less than everything. This page says which, before you install anything.
Does one of these sound familiar?
The disk died
The development machine is gone, but the EXE still runs at your users' desks.
The developer left
They took the project with them, or nobody knows where they kept it.
The contractor is gone
The company that wrote the application no longer exists, and the source was never delivered.
The backup is too old
The source you found no longer matches the version running in production.
What you need
The compiled file: an .exe, .dll, .ocx or .scr produced by Visual Basic 5 or 6. Nothing else. You do not need to know whether it was compiled to P-Code or native code: VBReFormer detects it and handles both.
- P-Code decompilation, VB5 and VB6
- Native x86 code decompilation, VB5 and VB6
- UPX-packed binaries: unpacked without ever being run
- Then ASPack, MPRESS and PECompact Coming soon
What comes back
Forms and controls, with all their properties, pictures included: in full, in every case.
Resources, strings, references to libraries and third-party controls, the project structure: a .vbp that reopens in the IDE.
The code of the procedures: conditions, loops, calls, assignments, control access, rebuilt as readable Visual Basic, P-Code and native alike. The coverage page measures what that amounts to, program by program.
80%
of projects recompile in VB6 without any change
1,158 / 1,164
defined P-Code instructions translated to Visual Basic
100%
of forms and their properties recovered, in every case
What never comes back, with us or with anyone: local variable names and comments, which the compiler did not keep. The recovered code reads and recompiles; it does not match the original word for word.
SETUP1.EXE
Anyone can check: SETUP1.EXE
A Microsoft program whose source ships with VB6: anyone can compare.
136 → 227
procedures exported, from generation 1 to V7
22 / 24
procedures drawn at random and read against their source: V7 more faithful
Once the project is recovered
It becomes a project like any other: you reopen it, read it and maintain it in the original IDE.
- Fix a bug or change a business rule, then recompile
- Read the machine code with the x86 and P-Code disassemblers, included in Standard
- Follow the program end to end with the call graph and cross-references, in Professional
- Document an application nobody knew in full any more
How to proceed, free first
- 1
Open the binary in the free edition, or drop it in the online studio with nothing to install. You see the project structure, the complete forms and a preview of the decompiled code.
- 2
Judge on evidence: the preview shows what the engine rebuilds from your binary, not from a sample. If what you see is worth the licence, take it; if not, you have spent nothing.
- 3
With the licence, export the full project and reopen it in Visual Basic 6: about 80% of projects recompile without any change. A value the binary cannot establish becomes a call to VBRF_ValeurInconnue(), which you find with a search.
The detailed article: telling P-Code from native, and where to start
What it costs
Trying costs nothing. You only pay if what you see on your own binary is worth it.
Free edition
Complete forms, project structure and a preview of the code
0 €
Standard
Get your source code back
79 € per user
Professional
Standard, plus the analysis tools
229 € per user
Frequently asked questions
What is the difference between P-Code and Native Code?
VB6 compiles either to P-Code (pseudo-code run by the virtual machine) or to Native Code (x86 machine instructions, the default setting). As of generation 2 (VBReFormer 7), the same engine decompiles both into readable Visual Basic: 1,158 of the 1,164 defined P-Code instructions are translated, a measurement published on the coverage page. The previous generation reconstructed Native Code only.
What is recovered from an executable, and what is lost for good?
Whatever Visual Basic needs at run time is in the file and comes back: names of forms, classes, modules and controls, event handlers, public class members, interface properties, runtime calls, API declarations. What the compiler threw away cannot be recovered, by any tool: comments, names of local variables and parameters, named constants replaced by their value, and the names of procedures in .bas modules. On average, 90% of the source code is recovered; what is missing comes down to those elements, absent from the file.
Does the decompiled code recompile in the Visual Basic 6 IDE?
Yes: in practice, about 80% of projects recompile without any touch-up. The export writes the headers the IDE requires (VERSION, Attribute VB_Name), without which VB6 rejects the file. A value that could not be established is never invented: it becomes a call to VBRF_ValeurInconnue(), which VB6 accepts and which you find with a search. What is not in the binary is named and explained in the export notes.
What if decompilation doesn't work on my binary?
That is exactly what the free edition is for: it shows you, on YOUR file and before any purchase, what can be extracted — forms, resources, project structure. We always recommend trying it first. As licenses are digital content delivered immediately, sales are final; if you hit a technical issue, our support will work with you on a solution.
Is my file kept?
Your binary is not kept: it is analysed, then erased with the session
Is it legal to decompile a program?
Yes, when you own the rights to the software — the typical case being reconstructing your own lost source code — or within the legal framework of interoperability. You must hold the necessary rights to the analyzed program.
Does VBReFormer decompile .NET, VB.NET or C#?
No. VBReFormer handles Visual Basic 5 and 6: .exe, .dll, .ocx and .scr. A .NET assembly needs a .NET decompiler; we compare several on the blog.
Would you rather we did it for you?
We recover the project from your binary, reopen it in the IDE and deliver it ready to maintain, with a report of what was found. Free evaluation of the binary before any quote.
Ask for a free evaluation
