Gimme a second and I'll write you a function.
Create a new module:
Code:
Module Hacks
Private Declare Function OpenP Lib "kernel32" Alias "OpenProcess" (ByVal dwDesiredAccess As Integer, ByVal bInheritHandle As Integer, ByVal dwProcessId As Integer) As Integer
Private Declare Function WritePMem Lib "kernel32" Alias "WriteProcessMemory" (ByVal hProcess As Integer, ByVal lpBaseAddress As Integer, ByRef lpBuffer As Integer, ByVal nSize As Integer, ByRef lpNumberOfBytesWritten As Integer) As Integer
Private Declare Function WriteFloat Lib "kernel32" Alias "WriteProcessMemory" (ByVal hProcess As Integer, ByVal lpBaseAddress As Integer, ByRef lpBuffer As Single, ByVal nSize As Integer, ByRef lpNumberOfBytesWritten As Integer) As Integer
Private Declare Function Lib "kernel32" Alias "ReadProcessMemory" (ByVal hProcess As IntPtr, ByVal lpBaseAddress As IntPtr, ByRef buffer As Single, ByVal size As Int32, ByRef lpNumberOfBytesRead As Int32) As Boolean
Private Declare Function ReadMem Lib "kernel32" Alias "ReadProcessMemory" (ByVal hProcess As Integer, ByVal lpBaseAddress As Integer, ByRef lpBuffer As Integer, ByVal nSize As Integer, ByRef lpNumberOfBytesWritten As Integer) As Integer
Private Declare Function CloseHandle Lib "kernel32" Alias "CloseHandle" (ByVal hObject As Integer) As Integer
Public Buff1, String1 As Long
Public Buff2 As Single
Public Buff3, String2 As Integer
'WriteMemory
Private Function WriteMem (ByVal MAddress As Integer, ByVal MValue As Long, ByVal MBytes As Integer)
Dim LookUp As Process() = Process.GetProcessesByName("WarRock")
If LookUp.Length = 0 Then
End
End If
Dim PHandle As IntPtr = OpenP(&H1F0FFF, 0, LookUp(0).Id)
WritePMem(PHandle, MAddress, MValue, MBytes, Nothing)
CloseHandle(PHandle)
End Function
'WriteFloat
Private Function Float (ByVal MAddress As Integer, ByVal MValue As Single)
Dim LookUp As Process() = Process.GetProcessesByName("WarRock")
If LookUp.Length = 0 Then
End
End If
Dim PHandle As IntPtr = OpenP(&H1F0FFF, 0, LookUp(0).Id)
WriteFloat(PHandle, MAddress, MValue, 4, Nothing)
CloseHandle(PHandle)
End Function
Public function memoryh4x(ByVal address as string, ByVal value as long, ByVal bytes as integer)
string1 = readdll("cshell.dll")
string2 = "&H" & Hex(string1 + address)
Call WriteMem(string2, value, bytes)
Return Nothing
End Function
Public function floath4x(ByVal address as string, ByVal value as long)
string1 = readdll("cshell.dll")
string2 = "&H" & Hex(string1 + address)
Call Float(string2, value)
Return Nothing
End Function
End Module
Second Module:
Replace WarRock with the PROCESS NAME.
Code:
Module readdll
'readdll
Public Function readdll(ByVal modulename As String)
Dim procmodule As ProcessModule
Dim constant1 As Integer
Dim constant2 As Long
Dim constant3 As Process() = Process.GetProcessesByName("WarRock")
If constant3.Length = 0 Then
Return 0
End If
For Each procmodule In constant3(0).Modules
If modulename = procmodule.ModuleName Then
constant1 = procmodule.BaseAddress
End If
Next
constant2 = constant1
Return constant2
End Function
End Module
Now, to 'hack' it:
1/2/4/8 bytes:
memoryh4x(&H01B2C89F, 1337, 4) 'this will insert the value 1337 in the address 01B2c89f, which has 4 bytes
float:
floath4x(&H01B2C89F, 1337)