Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: decompile uncompile decompiler
It is extremely difficult to extract source code back from a compiled .EXE file, and that gives our users a level of comfort with respect to thoughts about people illicitly decompiling a compiled script that is part of a commecial software product.
Real competent hackers can sometimes get glimpses of code in certain circumstances, but there is no easy way of doing it.
The going rate for decompiling a WB script seems to be in the near-ten-thousand dollar range. I would guess quantity discounts might be available.
If you're finding that you need to decompile WB EXEs, and can't find the source, this would be a good time to invest in a source code control system or at least some way of backing up your source code.
As I understand it with the Micrsoft Visual C tool "HeapWalker" and lots of knowhow and patience you can get some code to display on the screen ASSUMING your program hangs around in memory long enough to see it.
The basic idea is that you launch your compiled WB EXE from HeapWalker. It can look in memory where the script lives, so if it's still in memory, then you can look at it, and retype it. Unfortunately, HeapWalker doesn't have a cut and paste utility.
http://www.numega.com/products/sys.shtml
and lots and lots of coffee. Basically the tool can look into the memory structures and one of them has something like your source code.
ddd=IniReadPvt("Main","DebugTrace",0,"c:\wbdebug.ini") Debug(ddd)Then if there is no wbdebug file (or if the debug keyword is set to zero, then debug is off).
By adding a wbdebug.ini file and setting debug to 1 then you turn debug on for the script. Unfortunately you have to have this in the existing code for it to work.
It quite difficult to decompile an existing executable. There are a handful of people (and the NSA I think) that do this on an occasional basis. It tends to be very expensive.
if FileExist("C:\UNCOMPILE.TXT") then Debug(1)in which case you will turn debug on if a dummy file by the name of UNCOMPILE.TXT is there, and then you can copy it line by line into a file to rebuild it.
The compiled exe is named STARTNT.EXE
STARTNT /DEBUGor
STARTNT /HELPThe parameters after the exe are PARAM1, PARAM2 etc.
<.......snip.....> dbg="%param1%" if dbg=="/DEBUG" Message("STARTNT - DEBUG MODE","Startnt is running in DEBUG-Mode now !" ) Debug(@on) Endif if dbg=="/HELP" line1="/DEBUG Starts STARTNT in Debug Mode" line2="/HELP Shows this Window" line3="History" InfoLine=StrCat(line1,line2,line3) Message("STARTNT - HELP",Infoline ) Exit Endif <......snip......>
Let's say your source code is ABC.WBT.
;-----snip---- ABC.WBT SOURCE CODE ABC.WBT ;-----snip----
Article ID: W12781
Filename: Decompile a Compiled WB EXE.txt
File Created: 2004:05:25:11:54:18
Last Updated: 2004:05:25:11:54:18