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 


function i can't handle what to do in assembly injection

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

Joined: 12 Mar 2023
Posts: 2

PostPosted: Sun Mar 12, 2023 12:37 pm    Post subject: function i can't handle what to do in assembly injection Reply with quote

Hey folks ! im trying to hack a building game I tried a lot until I found a function which handles my building progress (at least it seems to be) but there is a problem here let me explain you guys Smile

So first of all when we create new building we have hammer in hand and showing resources needed to build it like (2 stone 1 wood)
each of those resources are saved in some memory address which is find able via cheat engine pointer scans I made was useless on these addresses totally
so I tried to check what writes and what access to these addresses in building
(those addresses totally functional means if we need 8 stone and we change 8 to 1 it effects the game too and we need only 1 stone now)
So after checking all of addresses I found all of them are controller by this function
Code:

1- mov ecx,[rdx]
2- mov [rax],ecx
3- ret

and let me explain you some information I found too
the Code line *1* is constantly reading data from the address(which stores needed resources) *WHEN* our mouse is pointing to that object.
so basically its duty is to read the resource amount of needed resource of pointed object with hammer but the second code line which is *2* is only called when we hit the object with hammer in this function
rdx and rax is the same address as we found in cheat engine
and ecx is the resource amount for example 5 is 0000000000000005

the problem here is this function is being called like 199000 times and I can't manuplate this when I make changes to this function anyhow it crashes the game! do you have any idea how I can change this function to work ? or any idea how can I find other things from this function which maybe useful for me ?

i have idea to check if ecx is value between 1 - 6 (which is range of resources needed in this game) and if they are in between that then edit code otherwise skip but I failed what ever I tried it crashs the game can you also help me to achieve that idea I think my lack of knowledge is causing this
Back to top
View user's profile Send private message
TsTg
Master Cheater
Reputation: 5

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

PostPosted: Sun Mar 12, 2023 5:39 pm    Post subject: Reply with quote

with a shared function like that, you need to place a filter that only edits your values or apply special effect when the caller address is XXX

and to check that, easiest way is to use the "find out what writes to this address" on your target value, and in the new address box that opens, press the "More information" button, there should be a button labeled as "S" , this will show you the stack address where parameters that was given to this function, as well as the return address, and in case its only one function that is used to call this one for every other thing there in the game, then you need to keep back-tracking untill you reach something unique
Back to top
View user's profile Send private message
katara78
How do I cheat?
Reputation: 0

Joined: 12 Mar 2023
Posts: 2

PostPosted: Sun Mar 12, 2023 10:53 pm    Post subject: Tried but i cant Reply with quote

actually thanks for your reply but also there is like many data in stack I didn't find my related data but every other data I tried in random was returning to same line of code but when I scan for which address this code has access and I hit the hammer its not called
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