Also TMKtoVB 2.0 benutze ich und da ist folgende auswertung:
[code=VB]
Dim caveaddr = &H00400348
Dim origaddr = &H007CE3E1
RemoveProtection (ProcName, caveaddr, 32)
Dim cavebytes() As Byte = {&H3D, &HD4, &HFF, &HAF, &H01, &HC7, &H80, &H84, &H01, &H00, &H00, &H01, &H00, &H00, &H00, &H29, &H98, &H84, &H01, &H00, &H00, &HE9, &H85, &HE0, &H3C, &H00, &HE9, &H62, &H1F, &HC3, &HFF, &H90}
Dim origbytes() As Byte = {&H29, &H98, &H84, &H01, &H00, &H00}
autopatcher (caveaddr,cavebytes)
autopatcher (origaddr,origbytes)
[/code]
In VB sieht es so aus:
[code=VB]
#Region "OneHitKill"
Private Sub Timer6_Tick(sender As System.Object, e As System.EventArgs) Handles Timer6.Tick
'OneHitKill.
If GetAsyncKeyState(VK_NUMPAD3) Then
GetProcessId(ProcName)
If OneHitKill = 0 Then
Dim caveaddr = &H400348
RemoveProtection(ProcName, caveaddr, 32)
Dim cavebytes() As Byte = {&H3D, &HD4, &HFF, &HAF, &H1, &HC7, &H80, &H84, &H1, &H0, &H0, &H1, &H0, &H0, &H0, &H29, &H98, &H84, &H1, &H0, &H0, &HE9, &H85, &HE0, &H3C, &H0, &HE9, &H62, &H1F, &HC3, &HFF, &H90}
autopatcher(caveaddr, cavebytes)
OneHitKill = 1
ElseIf OneHitKill = 1 Then
Dim origaddr = &H7CE3E1
Dim origbytes() As Byte = {&H29, &H98, &H84, &H1, &H0, &H0}
autopatcher(origaddr, origbytes)
OneHitKill = 0
End If
End If
End Sub
#End Region
[/code]
Poke:
[code=VB]
Dim caveaddr = &H00400348
Dim origaddr = &H007CE3E1
RemoveProtection (ProcName, caveaddr, 32)
Dim cavebytes() As Byte = {&H3D, &HD4, &HFF, &HAF, &H01, &HC7, &H80, &H84, &H01, &H00, &H00, &H01, &H00, &H00, &H00, &H29, &H98, &H84, &H01, &H00, &H00, &HE9, &H85, &HE0, &H3C, &H00, &HE9, &H62, &H1F, &HC3, &HFF, &H90}
Dim origbytes() As Byte = {&H29, &H98, &H84, &H01, &H00, &H00}
autopatcher (caveaddr,cavebytes)
autopatcher (origaddr,origbytes)
[/code]
In VB sieht es so aus:
[code=VB]
#Region "OneHitKill"
Private Sub Timer6_Tick(sender As System.Object, e As System.EventArgs) Handles Timer6.Tick
'OneHitKill.
If GetAsyncKeyState(VK_NUMPAD3) Then
GetProcessId(ProcName)
If OneHitKill = 0 Then
Dim caveaddr = &H400348
RemoveProtection(ProcName, caveaddr, 32)
Dim cavebytes() As Byte = {&H3D, &HD4, &HFF, &HAF, &H1, &HC7, &H80, &H84, &H1, &H0, &H0, &H1, &H0, &H0, &H0, &H29, &H98, &H84, &H1, &H0, &H0, &HE9, &H85, &HE0, &H3C, &H0, &HE9, &H62, &H1F, &HC3, &HFF, &H90}
autopatcher(caveaddr, cavebytes)
OneHitKill = 1
ElseIf OneHitKill = 1 Then
Dim origaddr = &H7CE3E1
Dim origbytes() As Byte = {&H29, &H98, &H84, &H1, &H0, &H0}
autopatcher(origaddr, origbytes)
OneHitKill = 0
End If
End If
End Sub
#End Region
[/code]
Poke:
Code:
|
Wenn ich den Trainer starte passiert nichts, außer das nur On oder Off zu hören ist. Beim CheatEngine - Memory Viewer sehe ich auch, das da nichts passiert.
Mach ich es aber über Cheat Engine, wird in &H400348 der Code geschrieben und die Adresse &H7CE3E1 führt den jmp aus. Mach ich es aus, dann ist in der Adresse &H7CE3E1 der Orginal Code drin. Nur über den VB TRainer passiert nichts und das Spiel stürzt auch nicht ab.