Jump to content
Tuts 4 You

Writing Patch In Vb


Pimp.exe

Recommended Posts

I had seen it asked for here and other places so I put together a .bas module for VB to create patches in VB rather easily. I had alot of code for this scattered and finally put it together. I made it as painless as possible I promise lol. Its all contained in a single sub and commented. Also comes with an example.

Hope this helps some of you...

http://rapidshare.com/files/64577808/VBOffsetModule.zip
Link to comment

try it :wub:

Option ExplicitPrivate Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function GetWindowThreadProcessId Lib "user32" (ByVal hWnd As Long, lpdwProcessId As Long) As Long
Private Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Long, ByValbInheritHandle As Long, ByVal dwProcessId As Long) As Long
Private Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long
Private Declare Function WriteProcessMemory Lib "kernel32" (ByVal hProcess As Long, ByVal lpBaseAddress As Any, ByVal lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long
Private Declare Function ReadProcessMemory Lib "kernel32" (ByVal hProcess As Long, ByVal lpBaseAddress As Any, ByVal lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As LongDim pid As Long
Dim pHandle As Long
Dim value As StringPrivate df_var(4) As StringPublic Sub Form_Initialize()
Call df_var_initialize
End SubPublic Sub df_var_initialize()
'XXXXXXXXX
df_var(1) = Chr(88) + Chr(88) + Chr(88) + Chr(88) + Chr(88) + Chr(88) + Chr(88) + Chr(88) + Chr(88)
'Program not running...
df_var(2) = Chr(80) + Chr(114) + Chr(111) + Chr(103) + Chr(114) + Chr(97) + Chr(109) + Chr(32) + Chr(110) + Chr(111) + Chr(116) + Chr(32) + Chr(114) + Chr(117) + Chr(110) + Chr(110) + Chr(105) + Chr(110) + Chr(103) + Chr(46) + Chr(46) + Chr(46)
'Program running...
df_var(3) = Chr(80) + Chr(114) + Chr(111) + Chr(103) + Chr(114) + Chr(97) + Chr(109) + Chr(32) + Chr(114) + Chr(117) + Chr(110) + Chr(110) + Chr(105) + Chr(110) + Chr(103) + Chr(46) + Chr(46) + Chr(46)
'OK,Cracked by KuNgBiM/[DCT]
df_var(4) = Chr(79) + Chr(75) + Chr(44) + Chr(67) + Chr(114) + Chr(97) + Chr(99) + Chr(107) + Chr(101) + Chr(100) + Chr(32) + Chr(98) + Chr(121) + Chr(32) + Chr(75) + Chr(117) + Chr(78) + Chr(103) + Chr(66) + Chr(105) + Chr(77) + Chr(47) + Chr(91) + Chr(68) + Chr(67) + Chr(84) + Chr(93)
End SubPrivate Sub Timer1_Timer()
Const PROCESS_ALL_ACCESS = &H1F0FFF
Const LVIF_STATE = &H8
Const STANDARD_RIGHTS_REQUIRED = &HF0000
Const SYNCHRONIZE = &H100000
Const SPECIFIC_RIGHTS_ALL = &HFFFF
Const STANDARD_RIGHTS_ALL = &H1F0000Const PROCESS_VM_OPERATION = &H8&
Const PROCESS_VM_READ = &H10&
Const PROCESS_VM_WRITE = &H20&Dim hWnd As Long
hWnd = FindWindow(vbNullString, df_var(1)) ' Program Windows CaptionIf hWnd = 0 Then
Label1.Caption = df_var(2)
Else
Label1.Caption = df_var(3)
GetWindowThreadProcessId hWnd, pid
pHandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)Dim byts(2) As Bytebyts(0) = &H90: byts(1) = &H90WriteProcessMemory pHandle, ByVal &H403F57, ByVal VarPtr(byts(0)), 2, ByVal 0CloseHandle pHandle
MsgBox df_var(4)
Unload Me
End If
End Sub
Edited by KuNgBiM
Link to comment
  • 3 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...