23.12.2012, 00:03
Das ist klar, da du mit VB auch nur die Codecave schreibst, aber nicht den Sprung vom Originalcode dorthin
Versuch das mal:
[code=VB]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
Dim origaddr = &H7CE3E1
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}
Dim origbytes() As Byte = {&HE9, &H61, &H1F, &HC3, &HFF, &H90}
autopatcher(caveaddr, cavebytes)
autopatcher(origaddr, origbytes)
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[/code]
Noch eine kurze Frage ... nimmst du für jeden Hotkey einen extra Timer?
Versuch das mal:
[code=VB]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
Dim origaddr = &H7CE3E1
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}
Dim origbytes() As Byte = {&HE9, &H61, &H1F, &HC3, &HFF, &H90}
autopatcher(caveaddr, cavebytes)
autopatcher(origaddr, origbytes)
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[/code]
Noch eine kurze Frage ... nimmst du für jeden Hotkey einen extra Timer?
ACHTUNG: Lesen gefährdet die Dummheit