Freakfrash Newbie cheater Reputation: 0
Joined: 18 Nov 2013 Posts: 11
|
Posted: Wed Jul 09, 2014 2:12 pm Post subject: Problem with my Speedhack |
|
|
Hello,
I've got some time again and learned some stuff about scripting in ASM. Well, I'm obviously new there and try to make good working scripts. Well, I actually have some problems with my newest script. It's simply said a speedhack in all directions. So if I walk backwards I'm also faster, not only by running forward...
The speedhack is working fine, but after I deactivate the script the game is going to crash.
Code: | [ENABLE]
///////////////////////
alloc(Speedhack_Y,2048) // 2k are enough
alloc(Speedhack_X,2048) // 2k are enough
///////////////////////
label(return_SpeedhackY)
label(return_SpeedhackX)
label(original_SpeedhackY)
label(original_SpeedhackX)
label(exit_SpeedhackY)
label(exit_SpeedhackX)
///////////////////////
label(forward)
label(backward)
label(left)
label(right)
///////////////////////
aobscan(Speedhack1, F3 0F 10 9F 78 08 00 00)
aobscan(Speedhack2, F3 0F 7E 87 7C 08 00 00)
label(_Speedhack1)
label(_Speedhack2)
registersymbol(_Speedhack1)
registersymbol(_Speedhack2)
///////////////////////
Speedhack_Y:
////////////////////////////////////////////////////
//Forward function will be executed now
forward:
cmp dword ptr [edi+00000878],(float)1
jnge backward
mov dword ptr [edi+00000878],(float)20
//Backward function will be executed now
backward:
cmp dword ptr [edi+00000878],(float)0
jge original_SpeedhackY
mov dword ptr [edi+00000878],(float)-20
original_SpeedhackY:
movss xmm3,[edi+00000878]
exit_SpeedhackY:
jmp return_SpeedhackY
Speedhack1:
_Speedhack1:
jmp Speedhack_Y
nop
nop
nop
return_SpeedhackY:
////////////////////////////////////////////////////
Speedhack_X:
left:
cmp dword ptr [edi+0000087C], (float)1
jnge right
mov dword ptr [edi+0000087C], (float)20
right:
cmp dword ptr [edi+0000087C], (float)-5
jge original_SpeedhackX
mov dword ptr [edi+0000087C], (float)-20
original_SpeedhackX:
movq xmm0,[edi+0000087C]
exit_SpeedhackX:
jmp return_SpeedhackX
Speedhack2:
_Speedhack2:
jmp Speedhack_X
nop
nop
nop
return_SpeedhackX:
////////////////////////////////////////////////////
[DISABLE]
dealloc(Speedhack_Y)
dealloc(Speedhack_X)
_Speedhack1:
_Speedhack2:
unregistersymbol(_Speedhack1)
unregistersymbol(_Speedhack2)
// Bytes of Movement Speed Y gets restored
db F3 0F 10 9F 78 08 00 00
// Bytes of Movement Speed X gets restored
db F3 0F 7E 87 7C 08 00 00 |
I would like to know what I exactly did wrong there. Hopefully someone can explain my problem so I can fix this annoying bug.
|
|