 |
Cheat Engine The Official Site of Cheat Engine
|
| View previous topic :: View next topic |
| Author |
Message |
junguler How do I cheat?
Reputation: 0
Joined: 07 Jan 2015 Posts: 6
|
Posted: Wed Jan 07, 2015 7:03 am Post subject: need help writing a code injection for a double value type. |
|
|
hi,
i've been trying to write a code injection for step 4 of the tutorial, but i don't know how to do it with the double value type.
i made the float value with (float) but when i tried to make the double value with (double) it didn't work.
here is my float code:
| Code: |
define(address,"Tutorial-i386.exe"+25DF0)
define(bytes,D9 9B 94 04 00 00)
[ENABLE]
assert(address,bytes)
alloc(newmem,$1000)
label(code)
label(return)
newmem:
code:
mov [ebx+00000494],(float)5000
jmp return
address:
jmp code
nop
return:
[DISABLE]
address:
db bytes
dealloc(newmem)
|
and here's the unchanged double code which i couldn't figure out how to change.
| Code: |
define(address,"Tutorial-i386.exe"+25B9B)
define(bytes,DD 9B 98 04 00 00)
[ENABLE]
assert(address,bytes)
alloc(newmem,$1000)
label(code)
label(return)
newmem:
code:
fstp qword ptr [ebx+00000498]
jmp return
address:
jmp code
nop
return:
[DISABLE]
address:
db bytes
dealloc(newmem)
|
also if anyone can tell me how to put two or more code pointed to different memory addresses to 1 script it would be really appreciated.
|
|
| Back to top |
|
 |
mgr.inz.Player I post too much
Reputation: 222
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Wed Jan 07, 2015 7:50 am Post subject: |
|
|
First code should be:
| Code: |
define(address,"Tutorial-i386.exe"+25DF0)
define(bytes,D9 9B 94 04 00 00)
[ENABLE]
assert(address,bytes)
alloc(newmem,$1000)
label(return)
newmem:
// commented out fstp dword ptr [ebx+00000494]
// balance the FPU stack
fstp ST(0)
// update value
mov [ebx+00000494],(float)5000
jmp return
address:
jmp newmem
nop
return:
[DISABLE]
address:
db bytes
// fstp dword ptr [ebx+00000494]
dealloc(newmem)
|
(note: I'm using different AA template, but, you should understand it too)
Second code should be:
| Code: |
define(address,"Tutorial-i386.exe"+25B9B)
define(bytes,DD 9B 98 04 00 00)
[ENABLE]
assert(address,bytes)
alloc(newmem,$1000)
label(return)
label(ourDoubleValue)
newmem:
// pop value from FPU stack (top)
fstp ST(0)
// get new value
fld qword ptr [ourDoubleValue]
// update value
fstp qword ptr [ebx+00000498]
jmp return
ourDoubleValue:
dq (double)5000
address:
jmp newmem
nop
return:
[DISABLE]
address:
db bytes
// fstp qword ptr [ebx+00000498]
dealloc(newmem)
|
_________________
|
|
| Back to top |
|
 |
junguler How do I cheat?
Reputation: 0
Joined: 07 Jan 2015 Posts: 6
|
Posted: Wed Jan 07, 2015 7:59 am Post subject: |
|
|
| thanks, that really helps <3
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|