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 


code injection with 2 differents injection points

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

Joined: 19 Oct 2023
Posts: 7
Location: Russia, Norvinsk, Tarkov

PostPosted: Fri Oct 20, 2023 2:34 pm    Post subject: code injection with 2 differents injection points Reply with quote

Hello, I have made this injection that freezes a value when it goes up :

Code:
[ENABLE]
alloc(newmem,1024,"GameAssembly.dll"+5DC976)
aobscanmodule(s1RegAdd,GameAssembly.dll,89 42 28 48 8B 42 10 48 85 C0)
label(returnhere)
label(originalcode)
label(exit)

alloc(s1Value,8,GameAssembly.dll+5DC976)
registersymbol(s1Value)
s1Value:
dq #10

newmem:
mov eax,[s1Value]

originalcode:
mov [rdx+28],eax
mov rax,[rdx+10]

exit:
jmp returnhere

s1RegAdd:
jmp newmem
nop 2
returnhere:

 
[DISABLE]
dealloc(s1Value)
dealloc(newmem)
unregistersymbol(s1Value)
s1RegAdd:
mov [rdx+28],eax
mov rax,[rdx+10]


It works really well, but it freezes only the addition code, not the substraction code (aobscanmodule(s1RegSub,...)). How can I inject two points in the same script even though the code around each injection point is not the same ?
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4711

PostPosted: Fri Oct 20, 2023 2:57 pm    Post subject: Reply with quote

Give unique names to each label and merge the two scripts together.
_________________
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
rustyy
How do I cheat?
Reputation: 0

Joined: 19 Oct 2023
Posts: 7
Location: Russia, Norvinsk, Tarkov

PostPosted: Fri Oct 20, 2023 3:27 pm    Post subject: Reply with quote

thx a lot, I get the idea, but I don't relly see how it can be donne in practical. Especially when disabeling the script. I already crashed my game twice doing shit, can you giva a exemple pls ?
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4711

PostPosted: Fri Oct 20, 2023 3:35 pm    Post subject: Reply with quote

Put this in any search engine:

site:cheatengine.org combine scripts

_________________
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
rustyy
How do I cheat?
Reputation: 0

Joined: 19 Oct 2023
Posts: 7
Location: Russia, Norvinsk, Tarkov

PostPosted: Fri Oct 20, 2023 3:38 pm    Post subject: Reply with quote

combine was de word I was missing
thanks Very Happy
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