View previous topic :: View next topic |
Author |
Message |
Pantsu Newbie cheater Reputation: 0
Joined: 17 Mar 2015 Posts: 23
|
Posted: Sun Jul 19, 2015 1:46 am Post subject: Help on Tutorial 6 |
|
|
Original Tutorial Thread:
http://forum.cheatengine.org/viewtopic.php?t=542093
See chapter 8: Tutorial 6
Tutorial 6 seems to be an easy thing to do for a non-programmer like me but how do I modify if I get something like this:
Code: | movq [ebx+00000440],xmm0 |
seems different compared with the example because of the "xmm0"
I don't know what that means. simply changing movq to add and adding ",2" (for example) wouldn't work.
|
|
Back to top |
|
|
Daijobu Master Cheater Reputation: 13
Joined: 05 Feb 2013 Posts: 301 Location: the Netherlands
|
Posted: Sun Jul 19, 2015 3:03 am Post subject: |
|
|
movq - move quadword (64 bits / 8 (bits per byte) = 8 bytes)
http://x86.renejeschke.de/html/file_module_x86_id_201.html
xmm0 - a SSE register which can hold 128 bits / 8 = 16 bytes.
https://en.wikibooks.org/wiki/X86_Assembly/SSE#Registers
And SSE(2) instructions:
http://softpixel.com/~cwright/programming/simd/sse2.php
As to your tutorial. I can't know what xmm0 holds. But let's assume it holds a double-precision float value (64 bits).
(Another good read: http://stackoverflow.com/questions/801117/whats-the-difference-between-a-single-precision-and-double-precision-floating-p)
We don't need to use movq since it's a SSE instruction and we're not going to use these registers right now.
We know that [ebx+440] is our target. Whatever is xmm0, is not relevant to me since I don't know what it is. We know xmm0 holds a float value, therefore we write a float value.
Take this:
Code: | mov [ebx+440],(float)1.0 |
(float)decimal.value is a CheatEngine AutoAssembler instruction. This will automatically convert the value following it to a floating point value as hexidecimal.
The regular mov instruction simply copies a value or register or register's contents to its target. In this case (base)ebx + (offset)440 = address and into this [address].
Now we've moved a float value of 1.0 into our target address. Originally the instruction moved a quadword (movq) from register xmm0 into our target and cleared the top 64 bits (quadword) from register xmm0.
We've ignored this and simply changed the instructions to fit our needs; moving a value into our target register in stead.
_________________
|
|
Back to top |
|
|
Pantsu Newbie cheater Reputation: 0
Joined: 17 Mar 2015 Posts: 23
|
Posted: Sun Jul 19, 2015 4:43 am Post subject: |
|
|
So I tried typing the code:
Code: | mov [ebx+440],(float)1.0 |
Except I changed the 1.0 into 500
I thought I'd gain 500 every time the value updates.
The only thing happened was extend the value with a lot of zeros since it is a float.
I was aiming for the experience.
example:
100/2000 - I needed 1900 more to lvl up.
when I injected mov [ebx+440],(float)500
it only became like this:
10000000/200000000 (I'm not sure about the zeros, I didn't really counted)
I really don't know anything
I thought it's that simple to change just like in the tutorial.
|
|
Back to top |
|
|
Daijobu Master Cheater Reputation: 13
Joined: 05 Feb 2013 Posts: 301 Location: the Netherlands
|
Posted: Sun Jul 19, 2015 5:32 pm Post subject: |
|
|
If that's the case you likely do not have the correct instruction. Or you do, but you need to filter it (if it's a shared instruction).
_________________
|
|
Back to top |
|
|
Pantsu Newbie cheater Reputation: 0
Joined: 17 Mar 2015 Posts: 23
|
Posted: Wed Jul 22, 2015 7:34 pm Post subject: |
|
|
Could you "guess" a code to inject that I could just copy and paste?
Something that adds an X value to it when it increase or decreases.
|
|
Back to top |
|
|
Daijobu Master Cheater Reputation: 13
Joined: 05 Feb 2013 Posts: 301 Location: the Netherlands
|
Posted: Thu Jul 23, 2015 6:28 am Post subject: |
|
|
Use a "find out what writes to this address" on the original address. Then find the instruction that adds to the value and modify that.
Should be the easiest route to take.
_________________
|
|
Back to top |
|
|
Pantsu Newbie cheater Reputation: 0
Joined: 17 Mar 2015 Posts: 23
|
Posted: Fri Jul 24, 2015 12:16 am Post subject: |
|
|
I'm not a programmer so I have no idea how to find, understand, and modify this instruction that adds to the value.
|
|
Back to top |
|
|
|