Page 1 of 2

AOB scan help

Posted: Thu Dec 02, 2021 10:52 am
by LocoMofo
Im a newbie btw...

So I was trying to cheat the game Defense Grid: The Awakening (EGS version) with the AOB scan cos u cant change the value with adress scan...
but there was one problem: it stored the cores and the money together so I could only change both when I set a value for it...(its not that much of a problem for this game but for others that store your hp with the enemies hp...) . Now I was trying to do the same with Grindstone and make a no dmg cheat but when I set it to add innstead of sub it des the same for the enemies. pls help if you can would really appreciate it.

example of defense grid table:

Re: AOB scan help

Posted: Thu Dec 02, 2021 6:03 pm
by Messy6666
^
It's not that's your AOB scan is faulty but they share the same code so
you have to distinct the player structure from enemy structures.

Use CE dissect and compare data / structures todo that.

I don't have that game but here's a link to a Stephen Chapman tutorial where you can see how to use it


Re: AOB scan help

Posted: Thu Dec 02, 2021 6:17 pm
by LocoMofo
thank you

Re: AOB scan help

Posted: Thu Dec 02, 2021 10:15 pm
by LocoMofo
Im experimenting with it a bit but his example is for hp but mine is for 2 different things or is it the same?
I cant figure out how to do it kinda confused.

Re: AOB scan help

Posted: Thu Dec 02, 2021 10:49 pm
by LeFiXER
LocoMofo wrote:
Thu Dec 02, 2021 10:15 pm
Im experimenting with it a bit but his example is for hp but mine is for 2 different things or is it the same?
I cant figure out how to do it kinda confused.
What can't you figure out?

Re: AOB scan help

Posted: Thu Dec 02, 2021 10:56 pm
by LocoMofo
LeFiXER wrote:
Thu Dec 02, 2021 10:49 pm
LocoMofo wrote:
Thu Dec 02, 2021 10:15 pm
Im experimenting with it a bit but his example is for hp but mine is for 2 different things or is it the same?
I cant figure out how to do it kinda confused.
What can't you figure out?
he compares his hp to the enemy hp but my case is not the same its way different and he said (7:51) that I have to figure out another way.. and I dont know tha way

Re: AOB scan help

Posted: Thu Dec 02, 2021 11:02 pm
by LocoMofo
when I go to find out what address accesses this instruction I get like 8 results 2 are for the cores and 2 are for money the rest idk

Re: AOB scan help

Posted: Thu Dec 02, 2021 11:03 pm
by LocoMofo
here is a screenshot

Re: AOB scan help

Posted: Thu Dec 02, 2021 11:04 pm
by LocoMofo
no idea how to apply it like shown in the video

Re: AOB scan help

Posted: Thu Dec 02, 2021 11:11 pm
by LocoMofo
should I use all 4 on in the structure dissect?

Re: AOB scan help

Posted: Fri Dec 03, 2021 4:48 am
by Messy6666
^ oh i was refering to this part of your message:
LocoMofo wrote:
Thu Dec 02, 2021 10:52 am
Now I was trying to do the same with Grindstone and make a no dmg cheat but when I set it to add innstead of sub it des the same for the enemies. pls help if you can would really appreciate it.
Your case in defense grid looks a bit different but you can apply the same logic:

Code: Select all

code:
  movss [eax+14],xmm0
1. put a breakpoint on that instruction
2. dissect the base address ( EAX ) for when it's writing resources
3. add the base address ( EAX ) into a new group for when it's writing cores
4. compare the 2 structures and try to find something unique in them that you can use in your code to make the difference between the 2

edit:
turns out i had that game in my lib (was free once)

Image

Re: AOB scan help

Posted: Fri Dec 03, 2021 3:01 pm
by LocoMofo
thanks man really appreciate it.

but I have 2 more things to ask so I can understand it better:

-the unique addresses I need to find, does it matter if its float or 4 bytes and could I take the one with offset 0014 and 0050.

- why is there a # infront of the 13 and what does jne @F do and can I als just say cmp instead of adding DWORD PTR?

and one more thing whats the @@ doing dont I need a label for that like in the vid?

sorry for all those questions but I dont want to just copy what you did I want to really understand it...
thanks for your time

Re: AOB scan help

Posted: Fri Dec 03, 2021 3:10 pm
by LeFiXER
LocoMofo wrote:
Fri Dec 03, 2021 3:01 pm
thanks man really appreciate it.

but I have 2 more things to ask so I can understand it better:

-the unique addresses I need to find, does it matter if its float or 4 bytes and could I take the one with offset 0014 and 0050.

- why is there a # infront of the 13 and what does jne @F do and can I als just say cmp instead of adding DWORD PTR?

and one more thing whats the @@ doing dont I need a label for that like in the vid?

sorry for all those questions but I dont want to just copy what you did I want to really understand it...
thanks for your time
The address itself won't be a float it will be the value that the address is "holding". In modern computing addresses are either 32-bit (4-bytes) or 64-bit (8-bytes); that's not to say there aren't exceptions just generally speaking. The # means the number is an integer (whole number). jne @f means jump to the next block of code if the value is not equal to the value compared. Having DWORD PTR after the cmp (compare) instruction is basically telling Cheat Engine the value is a DWORD in size (4-bytes). The @@ is the identifier for the @f (@f = forward, @@ = back). For readability, labels should be used.

Code: Select all

...
label(my_codeblock)

code:
 movss [eax+14],xmm0
 cmp dword ptr [eax+10], #13
 jne my_codeblock
 mov [eax+14], (float)298
 jmp return

my_codeblock:
 cmp dword ptr [eax+10], 6 // this is a hexadecimal value
 jne return
 mov [eax+14], (float)123
 ...
 

Re: AOB scan help

Posted: Fri Dec 03, 2021 3:36 pm
by ShyTwig16
LeFiXER wrote:
Fri Dec 03, 2021 3:10 pm
...The @@ is the identifier for the @f (@f = forward, @@ = back). ...
I'm thinking the second "@@"" was a typo. But just to clarify; @@ is a generic label, and you can use @f to jump forward and @b to jump back. And it will jump to the first label, even named labels.

Code: Select all

@@:
L1:
...
jmp @b // same as "jmp L1"
jmp @f // same as "jmp L2"
...
@@:
L2:
...

Re: AOB scan help

Posted: Fri Dec 03, 2021 4:03 pm
by LeFiXER
Thanks for the correction. I will stick to labels for the sake of legibility.