Ergebnis 1 bis 1 von 1
  1. #1
    Stanley Jobson Avatar von Bi0sh0k
    Registriert seit
    17.12.2007
    Beiträge
    773

    Standard Memory Hack Fehler

    Hier ist der VB6 Code:
    Code:
    Dim value As Long
    Dim Offset As Long
    Dim Adress As Long
    
    Call ReadALong("DEVIL MAY CRY 4 DX10", &H18C1E58, Adress)
    Call ReadALong("DEVIL MAY CRY 4 DX10", Adress, value)
    Offset = value + &H24
    Call ReadALong("DEVIL MAY CRY 4 DX10", Offset, value)
    Offset = value + &HCCE8
    Call WriteALong("DEVIL MAY CRY 4 DX10", Offset, 3)
    Hier das Modul:
    Code:
    Public Const PROCESS_ALL_ACCESS = &H1F0FFF
    Dim f1holder As Integer
    Dim timer_pos As Long
    'API Declaration
    Public Declare Function GetWindowThreadProcessId Lib "User32" (ByVal hWnd As Long, lpdwProcessId As Long) As Long
    Public Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As Long
    Public Declare Function WriteProcessMemory Lib "kernel32" (ByVal hProcess As Long, ByVal lpBaseAddress As Any, lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long
    Public Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long
    Public Declare Function FindWindow Lib "User32" Alias "FindWindowA" (ByVal Classname As String, ByVal WindowName As String) As Long
    Public Declare Function GetKeyPress Lib "User32" Alias "GetAsyncKeyState" (ByVal key As Long) As Integer
    Public Declare Function ReadProcessMem Lib "kernel32" Alias "ReadProcessMemory" (ByVal hProcess As Long, ByVal lpBaseAddress As Any, ByRef lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long
    Public Function WriteAByte(gamewindowtext As String, address As Long, value As Byte)
    Dim hWnd As Long
    Dim pid As Long
    Dim phandle As Long
    hWnd = FindWindow(vbNullString, gamewindowtext)
    If (hWnd = 0) Then
    frmPixelBoard.off.Visible = True
    Exit Function
    End If
    GetWindowThreadProcessId hWnd, pid
    phandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)
    If (phandle = 0) Then
    MsgBox "Can't get ProcessId", vbCritical, "Error"
    Exit Function
    End If
    WriteProcessMemory phandle, address, value, 1, 0&
    CloseHandle hProcess
    End Function
    Public Function WriteAnInt(gamewindowtext As String, address As Long, value As Integer)
    Dim hWnd As Long
    Dim pid As Long
    Dim phandle As Long
    hWnd = FindWindow(vbNullString, gamewindowtext)
    If (hWnd = 0) Then
    frmPixelBoard.off.Visible = True
    End If
    GetWindowThreadProcessId hWnd, pid
    phandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)
    If (phandle = 0) Then
    MsgBox "Can't get ProcessId", vbCritical, "Error"
    Exit Function
    End If
    WriteProcessMemory phandle, address, value, 2, 0&
    CloseHandle hProcess
    End Function
    Public Function WriteALong(gamewindowtext As String, address As Long, value As Long)
    Dim hWnd As Long
    Dim pid As Long
    Dim phandle As Long
    hWnd = FindWindow(vbNullString, gamewindowtext)
    If (hWnd = 0) Then
    frmPixelBoard.off.Visible = True
    Exit Function
    End If
    GetWindowThreadProcessId hWnd, pid
    phandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)
    If (phandle = 0) Then
    MsgBox "Can't get ProcessId", vbCritical, "Error"
    Exit Function
    End If
    WriteProcessMemory phandle, address, value, 4, 0&
    CloseHandle hProcess
    End Function
    Public Function ReadAByte(gamewindowtext As String, address As Long, valbuffer As Byte)
    Dim hWnd As Long
    Dim pid As Long
    Dim phandle As Long
    hWnd = FindWindow(vbNullString, gamewindowtext)
    If (hWnd = 0) Then
    frmPixelBoard.off.Visible = True
    Exit Function
    End If
    GetWindowThreadProcessId hWnd, pid
    phandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)
    If (phandle = 0) Then
    MsgBox "Can't get ProcessId", vbCritical, "Error"
    Exit Function
    End If
    ReadProcessMem phandle, address, valbuffer, 1, 0&
    CloseHandle hProcess
    End Function
    Public Function ReadAnInt(gamewindowtext As String, address As Long, valbuffer As Integer)
    Dim hWnd As Long
    Dim pid As Long
    Dim phandle As Long
    hWnd = FindWindow(vbNullString, gamewindowtext)
    If (hWnd = 0) Then
    frmPixelBoard.off.Visible = True
    Exit Function
    End If
    GetWindowThreadProcessId hWnd, pid
    phandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)
    If (phandle = 0) Then
    MsgBox "Can't get ProcessId", vbCritical, "Error"
    Exit Function
    End If
    ReadProcessMem phandle, address, valbuffer, 2, 0&
    CloseHandle hProcess
    End Function
    Public Function ReadALong(gamewindowtext As String, address As Long, valbuffer As Long)
    Dim hWnd As Long
    Dim pid As Long
    Dim phandle As Long
    hWnd = FindWindow(vbNullString, gamewindowtext)
    If (hWnd = 0) Then
    frmPixelBoard.off.Visible = True
    Exit Function
    End If
    GetWindowThreadProcessId hWnd, pid
    phandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)
    If (phandle = 0) Then
    MsgBox "Can't get ProcessId", vbCritical, "Error"
    Exit Function
    End If
    ReadProcessMem phandle, address, valbuffer, 4, 0&
    CloseHandle hProcess
    End Function
    Public Function ReadAFloat(gamewindowtext As String, address As Long, valbuffer As Single)
    Dim hWnd As Long
    Dim pid As Long
    Dim phandle As Long
    hWnd = FindWindow(vbNullString, gamewindowtext)
    If (hWnd = 0) Then
    frmPixelBoard.off.Visible = True
    Exit Function
    End If
    GetWindowThreadProcessId hWnd, pid
    phandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)
    If (phandle = 0) Then
    MsgBox "Can't get ProcessId", vbCritical, "Error"
    Exit Function
    End If
    ReadProcessMem phandle, address, valbuffer, 4, 0&
    CloseHandle hProcess
    End Function
    Public Function WriteAFloat(gamewindowtext As String, address As Long, value As Single)
    Dim hWnd As Long
    Dim pid As Long
    Dim phandle As Long
    hWnd = FindWindow(vbNullString, gamewindowtext)
    If (hWnd = 0) Then
    frmPixelBoard.off.Visible = True
    Exit Function
    End If
    GetWindowThreadProcessId hWnd, pid
    phandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)
    If (phandle = 0) Then
    MsgBox "Can't get ProcessId", vbCritical, "Error"
    Exit Function
    End If
    WriteProcessMemory phandle, address, value, 4, 0&
    CloseHandle hProcess
    End Function
    Hier ein Screenshot vom GameHack (Links) und CE (Rechts):


    In Ce funtz der GameHack aber nicht in meinem Programm.
    Obwohl der GameHack das gleiche rechnet, kommt er zu einem anderen Ergebnis.
    Die Zahlen im GameHack sind natürlich in dezimalsystem. Wenn ihr die im Taschenrechner von Windows eingebt und da auf Hex umstellt seht ihr die Adresse die sich hinter der Zahl verbirgt.
    Die Dezimalzahlen haben bei den anderen GameHacks keinen Fehler verursacht.
    Nach dem 2ten Offset was addiert wird, kommt 372824760 (1638DAB8) raus, es sollte aber eigentlich 372890296 (dementsprechend 1639DAB8) rauskommen. Davor die Adressen und Value´s stimmen alle. Also muss irgendetwas beim addieren beim 2ten Offset schief laufen.
    Wo könnte da der fehler liegen?

    MFG Bi0sh0k
    Geändert von Bi0sh0k (07.09.2010 um 16:59 Uhr)

    _______________________________

    GFX Showroom
    Klick mich!
    _______________________________



Ähnliche Themen

  1. Memory vom feinsten
    Von Cyber Tjak im Forum Funny Shit
    Antworten: 3
    Letzter Beitrag: 24.10.2010, 10:50
  2. Program to big to fit in memory???
    Von TheMech im Forum Windows
    Antworten: 2
    Letzter Beitrag: 04.04.2010, 18:47
  3. GTA San Andreas Memory Hack mit VB?
    Von Darti401 im Forum Games
    Antworten: 0
    Letzter Beitrag: 01.03.2010, 15:38
  4. [CSS] Hack2win.de Memory Hack v2.0b
    Von mCz1e3aD im Forum Games
    Antworten: 9
    Letzter Beitrag: 16.12.2008, 13:49
  5. [S] Css Bunnyhop memory hack
    Von Chemical im Forum Games
    Antworten: 15
    Letzter Beitrag: 18.10.2008, 21:25

Stichworte

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein
  •