Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Decompiler, PLEASE!

Does anyone know of a Qbasic and/or Quickbasic decompiler out there? I am in the middle of troubleshooting an old custom pc-based test system at work, and all we have is the stand-alone .exe file. The guy who wrote it has been gone for years and did not properly back up his source code. I have been searching on the net for a couple of days and have found nothing, and I am desperate. Any leads will be greatly appreciated.

Thanks,

Al


Comments

  • I hate to break the news to you, but a decompiler is impossible. It is, as Tek has said, trying to make a cow out of a hamburger. It can't be done. Let me explain why. When the file is compiled, then linked, it is translated into native machine code. There is no way to extract the original code from the file, because it is not there. The code that you have is no longer in any readable language. It's in something only the computer's processor can understand, and the people that originally made how the processors work are dead, so they are of no help. The best thing you can do if you want to recover the file's code is to disassemble it. A disassembler is a powerful tool that takes a program, and translates it into Assembly language. From this language, and you have to know it very well, you can slowly begin translating the code back into it's original language. Something like:

    mov ax,0013H

    int 10H

    Translates into "Screen 13" in Qbasic, to give you some idea. Look around for some disassemblers, there are many. If it's a WIN32 Program you are working with, I highly recommend getting W32DASM - It's a disassembler/debugger for Windows 95/98/NT. Other than a disassembler, there is no other way to view the "source code" for that file. Hope it helps. You might want to consider embarking on the ASM journey, and learning the assembly language. Knowing another language like basic will help with making the transition, because you can build your project in basic, something like

    PRINT "Hello World!"

    Translates into ASM as:

    .model small

    .stack

    .data

    message db "Hello World!$"

    .code

    mov dx,OFFSET Message

    mov ax,SEG Mesage

    mov ds,ax

    mov ah,9

    int 21H

    mov ax,4c00h

    int 21H

    end

    Complicated? Not really. This code is actually better than basic! How? Well, it'll be around a 500 byte exe file, not the 16K exe file Qbasic will produce through compiling and linking. If you can't find any tutorials, click the link on bottom of page. It's www.strangecreations.com - A huge database of source code and information. Look for something called "Beginner's Guide to 80x86 assembly" - This should get you started. Hope it helps!

    VyroIngo.


    URL:http://www.strangecreations.com

  • : I hate to break the news to you, but a decompiler is impossible. It is, as Tek has said, trying to make a cow out of a hamburger.


    True, but with the right tool and some perseverence, you can figure it out.

    On another board, a similar message was posted. The answer? Use the debugger. He said (and did this successfully) something about after going back(?) enough levels you can reach something that tells you which calls were made to which library and what parameters were passed. While I haven't tried it, I would assume that someone who really wanted to, could eventually recover the source.


    : It's in something only the computer's processor can understand

    Fascinating, so you mean to tell me that the new native-code-compilers that are coming out with each version of VB have actually been around for a long time? If not, then SOMEBODY knows how to do this, because they are! And if someone can change text to native code, then they can change it back if they want to.


Sign In or Register to comment.