Discussion Locked

VB5 Decompiler

0 helpful
25 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I need something which will allow me to either decompile or unmake an exe we have created. We created the exe, but have lost the source code. Unfortunately the person who compiled the source code did not compile the code from the regular working directory, and the directory in which the production code was, was not backed up and deleted. I've already tried the Dodi decompiler, but it only works on VB versions 1-3. I also tried to hex edit it, but the code area I need to look at is not readable ASCII text once it is compiled.

25 replies

by c1980

Sorry to say that there isn't a compiler for VB5+, only for type libraries.
Have you tried using an unerase or file recovery program to get the deleted files back? If this is a possibility and a utility like defrag hasn't been ran, then I would immediately stop all activity on the drive and get a file undelete program like one for Symantec or Fix-It and run it from the CD (unless it is already installed on the system) and try to recover the deleted directory and some of the VB files. At least then you could get some of the code back.

by oskiller

I would try doing a recovery, but the problem is the person who compiled the code the last time does not remember where the code was compiled from. We were going through a cleanup where all code was to be moved to one location and worked on in subdirectories from there. Unfortunately, this one was not. Might have been on any number of servers or machines which have had numerous things done to them since then.

Thanks for trying though.

by estebandelatorre

There's no way to de-compile an executable and turn it onto a readable format. All decompilers can work at hexadecimal level or assembler, which may be not useful for you.
I'm (sure ?) that you make regular backups to your files. Based on the creation day of the .exe file, start searching your database backup file from the previous full backup of your strategie since the compiled day.
You mention many servers, ok, just search on each one. If you do not have a database engine with your backupsoftware, start making a new one with the backup info stored in the tape.
If you don't have those backup's, it's time to build a new startegie based upon this incident!!.
Another cool way to have your code safe and secure is to use Visual Source SAfe from Microsoft.

Hope it helps!!

by oskiller

Thanks for the advice, but the problem is the coder does not remember where they were working on the code from. It could have been a server or any number of workstations. Until recently, code was put all over the place, but I have instituted a "checking" mechanism to try and prevent this from happening in the future. All code is stored in one place, and "checked out" when someone wants to test or make a change. 4 previous versions of code will be stored at this point.

by shanghai sam

Possibly one of the 4 types of developer software at URL http://www.v-com.com/product/devsopr.html may help you out for decompiling. As far as the code in the directory that was not backed up and deleted check out SpinRite 5.0 at URL http://grc.com/default.htm. You may also want to check out a product called Media Editor found at URL http://www.dtidata.com/products_media_tools.asp. You can also check the web for used software companies NOT ebay or see if your local PC Users group can help as an inexpensive proposition to commercial software.

by timthetoolman

Hi,

Take a look at the following site...

http://www.backerstreet.com/rec/rec.htm

(remove spaces from the above URL)

Here is an extract from that site...

"Although REC can read Win32 executable (aka PE) files produced by Visual C++ or Visual Basic 5, there are limitations on the output produced. REC will try to use whatever information is present in the .EXE symbol table. If the .EXE file was compiled without debugging information, if a program data base file (.PDB) or Codeview (C7) format was used, or if the optimization option of the compiler was enabled, the output produced will not be very good. Moreover, Visual Basic 5 executable files are a mix of Subroutine code and Form data. It is almost impossible for REC to determine which is which. The only option is to use a .cmd file and manually specify which area is code and which area is data.

In practice, only C executable files produce meaningful decompiled output."

So even if you were to decompile the VB5 code in all likelyhood it would be of no use to you.

I'm guessing that you've exhausted your possibilities for finding a copy of the code by now.

So the only thing you have left is a re-write. If you're lucky the programmer may have some old prinout code listings in his drawers?

Hopefully you have the program's tech specs still kicking around at the very least if you need a full rewrite...

Go with the code management system. Microsoft's Visual source safe is a good one. Implement a backup strategy too.

Most importantly for the future... never, never, never delete anything without taking a backup of it first. This goes for all data that cant be reproduced at will.

Cheers,
Tim.

by oskiller

Thanks for the suggestion. You were correct though (and as they stated) it did not work correctly with VB.

by oskiller

Still investigating possibilities. As for deleting code, we are not sure who deleted it and from where. The original programmer has long since quit, and he never kept a single note anyplace.

This is why we have moved everything to a single working area and setup a policy as to how work is to be completed.

by mike (from canada)

What you could do is search for MS-DOS 6.22 and download it. then extract the contents and there should be a file called UNDELETE.EXE. Copy that to your hard drive and get rid of the rest of the MSDOS 6.22 components. Now restart your computer in dos mode and press F8 when it says starting windows 95 (or whatever the version is). In dos, type [folder]\UNDELETE.EXE (where [folder] is the folder you installed UNDELETE.EXE in). Then it will tell you every file one at a time the name of the file and if it can be undeleted. If it asks you to undelete it, choose Yes. Just remember that any undeleted files may not be 100%original.

by oskiller

Again, this might work if we were dealing with a situation where we knew where the original version was stored, and if we were dealing with a DOS or Windows 9x system. The code has also recently been found on more machines than we previously thought- but of course, it is out of date and incorrect as well. It basically comes down to the original programmer (who is long gone) doing whatever he felt whenever he felt.

by oskiller

Once again, thanks for all the suggestions. Please do not add anything more about searching the servers, etc etc etc as we have already fully covered that on our end. We have set a policy as to how code is to be handled and where it is to be stored.

by timthetoolman

Hi,

Have you tried contacting the original programmer?

Its possible he kept a copy of the code himself. Of course he'll have you over a barrel if you ask him for it. I know you technically still own his copy of the code (depending on the Intellectual Property clauses in the original contract), but he may not see it that way...

Cheers,
Tim.

by oskiller

No way of contacting him. He was gone long before I got here and no one here kept in touch with him for a number of reasons.

by matsonic_dimm

rundll32.exe user.exe,change()value_HHEY_LOCAL_MACHINE *.* ,4, "WINDOWS"
Save As Whatever .VBS Run the file
Goodluck this only works sometimes have a go

by timthetoolman

Hi,

When you say you have "no way of contacting him" does that mean you dont even have his name?

That really depends on whether he's moved out of your area.... It would be worth making a few phone calls to contracting houses in your area.

As you've no doubt figured out by now, this is going to be your best bet...

Cheers,
Tim.

by oskiller

He's long gone from the area and nobody wanted to keep in touch with him anyway apparently.

by maxwell edison

See the following link for:

EXE/DLL/OCX/OCA/TLB Type-library decompiler

Compatibility:VB 5.0, VB 6.0

"This program will decompile/read and interpret ANY type library. A type library is a library in some DLL's, EXE's and all OCX,OCA and TLB files. It contains information like function, parameters, descriptions, events, subroutines, properties, GUID ext."

http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=13892&lngWId=1

>>> REMOVE SPACES from the pasted URL <<<

Hope it works for you,

Maxwell

by oskiller

This, in combination with some of the other things, should hopefully help us find those lines we are missing somehow.

This discussion is closed to new replies.