[Release-CodeSnippet] Patch to attackspeed hack

03/12/2010 21:39 rhotar#1
Inspired and based on the job done by MegaByte and Iktov i decided to make a small proggy that can easily be converted to a function in autoit to apply a patch to the code that prevents to use the attackspeed hack.

Quote:
#include "NomadMemory.au3"
#Include <String.au3>
#RequireAdmin

Global $SkillByte1_adr =0x0048F3EA
Global $SkillByte2_adr=0x0048F3EB
Global $MeleeByte1_adr=0x0048EA8A
Global $MeleeByte2_adr=0x0048EA8B
Global $ProcessID


$ProcessID=WinGetProcess("TwelveSky2")

;~ if we got a valid handle to the client process,we proceed
if $ProcessID > 0 Then
$Mem_Open = _MemoryOpen($ProcessID)
if not @Error then
$check = _MemoryRead($SkillByte2_adr, $Mem_Open,'byte')
if not @Error > 0 then
;~ 0x90 or plainly 90 is the opcode for NOP, we test or check if the process memory has been modified already
if Hex($check,2) <> 0x90 Then
;~ we apply the patch to the code of the running process
_MemoryWrite($SkillByte2_adr,$Mem_Open,144,'byte')
_MemoryWrite($SkillByte1_adr,$Mem_Open,144,'byte')
_MemoryWrite($MeleeByte1_adr,$Mem_Open,144,'byte')
_MemoryWrite($MeleeByte2_adr,$Mem_Open,144,'byte')
Else
;~ the patch was already applied so we dont do anything
EndIf
_MemoryClose($Mem_Open)
EndIf
Else
MsgBox(0,"","Error en memoryread :"&@Error)
EndIf

Else
MsgBox(0,"","Error en memoryopen :"&@Error)
EndIf
Note: the addresses are taken from this post:[Only registered and activated users can see links. Click Here To Register...] so the kudos-thx should be directed to the authors of that post.

-This patch or modification must be aplied everytime the game client runs since it only modifies the process in memory and not the executable file itself, so for those who are currently developing a trainer or a bot you should consider to include this program or function into your own project.
03/12/2010 22:35 Iktov#2
Speedhack bypass is 100% Megabytes work. I fell asleep while he was working on it.
03/13/2010 05:08 Mega Byte#3
lol thanks for the reference to origional creator :)