Valhalla Legends Forums Archive | Visual Basic Programming | Can VB 6 be decompiled

AuthorMessageTime
Twix
Me and a friend are having a fight i am saying that VB 6 cant be decompiled and he is saying people decompile and steal projects all the time.
April 2, 2004, 9:52 PM
The-FooL
VB6 can be decompiled. There are many decompilers out there....
April 2, 2004, 10:42 PM
Stealth
As far as I know, VB6 can't be decompiled back into VB code. Any program can be disassembled.
April 2, 2004, 11:40 PM
Noodlez
Someone *could* write a program which converts the assembly to VB though : :P
April 3, 2004, 1:15 AM
Twix
The last VB i knew that could be decompiled was Vb3 i think since that VB has been more protected and harder to decompile i searched google and different websites and found no proof that decompiles exist
April 3, 2004, 2:43 AM
Newby
[quote author=Noodlez link=board=31;threadid=6140;start=0#msg53275 date=1080954947]
Someone *could* write a program which converts the assembly to VB though : :P
[/quote]
I nominate Noodlez to do it :D
April 3, 2004, 2:44 AM
drivehappy
I imagine it can be. If the processor can execute the commands I'm sure someone would be able to do the same, however I've read it is hard to do.
April 3, 2004, 3:59 AM
St0rm.iD
[quote author=Noodlez link=board=31;threadid=6140;start=0#msg53275 date=1080954947]
Someone *could* write a program which converts the assembly to VB though : :P
[/quote]

no you can't

But check out NuMega SmartCheck, it can give you a ton of information, almost to the point of decompiling.
April 3, 2004, 10:36 PM
TheMinistered
In all actuality, a vb6 executable could be decompiled to vb6. There is one but though, that being that you can not retrieve original variable names. I think no one has taken the time to build one, as it would be a large and cumbersome project.
April 4, 2004, 10:15 PM
Adron
P-code could probably be done rather well, native code is probably more ambiguous.
April 4, 2004, 10:53 PM
iago
As far as I know, vb1-4 can be decompiled fully, and vb 5/6/I assume .net can't be. It can, of course, be disassembled or hex-edited, though. If by "Steal" your friend means put their name on it, then yes, that's possible, just by editing the Strings.
April 7, 2004, 4:43 PM
Adron
As far as I know, vb1-4 can load binary data in the same format it's stored in the exe and then save it as text. vb5-6 can't, they only load text format files. So for vb5-6, you need to parse it from binary->text yourself, making a discompiler much more complex to make.
April 7, 2004, 5:50 PM
Myndfyr
[quote author=iago link=board=31;threadid=6140;start=0#msg53879 date=1081356184]
As far as I know, vb1-4 can be decompiled fully, and vb 5/6/I assume .net can't be. It can, of course, be disassembled or hex-edited, though. If by "Steal" your friend means put their name on it, then yes, that's possible, just by editing the Strings.
[/quote]

VB .NET can most definitely be decompiled; obfuscation tools are available to make it much more difficult (Dotfuscator Professional is great), but I found two quite good decompilers for free. It's a sad reality.
April 8, 2004, 2:33 AM
iago
[quote author=Myndfyre link=board=31;threadid=6140;start=0#msg53953 date=1081391601]
[quote author=iago link=board=31;threadid=6140;start=0#msg53879 date=1081356184]
As far as I know, vb1-4 can be decompiled fully, and vb 5/6/I assume .net can't be. It can, of course, be disassembled or hex-edited, though. If by "Steal" your friend means put their name on it, then yes, that's possible, just by editing the Strings.
[/quote]

VB .NET can most definitely be decompiled; obfuscation tools are available to make it much more difficult (Dotfuscator Professional is great), but I found two quite good decompilers for free. It's a sad reality.
[/quote]

Ah, reminds me of Blizzard, breaks their fixes in new versions :)

Just to make sure we're clear, you mean decompiler != disassembler, right? And how well is it decompiled, are variable names retained?

I actually find it kind of funny that Java comes with a tool to decompile it, javap :)
April 8, 2004, 4:48 PM
K
I dont remember whether or not variable names are preserved (I think they might be), but it's not really as big an issue as you think. Dotfuscator can turn code like this:

[code]
Car c = new Car(EngineType.Diesel);
c.FillUp(DollarsLeft);
while(c.GasLeft())
{
c.Go();
}
[/code]

into:
[code]
a a = new a(b.a);
a.a(b);
while(a.a())
{
a.a();
}
[/code]

by overloading names based on return types as well as function arguments.

Edit: Iago, .NET also comes with a disassembler: ildasm.exe. It's not really that suprising considering they're both compiled to byte code.
April 10, 2004, 1:07 AM
Adron
Sounds like dotfuscator makes code inefficient, and sounds like reversing dotfuscated code just requires making a list of what changes they can do and reverse them. Just look at anywhere you see a lot of overloading and fix that... ;)
April 10, 2004, 10:50 AM
St0rm.iD
Inefficient? Not really...maybe an extra step in compilation but that's it.
April 10, 2004, 1:58 PM
iago
It's really no worse than everything being stored in eax, ebx, etc.
April 10, 2004, 4:08 PM
K
[quote author=Adron link=board=31;threadid=6140;start=15#msg54365 date=1081594254]
Sounds like dotfuscator makes code inefficient, and sounds like reversing dotfuscated code just requires making a list of what changes they can do and reverse them. Just look at anywhere you see a lot of overloading and fix that... ;)
[/quote]

You could try that, but you still wouldn't have the originial function names. I'm not saying its secure, but for non comercial applications I think it's fine. You just have to be careful not to let it rename things that you rely on the names of; I ran into a problem with this when I accidentally allowed it to rename my CharacterClasses enumeration in a Diablo 2 character editor, when I frequently used the string representation of the enumeration value as a display. "Character class: ÿ" doesn't convey information too well.
April 10, 2004, 7:17 PM
iago
You have no need for an obfuscator if you write open source code. That's my solution :)
April 10, 2004, 7:51 PM
St0rm.iD
No matter what anyone says, you won't make money :)
April 10, 2004, 9:38 PM
iago
[quote author=St0rm.iD link=board=31;threadid=6140;start=15#msg54450 date=1081633092]
No matter what anyone says, you won't make money :)
[/quote]

What, off opensource or closedsource? I'm not sure whether you're making fun of opensource or vb or what.

In defense of opensource, it's great for personal projects but I can see how it would be a problem with commercial projects.
April 10, 2004, 10:21 PM
Adron
[quote author=St0rm.iD link=board=31;threadid=6140;start=15#msg54371 date=1081605492]
Inefficient? Not really...maybe an extra step in compilation but that's it.
[/quote]

It obviously changes the program when represented as .net bytecode, adding new classes and more code. Are you saying that all of its changes can be optimized away when generating the machine-specific representation?
April 11, 2004, 12:29 AM
Adron
[quote author=K link=board=31;threadid=6140;start=15#msg54425 date=1081624656]
You could try that, but you still wouldn't have the originial function names. I'm not saying its secure, but for non comercial applications I think it's fine.[/quote]

Ah, I didn't know .net stored the original function names in its compiled form. I had assumed any non-exported function/variable names were gone already.
April 11, 2004, 12:30 AM
hismajesty
I beleive you can ask Microsoft to do it, for a fee.
April 11, 2004, 12:33 AM
Networks
Wow after searching about a day straight for the reverse engineering and searching through many other boards I have concluded that their some decompilers but they aren't as great as you may think. There are 1 - 2 that are ever remotely decent one called VB RezQ but you must buy it for the full version and this will not show you functions of any sort and its really not what you want unless you truly want help to get your program back.

My Conclusion:
There aren't any REAL VB6 decompilers but there things that will help you if you need to find a properties of one of your controls.

Basically you won't find anything that'll be even close to the source in vb6 so don't waste your time since I have.
April 15, 2004, 2:10 PM

Search