View previous topic :: View next topic |
Author |
Message |
ubiByte Advanced Cheater
Reputation: 1
Joined: 08 Mar 2013 Posts: 57
|
Posted: Thu Feb 04, 2016 1:04 pm Post subject: Data Structure Value to Script |
|
|
Hi Guys,
This might be a dumb question but for some reason I can't get it to work. Even though I think it's something simple that I'm missing.
When I dissect data/structures, and see the values I can just click on a value from there and change it and it will change in the game. That part is easy enough. However, I want to do this with a script I don't know why I'm having a hard time getting it to work.
For example let's say I have a value at 000C and it's value is 16. If I just click on it there in the Structure dissect window I can just change the value. When I try to do it in a script though it does nothing.
This is what makes sense to me but I guess it's not correct:
Could I just do something like;
Code: | add eax, #5
mov [rbx+000C],eax
|
This does nothing but shouldn't it just change the value at that location to 5?
|
|
Back to top |
|
 |
Daijobu Master Cheater
Reputation: 13
Joined: 05 Feb 2013 Posts: 301 Location: the Netherlands
|
Posted: Thu Feb 04, 2016 1:15 pm Post subject: |
|
|
Should move the value 5 into rbx+C. If it doesn't you probably don't have the correct location for code injection.
_________________
|
|
Back to top |
|
 |
ubiByte Advanced Cheater
Reputation: 1
Joined: 08 Mar 2013 Posts: 57
|
Posted: Thu Feb 04, 2016 1:53 pm Post subject: |
|
|
Daijobu wrote: |
Should move the value 5 into rbx+C. If it doesn't you probably don't have the correct location for code injection. |
Thanks for the quick reply. I have the correct location I get there with AOB injection but doing what you suggested doesn't help either. Not sure why. Here's more code to help you understand it better:
This is the address location I need to modify.
Code: | 7FF7EC22E5E9 - 01 03 - add [rbx],eax |
RBX = 00007FF789D60CFC
Dissecting data/structures at RBX:
Code: |
0000 - 118305
...
000C - 0
|
So you see the 0C there, I can just modify it by change its value but I want to do it in the script. What you suggested doesn't do it either
|
|
Back to top |
|
 |
++METHOS I post too much
Reputation: 92
Joined: 29 Oct 2010 Posts: 4197
|
Posted: Thu Feb 04, 2016 4:01 pm Post subject: |
|
|
Paste your entire script. Use AOB injection or full injection.
|
|
Back to top |
|
 |
ParkourPenguin I post too much
Reputation: 152
Joined: 06 Jul 2014 Posts: 4702
|
Posted: Thu Feb 04, 2016 4:42 pm Post subject: |
|
|
Are you sure another instruction isn't overriding your change shortly after the mov?
Put a breakpoint just before your mov, step through it, and see if the address changes in your cheat table. If it does change, then your code injection is pretty much working as intended. If when you continue running the code the value is changed to something else, then some other instruction is writing to that address. You can either NOP that instruction from your script if it's a short enough distance away from your injection point, or get it from another AoB scan in the same script and NOP it that way.
Pasting your script here as well as the ASM around the instruction you're hooking would be helpful.
_________________
I don't know where I'm going, but I'll figure it out when I get there. |
|
Back to top |
|
 |
++METHOS I post too much
Reputation: 92
Joined: 29 Oct 2010 Posts: 4197
|
Posted: Thu Feb 04, 2016 5:37 pm Post subject: |
|
|
ParkourPenguin wrote: | Are you sure another instruction isn't overriding your change shortly after the mov?. | -That was my first thought, but he said that he could change the value successfully by editing it directly.
|
|
Back to top |
|
 |
ubiByte Advanced Cheater
Reputation: 1
Joined: 08 Mar 2013 Posts: 57
|
Posted: Thu Feb 04, 2016 11:35 pm Post subject: |
|
|
I'll take pictures and attach them here, I'm at work now so I can't do it until tomorrow morning thanks for your replies though.
|
|
Back to top |
|
 |
ubiByte Advanced Cheater
Reputation: 1
Joined: 08 Mar 2013 Posts: 57
|
Posted: Fri Feb 05, 2016 10:59 am Post subject: |
|
|
Here are screenshots to help better understand what I'm asking,
Description: |
This is the dissect window, if I click on 0008 and change that value to 10 for example. I can see it reflect immediately in the game but when I do it with a script nothing happens. |
|
Filesize: |
29.07 KB |
Viewed: |
8154 Time(s) |

|
Description: |
This is my AOB Injection, I haven't actually written the needed code yet I wanted to have you guys tell me how I would do it so that it would work. |
|
Filesize: |
22.54 KB |
Viewed: |
8154 Time(s) |

|
Description: |
This is the memory viewer at that location. |
|
Filesize: |
12.86 KB |
Viewed: |
8154 Time(s) |

|
Description: |
Result of find what writes to this address. |
|
Filesize: |
11.49 KB |
Viewed: |
8154 Time(s) |

|
|
|
Back to top |
|
 |
++METHOS I post too much
Reputation: 92
Joined: 29 Oct 2010 Posts: 4197
|
Posted: Fri Feb 05, 2016 11:10 am Post subject: |
|
|
You should have pasted your entire script with your changes included after letting CE auto-create it with the AOBScan or Full Injection template.
Anyway, the value that you are trying to change is at offset +08, yet your injection point is at offset +0?
The injection point that you are using may not be getting accessed very often (or at a certain time). You need to add the value that you are wanting to change to your cheat table, right-click it to see what is accessing it, and use an instruction that is accessing the address often so that your changes are immediate.
|
|
Back to top |
|
 |
ParkourPenguin I post too much
Reputation: 152
Joined: 06 Jul 2014 Posts: 4702
|
Posted: Fri Feb 05, 2016 11:14 am Post subject: |
|
|
Code: | ...
newmem:
mov [rbx+C],#5
add [rbx],eax
mov eax,[rbx]
mov rbx,[rsp+40]
jmp return
... | Assuming that section of ASM is run, I can't think of any reason why the above code wouldn't move 5 into [rbx+C].
Again, it could be that another instruction is overriding your change shortly after your code injection, resulting in it looking like your change had no effect. If it still doesn't work, do what I instructed earlier and use a breakpoint to determine if that is the problem.
As ++METHOS said, you would probably be better off in changing your injection point to an instruction that actually accesses (preferably writes to) the address you want to change.
_________________
I don't know where I'm going, but I'll figure it out when I get there. |
|
Back to top |
|
 |
ubiByte Advanced Cheater
Reputation: 1
Joined: 08 Mar 2013 Posts: 57
|
Posted: Fri Feb 05, 2016 11:24 am Post subject: |
|
|
Thanks guys using what accesses it is a great idea as well as the breakpoint.
Code: | mov [rbx+C],#5
add [rbx],eax
mov eax,[rbx]
mov rbx,[rsp+40]
jmp return |
This was literally what I had used and it hadn't worked but maybe something else is overriding like you said I will look into it deeper I just wanted to make sure my code wasn't completely off. Now that I know that's not the case I can look into it deeper and figure it out.
Thanks for the help!
|
|
Back to top |
|
 |
++METHOS I post too much
Reputation: 92
Joined: 29 Oct 2010 Posts: 4197
|
Posted: Fri Feb 05, 2016 11:49 am Post subject: |
|
|
Using 'what accesses' is great, but as ParkourPenguin pointed out, using what 'writes' may be preferred as it gives you more control over your value. For example:
If you create a health cheat using an instruction that accesses your value every second, then your health will be restored every second. But if you get hit, your health may still be affected...even if it's for a fraction of a second.
The great thing is, you can nop the write instruction and create a second injection point at one of the other instructions to make it perfect.
|
|
Back to top |
|
 |
|