View previous topic :: View next topic |
Author |
Message |
finalsin How do I cheat? Reputation: 0
Joined: 21 Feb 2014 Posts: 3
|
Posted: Fri Feb 21, 2014 6:57 pm Post subject: Quick help with understanding how a script works |
|
|
I've recently started to get interested in wirting cheat engine scripts, and going through more videos and tutorials than i care to count, i cant figure out how whoever wrote this script made it work
Code: | [ENABLE]
label(damage)
registersymbol(damage)
aobscan(damage_address,96 09 00 06 00 00 00 00 00 00 00 00 87 01 00 02 17 96 02)
damage_address:
damage:
db 96 09 00 06 00 00 24 40 00 00 00 00 87 01 00 02 17 96 02
[DISABLE]
damage:
db 96 09 00 06 00 00 00 00 00 00 00 00 87 01 00 02 17 96 02
unregistersymbol(damage)
|
This is a script for the binding of issac that changes your max damage to 10. i understand what each line does, but my problem is how the writer of this script changed the original aobscan into "db 96 09 00 06 00 00 24 40 00 00 00 00 87 01 00 02 17 96 02" line
Can someone explain what he did? becuase right now im going under the assumption he just randomly spouted numbers and somehow it worked
|
|
Back to top |
|
|
++METHOS I post too much Reputation: 92
Joined: 29 Oct 2010 Posts: 4197
|
Posted: Fri Feb 21, 2014 7:34 pm Post subject: |
|
|
It's all hex. He searched for these bytes:
96 09 00 06 00 00 00 00 00 00 00 00 87 01 00 02 17 96 02
and then just changed them:
96 09 00 06 00 00 24 40 00 00 00 00 87 01 00 02 17 96 02
|
|
Back to top |
|
|
finalsin How do I cheat? Reputation: 0
Joined: 21 Feb 2014 Posts: 3
|
Posted: Fri Feb 21, 2014 7:43 pm Post subject: |
|
|
Yes, but how did he know to change those 2 bytes and not any of the other ones?
|
|
Back to top |
|
|
++METHOS I post too much Reputation: 92
Joined: 29 Oct 2010 Posts: 4197
|
Posted: Fri Feb 21, 2014 7:49 pm Post subject: |
|
|
It's probably a value for something. He found the address that holds that value, first, by searching for the value. When he found the address, he browsed the hex viewer and determined that the surrounding values were static and could be used for his aobscan. Knowing which values to change at that point is easy.
|
|
Back to top |
|
|
STN I post too much Reputation: 42
Joined: 09 Nov 2005 Posts: 2672
|
Posted: Fri Feb 21, 2014 10:15 pm Post subject: |
|
|
finalsin wrote: | Yes, but how did he know to change those 2 bytes and not any of the other ones? |
This is not a good script by the way, the chance of that many values to be static across many computers is pretty nil considering it is DMA unless the address itself was static to begin with also if max damage was ever to change (upgrades etc.) the aob would not work.
But anyway, its like ++METHOS said. Let me explain it to you easy, go ahead load up your favorite game search ammo or whatever easy value you can find then copy the address. Go to memory viewer, in the hex viewer just copy a bunch of bytes starting from your ammo address, that is your aob.
Change your ammo and notice the hex next to your ammo address turn red and then change, if you notice the hex in memory viewer corresponds to the amount of ammo you change. So just note the hex and that is what your enable and disable script is. It is basically the hex value of your desired ammo value in decimal.
This is what he did, however what he saw could be completely different than what we can assume (without the game to play with), 24 40 (4024 due to little endian) doesn't equal 10 unless 4024h is 10 max damage in game.
By the way, to understand aob better and how instruction and its bytes work, read this tutorial i wrote few years back
http://deviatedhacking.com/index.php/topic/197-how-to-update-your-trainers-real-quick-and-easy/
Its about updating trainers but the same concept applies as aob(instruction bytes) are used and i made it pretty easy to understand. You will actually understand what aob is (the actual term for this is signature/bytes scanning)
_________________
|
|
Back to top |
|
|
|