• Amused
  • Angry
  • Annoyed
  • Awesome
  • Bemused
  • Cocky
  • Cool
  • Crazy
  • Crying
  • Down
  • Drunk
  • Embarrased
  • Enraged
  • Friendly
  • Geeky
  • Godly
  • Happy
  • Hateful
  • Hungry
  • Innocent
  • Meh
  • Piratey
  • Poorly
  • Sad
  • Secret
  • Shy
  • Sneaky
  • Tired
  • Wtf
  • At Work
  • CodenzHub
  • Coding
  • Deejaying
  • Donating
  • Drinking
  • Eating
  • Editing
  • Hacking
  • Hate Mailing
  • Jamin'
  • Lagging
  • Live Streaming
  • Lurking
  • No Status
  • Pawning
  • PC Gaming
  • PS Gaming
  • Raging
  • Reversing
  • Sleeping
  • Steam Gaming
  • Trolling
  • TwitchStreamer
  • Vodka!
  • Watching TV/Movie
  • Xbox Gaming
  • Youtuber
  • Zombies
  • Results 1 to 8 of 8
    1. #1
      Newbie
      Hacking - Newbie
       
      Friendly
       
      Vultrax's Avatar
      Join Date
      Jun 2013
      Location
      Germany
      Posts
      23
      Thanks (-->)
      8
      Thanks (<--)
      0

      Disable Hack function?

      John Kittz
      Hello

      I'm a newbie in Gamehacking and want do know how to disable functions.

      I can NOP a adress with:
      [PHP]'Unlimited Ammo
      WriteNOPs("Game", &H11F4D3K, NOPNum:=3)[/PHP]

      but this is only to enable the function not to disable it.

      How can i restore the adresse, that the function is disable?




      (Sorry for my bad English )



      ReadWriteMemory.vb - Module:
      [PHP]Module ReadWritingMemory
      Private Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Integer, ByVal bInheritHandle As Integer, ByVal dwProcessId As Integer) As Integer

      Private Declare Function WriteProcessMemory1 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 WriteProcessMemory2 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 Single
      Private Declare Function WriteProcessMemory3 Lib "kernel32" Alias "WriteProcessMemory" (ByVal hProcess As Integer, ByVal lpBaseAddress As Integer, ByRef lpBuffer As Long, ByVal nSize As Integer, ByRef lpNumberOfBytesWritten As Integer) As Long

      Private Declare Function ReadProcessMemory1 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 ReadProcessMemory2 Lib "kernel32" Alias "ReadProcessMemory" (ByVal hProcess As Integer, ByVal lpBaseAddress As Integer, ByRef lpBuffer As Single, ByVal nSize As Integer, ByRef lpNumberOfBytesWritten As Integer) As Single
      Private Declare Function ReadProcessMemory3 Lib "kernel32" Alias "ReadProcessMemory" (ByVal hProcess As Integer, ByVal lpBaseAddress As Integer, ByRef lpBuffer As Long, ByVal nSize As Integer, ByRef lpNumberOfBytesWritten As Integer) As Long

      Const PROCESS_ALL_ACCESS = &H1F0FF

      Public Function WriteDMAInteger(ByVal Process As String, ByVal Address As Integer, ByVal Offsets As Integer(), ByVal Value As Integer, ByVal Level As Integer, Optional ByVal nsize As Integer = 4) As Boolean
      Try
      Dim lvl As Integer = Address
      For i As Integer = 1 To Level
      lvl = ReadInteger(Process, lvl, nsize) + Offsets(i - 1)
      Next
      WriteInteger(Process, lvl, Value, nsize)
      Return True
      Catch ex As Exception
      Return False
      End Try
      End Function

      Public Function ReadDMAInteger(ByVal Process As String, ByVal Address As Integer, ByVal Offsets As Integer(), ByVal Level As Integer, Optional ByVal nsize As Integer = 4) As Integer
      Try
      Dim lvl As Integer = Address
      For i As Integer = 1 To Level
      lvl = ReadInteger(Process, lvl, nsize) + Offsets(i - 1)
      Next
      Dim vBuffer As Integer
      vBuffer = ReadInteger(Process, lvl, nsize)
      Return vBuffer
      Catch ex As Exception

      End Try
      End Function

      Public Function WriteDMAFloat(ByVal Process As String, ByVal Address As Integer, ByVal Offsets As Integer(), ByVal Value As Single, ByVal Level As Integer, Optional ByVal nsize As Integer = 4) As Boolean
      Try
      Dim lvl As Integer = Address
      For i As Integer = 1 To Level
      lvl = ReadFloat(Process, lvl, nsize) + Offsets(i - 1)
      Next
      WriteFloat(Process, lvl, Value, nsize)
      Return True
      Catch ex As Exception
      Return False
      End Try
      End Function

      Public Function ReadDMAFloat(ByVal Process As String, ByVal Address As Integer, ByVal Offsets As Integer(), ByVal Level As Integer, Optional ByVal nsize As Integer = 4) As Single
      Try
      Dim lvl As Integer = Address
      For i As Integer = 1 To Level
      lvl = ReadFloat(Process, lvl, nsize) + Offsets(i - 1)
      Next
      Dim vBuffer As Single
      vBuffer = ReadFloat(Process, lvl, nsize)
      Return vBuffer
      Catch ex As Exception

      End Try
      End Function

      Public Function WriteDMALong(ByVal Process As String, ByVal Address As Integer, ByVal Offsets As Integer(), ByVal Value As Long, ByVal Level As Integer, Optional ByVal nsize As Integer = 4) As Boolean
      Try
      Dim lvl As Integer = Address
      For i As Integer = 1 To Level
      lvl = ReadLong(Process, lvl, nsize) + Offsets(i - 1)
      Next
      WriteLong(Process, lvl, Value, nsize)
      Return True
      Catch ex As Exception
      Return False
      End Try
      End Function

      Public Function ReadDMALong(ByVal Process As String, ByVal Address As Integer, ByVal Offsets As Integer(), ByVal Level As Integer, Optional ByVal nsize As Integer = 4) As Long
      Try
      Dim lvl As Integer = Address
      For i As Integer = 1 To Level
      lvl = ReadLong(Process, lvl, nsize) + Offsets(i - 1)
      Next
      Dim vBuffer As Long
      vBuffer = ReadLong(Process, lvl, nsize)
      Return vBuffer
      Catch ex As Exception

      End Try
      End Function

      Public Sub WriteNOPs(ByVal ProcessName As String, ByVal Address As Long, ByVal NOPNum As Integer)
      Dim C As Integer
      Dim B As Integer
      If ProcessName.EndsWith(".exe") Then
      ProcessName = ProcessName.Replace(".exe", "")
      End If
      Dim MyP As Process() = Process.GetProcessesByName(ProcessName)
      If MyP.Length = 0 Then
      Exit Sub
      End If
      Dim hProcess As IntPtr = OpenProcess(PROCESS_ALL_ACCESS, 0, MyP(0).Id)
      If hProcess = IntPtr.Zero Then
      Exit Sub
      End If

      B = 0
      For C = 1 To NOPNum
      Call WriteProcessMemory1(hProcess, Address + B, &H90, 1, 0&)
      B = B + 1
      Next C
      End Sub

      Public Sub WriteXBytes(ByVal ProcessName As String, ByVal Address As Long, ByVal Value As String)
      If ProcessName.EndsWith(".exe") Then
      ProcessName = ProcessName.Replace(".exe", "")
      End If
      Dim MyP As Process() = Process.GetProcessesByName(ProcessName)
      If MyP.Length = 0 Then
      Exit Sub
      End If
      Dim hProcess As IntPtr = OpenProcess(PROCESS_ALL_ACCESS, 0, MyP(0).Id)
      If hProcess = IntPtr.Zero Then
      Exit Sub
      End If

      Dim C As Integer
      Dim B As Integer
      Dim D As Integer
      Dim V As Byte

      B = 0
      D = 1
      For C = 1 To Math.Round((Len(Value) / 2))
      V = Val("&H" & Mid$(Value, D, 2))
      Call WriteProcessMemory1(hProcess, Address + B, V, 1, 0&)
      B = B + 1
      D = D + 2
      Next C

      End Sub

      Public Sub WriteInteger(ByVal ProcessName As String, ByVal Address As Integer, ByVal Value As Integer, Optional ByVal nsize As Integer = 4)
      If ProcessName.EndsWith(".exe") Then
      ProcessName = ProcessName.Replace(".exe", "")
      End If
      Dim MyP As Process() = Process.GetProcessesByName(ProcessName)
      If MyP.Length = 0 Then
      Exit Sub
      End If
      Dim hProcess As IntPtr = OpenProcess(PROCESS_ALL_ACCESS, 0, MyP(0).Id)
      If hProcess = IntPtr.Zero Then
      Exit Sub
      End If

      Dim hAddress, vBuffer As Integer
      hAddress = Address
      vBuffer = Value
      WriteProcessMemory1(hProcess, hAddress, CInt(vBuffer), nsize, 0)
      End Sub

      Public Sub WriteFloat(ByVal ProcessName As String, ByVal Address As Integer, ByVal Value As Single, Optional ByVal nsize As Integer = 4)
      If ProcessName.EndsWith(".exe") Then
      ProcessName = ProcessName.Replace(".exe", "")
      End If
      Dim MyP As Process() = Process.GetProcessesByName(ProcessName)
      If MyP.Length = 0 Then
      Exit Sub
      End If
      Dim hProcess As IntPtr = OpenProcess(PROCESS_ALL_ACCESS, 0, MyP(0).Id)
      If hProcess = IntPtr.Zero Then
      Exit Sub
      End If

      Dim hAddress As Integer
      Dim vBuffer As Single

      hAddress = Address
      vBuffer = Value
      WriteProcessMemory2(hProcess, hAddress, vBuffer, nsize, 0)
      End Sub

      Public Sub WriteLong(ByVal ProcessName As String, ByVal Address As Integer, ByVal Value As Long, Optional ByVal nsize As Integer = 4)
      If ProcessName.EndsWith(".exe") Then
      ProcessName = ProcessName.Replace(".exe", "")
      End If
      Dim MyP As Process() = Process.GetProcessesByName(ProcessName)
      If MyP.Length = 0 Then
      Exit Sub
      End If
      Dim hProcess As IntPtr = OpenProcess(PROCESS_ALL_ACCESS, 0, MyP(0).Id)
      If hProcess = IntPtr.Zero Then
      Exit Sub
      End If

      Dim hAddress As Integer
      Dim vBuffer As Long

      hAddress = Address
      vBuffer = Value
      WriteProcessMemory3(hProcess, hAddress, vBuffer, nsize, 0)
      End Sub

      Public Function ReadInteger(ByVal ProcessName As String, ByVal Address As Integer, Optional ByVal nsize As Integer = 4) As Integer
      If ProcessName.EndsWith(".exe") Then
      ProcessName = ProcessName.Replace(".exe", "")
      End If
      Dim MyP As Process() = Process.GetProcessesByName(ProcessName)
      If MyP.Length = 0 Then
      Exit Function
      End If
      Dim hProcess As IntPtr = OpenProcess(PROCESS_ALL_ACCESS, 0, MyP(0).Id)
      If hProcess = IntPtr.Zero Then
      Exit Function
      End If

      Dim hAddress, vBuffer As Integer
      hAddress = Address
      ReadProcessMemory1(hProcess, hAddress, vBuffer, nsize, 0)
      Return vBuffer
      End Function

      Public Function ReadFloat(ByVal ProcessName As String, ByVal Address As Integer, Optional ByVal nsize As Integer = 4) As Single
      If ProcessName.EndsWith(".exe") Then
      ProcessName = ProcessName.Replace(".exe", "")
      End If
      Dim MyP As Process() = Process.GetProcessesByName(ProcessName)
      If MyP.Length = 0 Then
      Exit Function
      End If
      Dim hProcess As IntPtr = OpenProcess(PROCESS_ALL_ACCESS, 0, MyP(0).Id)
      If hProcess = IntPtr.Zero Then
      Exit Function
      End If

      Dim hAddress As Integer
      Dim vBuffer As Single

      hAddress = Address
      ReadProcessMemory2(hProcess, hAddress, vBuffer, nsize, 0)
      Return vBuffer
      End Function

      Public Function ReadLong(ByVal ProcessName As String, ByVal Address As Integer, Optional ByVal nsize As Integer = 4) As Long
      If ProcessName.EndsWith(".exe") Then
      ProcessName = ProcessName.Replace(".exe", "")
      End If
      Dim MyP As Process() = Process.GetProcessesByName(ProcessName)
      If MyP.Length = 0 Then
      Exit Function
      End If
      Dim hProcess As IntPtr = OpenProcess(PROCESS_ALL_ACCESS, 0, MyP(0).Id)
      If hProcess = IntPtr.Zero Then
      Exit Function
      End If

      Dim hAddress As Integer
      Dim vBuffer As Long

      hAddress = Address
      ReadProcessMemory3(hProcess, hAddress, vBuffer, nsize, 0)
      Return vBuffer
      End Function

      End Module[/PHP]
      Last edited by Vultrax; 01-25-2014 at 02:03 PM.

    2. #2
      Coder
      Newbie Noob
       
      Coding
       
      mPulse's Avatar
      Join Date
      Jun 2013
      Location
      Winland
      Posts
      107
      Thanks (-->)
      38
      Thanks (<--)
      10
      Im not sure but maybe add some key for it? When It is On and Off?

    3. #3
      Global Moderator
      give me my colorz back
      FeelsBadMan
       
      Coding
       
      till0sch's Avatar
      Join Date
      Oct 2012
      Location
      Germany.
      Posts
      1,168
      Thanks (-->)
      179
      Thanks (<--)
      340
      Just restore the original bytes, you need a function which can write bytes..

    4. Thanks Vultrax thanked for this post
    5. #4
      Newbie
      Hacking - Newbie
       
      Friendly
       
      Vultrax's Avatar
      Join Date
      Jun 2013
      Location
      Germany
      Posts
      23
      Thanks (-->)
      8
      Thanks (<--)
      0
      ReadWriteMemory have: WriteByte

      Attachment 2395

      You mean this? (and how do I use it?)
      Last edited by Vultrax; 01-25-2014 at 03:40 PM.

    6. #5
      The Angel Of Verdun
      Always More To Code!
       
      Lurking
       
      Nether's Avatar
      Join Date
      Dec 2013
      Location
      England, SW
      Posts
      299
      Thanks (-->)
      54
      Thanks (<--)
      186
      Quote Originally Posted by Vultrax View Post
      ReadWriteMemory have: WriteByte

      Attachment 2395

      You mean this? (and how do I use it?)
      you need to use a better memory class, i have released my old one here https://guidedhacking.com/showthread...0923#post20923, just need to wait for aproval.

      just use the code provided in a button.
      or check box with an if statment to turn on/off
      No Need For Anything Extravagant, Your Blood As A Present Shall Suffice.

    7. Thanks Vultrax thanked for this post
    8. #6
      Hacker
      shell toes yes
       
      Lagging
       
      squeenie's Avatar
      Join Date
      Mar 2013
      Posts
      717
      Thanks (-->)
      598
      Thanks (<--)
      221
      If you want to execute function, write original bytes.
      Otherwise, write NOPs.

    9. Thanks Vultrax thanked for this post
    10. #7
      Newbie
      Hacking - Newbie
       
      Friendly
       
      Vultrax's Avatar
      Join Date
      Jun 2013
      Location
      Germany
      Posts
      23
      Thanks (-->)
      8
      Thanks (<--)
      0
      Thanks for your help! Works perfectly!
      It helps me a lot!


      And thanks to Nether, this new Memory Class is better then what i use before

    11. #8
      The Angel Of Verdun
      Always More To Code!
       
      Lurking
       
      Nether's Avatar
      Join Date
      Dec 2013
      Location
      England, SW
      Posts
      299
      Thanks (-->)
      54
      Thanks (<--)
      186
      Cheats'n'Trainers
      Quote Originally Posted by Vultrax View Post
      Thanks for your help! Works perfectly!
      It helps me a lot!


      And thanks to Nether, this new Memory Class is better then what i use before
      Glad to help, that memory class has everything you need to make almost any hack you can think of, within game boundaries ofc enjoy
      the class could be updated much further though and cleaned alot - ill try post some small updates from time to time in the VB section but currently studying C++ so.
      Any Problems Let Me Know.
      Last edited by Nether; 01-26-2014 at 01:09 PM.
      No Need For Anything Extravagant, Your Blood As A Present Shall Suffice.

    12. Thanks Vultrax thanked for this post

    Similar Game Hacker Threads

    1. Replies: 5
      Last Post: 06-22-2015, 06:27 AM
    2. [Source Code] C# W2S function
      By motherflufferr in forum ESP - WorldToScreen - ViewMatrix
      Replies: 0
      Last Post: 12-03-2014, 12:11 PM
    3. Replies: 9
      Last Post: 04-19-2014, 05:07 PM
    4. Calling a function by address (function in another module)
      By c5 in forum Tutorials and Snippets
      Replies: 9
      Last Post: 11-05-2013, 09:27 AM
    5. How to disable object drawing?
      By BlackLine in forum Hacking Help
      Replies: 6
      Last Post: 04-11-2013, 09:37 AM

    Tags for this Thread