Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Modifying a value that is being constantly written to

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
Cowlick035
How do I cheat?
Reputation: 0

Joined: 26 May 2022
Posts: 3

PostPosted: Thu May 26, 2022 5:49 am    Post subject: Modifying a value that is being constantly written to Reply with quote

I am trying to modify a float value of 1 stored at a pointer address. This controls Vermintide 2's viewmodel FOV. Increasing the value increases the viewmodel FOV and decreasing it does the opposite. Unfortunately, it is being constantly written to by this:

Code:
movups [rax+r8+10],xmm2


Usually I would just disable this code with nop, but in this instance the code in question writes to a lot of other addresses which need to continue functioning.

I have very little scripting experience so I'm at a loss for what to do. I've looked at the CE tutorials, but it doesn't make a lot of sense to me.

Is there a way I can prevent the code from writing to just this one specific address?
Back to top
View user's profile Send private message
LeFiXER
Grandmaster Cheater Supreme
Reputation: 20

Joined: 02 Sep 2011
Posts: 1051
Location: 0x90

PostPosted: Thu May 26, 2022 7:10 am    Post subject: Reply with quote

You will need to find out what addresses access the instruction, and then assign the address that holds the value you want to manipulate to group one, and several other addresses to group two. From there you will have to scan for commonalities. Look for an offset that holds a value that is different from every other.

Then in your AA script:
Code:

...
newmem:
  cmp [rax+offset],value //where value is the value held at the offset
  jne code
  // instructions to execute here

code:
  // original instructions
...
Back to top
View user's profile Send private message
Cowlick035
How do I cheat?
Reputation: 0

Joined: 26 May 2022
Posts: 3

PostPosted: Thu May 26, 2022 9:15 am    Post subject: Reply with quote

Thank you! This makes sense, but I haven't been able to find an offset that works. Is it just trial and error until it works? Does the register I use matter? 'Cause I'm seeing only RDX, RSP (Snapshot) and Base Address.

My script looks like this atm:

Code:
[ENABLE]

aobscanmodule(INJECT,vermintide2.exe,42 0F 11 54 00 10)
alloc(newmem,$1000,INJECT)

label(code)
label(return)

newmem:
  cmp [rdx+offset],value
  jne code

code:
  movups [rax+r8+10],xmm2
  jmp return

INJECT:
  jmp newmem
  nop
return:
registersymbol(INJECT)

[DISABLE]

INJECT:
  db 42 0F 11 54 00 10

unregistersymbol(INJECT)
dealloc(newmem)
Back to top
View user's profile Send private message
LeFiXER
Grandmaster Cheater Supreme
Reputation: 20

Joined: 02 Sep 2011
Posts: 1051
Location: 0x90

PostPosted: Thu May 26, 2022 9:21 am    Post subject: Reply with quote

The register makes a difference. The instruction you have is:
Code:

movups [rax+r8+10],xmm2


So you will want to use RAX. Also, be sure to change "offset".
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 137

Joined: 06 Jul 2014
Posts: 4250

PostPosted: Thu May 26, 2022 10:45 am    Post subject: Reply with quote

Also see step 9 of the CE tutorial for more information. I'm sure there are plenty of guides online.
_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
TsTg
Master Cheater
Reputation: 5

Joined: 12 Dec 2012
Posts: 334
Location: Somewhere....

PostPosted: Fri May 27, 2022 1:25 am    Post subject: Reply with quote

one of the two registers should be holding the base address of the values, the other should have the offset, take a look at both RAX and R8 and see

otherwise, you would need to do some digging, see where the loop that writes through the structure and work from there
Back to top
View user's profile Send private message
Cowlick035
How do I cheat?
Reputation: 0

Joined: 26 May 2022
Posts: 3

PostPosted: Fri May 27, 2022 8:18 pm    Post subject: Reply with quote

Ah thank you so much people Very Happy

The main problem with my script was a missing 'jmp return' (my inexperience shows). Afterwards, I just had to make sure the offset value was static.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites