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 


How Do I Find An Address Via an Injection Script?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
Reclaimer Shawn
Advanced Cheater
Reputation: 0

Joined: 09 Jun 2015
Posts: 77

PostPosted: Mon Mar 30, 2020 7:14 am    Post subject: How Do I Find An Address Via an Injection Script? Reply with quote

So, let's say I have an injection script I made.
The original function is as demonstrated here:
Code:

Game.dll+offset:
mov [rdi+000001D8],esi


My injection script changes it to this:
Code:

Game.dll+offset:
mov [rdi+000001D8],7FFFFFFF


I know I can find the address every time by doing "Find out what addresses this function accesses" and letting the instruction run once, or by finding rdi and then adding 0x1D8. I don't want to find a pointer for my address or make an AOB script for the address, as that can take a while, and I want to just write to the address via cheat engine and not through an instruction, as it limits my ability to customize the address's value. I want to be able to activate a script that uses rdi+000001D8 to immediately resolve the current address of the value I'm looking for, and after the script activates, pop up an address that you can write to via cheat table.
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4711

PostPosted: Mon Mar 30, 2020 10:39 am    Post subject: Reply with quote

Look up "injection copy" / "injection copies"; there are plenty of tutorials already out there.

Reclaimer dawnn wrote:
...as it limits my ability to customize the address's value.

You could just change 7FFFFFFF in the cheat table. Either directly:
Code:
label(myvalue)
registersymbol(myvalue)
mycode:
  db c7 87 d8 01 00 00  // mov [rdi+1D8],imm32
myvalue:
  dd 7FFFFFFF  // imm32
or indirectly, from a different value you allocated through a register. Add "myvalue" to the address list, set its value to whatever, and that change will convey the next time the code is run.

(those two instructions are of different size, so I'm assuming this is in a code injection and not the way you've literally written it; if the instruction afterwards is inconsequential, then just use game.dll+offset notation instead of registering a symbol)

_________________
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
Reclaimer Shawn
Advanced Cheater
Reputation: 0

Joined: 09 Jun 2015
Posts: 77

PostPosted: Mon Apr 06, 2020 12:41 pm    Post subject: Reply with quote

ParkourPenguin wrote:
Look up "injection copy" / "injection copies"; there are plenty of tutorials already out there.


An injection copy did exactly what I want. Thanks for the help! Hadn't heard of one before until now.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting 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