Log in

View Full Version : How to patch a VB3 exe?


Solomon
November 1st, 2001, 21:39
Decompiled it with VB3 decompiler and found the dongle checking code snippet, but how to patch a VB3 prog?

How to find the pseudo opcode of the decompiled Visual BASIC statements?

for example, here is the routine to check the dongle:

Sub Command1_Click (Index%)
Select Case Index
Case 0
Call sub04C7(2, 1) <----------------------check license
Unload Form1
inputForm.Show
Case 1
End
End Select
End Sub


Sub sub04C7 (p0326 As Integer, p0328 As Integer)
.................
If (p0328% = 0) Then Exit Sub <--------------------- no need to check dongle
................. <------------------------ dongle check here
End Sub

so I want to change "Call sub04C7(2, 1) " to "Call sub04C7(2, 0)", or change "If (p0328% = 0) Then Exit Sub" to "If (p0328% = 1) Then Exit Sub". But how to find the corresponding opcode in the exe?

Aimless
November 2nd, 2001, 09:02
Use the VB P-code debugger...

Reach the line of pcode where you want it to (in your case, the call...)

Change the display to assembly or check out the address...

Use a RVA to VA converter on the address to find out the physical offset in the file...

Modify to heart's content...

www.programmerstools.org ->Debuggers Section (if you are having trouble locating the VB Debugger...)

...Have Phun

Solomon
November 3rd, 2001, 06:19
great. I will try it. Thx aimless

JohnnyBoy
November 5th, 2001, 07:49
Cant find the debugger
I have searched thru h**p://www.programmerstools.org/
The one I found was for VB5/VB6 and was called "WKTVBDebugger". What about VB3.
I maybe stupid but I have a similar VB3 problem.

Solomon
November 5th, 2001, 07:59
I have found a essay about VB3 EXE:
http://www.woodmann.net/fravia/dukeess.htm

But have to search for M$ VB3 compiler to study the exe, which is not an easy task coz it's too old.

Unregistered
November 5th, 2001, 09:03
Hi Solomon,
Sent you an email.
regards

Solomon
November 5th, 2001, 09:50
I successfully got the compiler. Many thx

JohnnyBoy
November 6th, 2001, 06:34
Quote:
Originally posted by aimless
Use the VB P-code debugger...


Reach the line of pcode where you want it to (in your case, the call...)

Change the display to assembly or check out the address...

Use a RVA to VA converter on the address to find out the physical offset in the file...

Modify to heart's content...

www.programmerstools.org ->Debuggers Section (if you are having trouble locating the VB Debugger...)
Cant find it!
I have tried Dodis decompiler. Almost work but I get alot of errormessages. Do I have to have VB# installed to have dodi work?
If so I am interessted in where to find VB3?
(Someone have mailed it to Solomon?)

...Have Phun