 |
Cheat Engine The Official Site of Cheat Engine
|
| View previous topic :: View next topic |
| Author |
Message |
hapvlz How do I cheat?
Reputation: 0
Joined: 30 Mar 2024 Posts: 9
|
Posted: Mon May 13, 2024 6:56 pm Post subject: Execute Game Action on demand |
|
|
Hello,
I've been struggling with this for few days already. I've reviewed many threads unfortunately I couldn't make it working. I'm also newbie in assembly and prolly thats the reason.
Basically, let's say I have game functions like walking (pressing W), or opening inventory (pressing I), or opening any other window.
I would like to be able to "execute" such activity on demand without having to press the button. Initially I want to make it working in CE, then I would like to somehow trigger it from Python code.
Let's say I've already found an address related to one specific window.
It value is 257 when window is open, 1 when it's closed.
When I trace that write to this address it points me to address 008A8A5B and the full function is -
| Code: | Game.exe+4A8A44 - 55 - push ebp
Game.exe+4A8A45 - 8B EC - mov ebp,esp
Game.exe+4A8A47 - 8A 45 08 - mov al,[ebp+08]
Game.exe+4A8A4A - 83 EC 0C - sub esp,0C { 12 }
Game.exe+4A8A4D - 3A 81 8D000000 - cmp al,[ecx+0000008D]
Game.exe+4A8A53 - 74 2F - je Game.exe+4A8A84
Game.exe+4A8A55 - 83 65 F8 00 - and dword ptr [ebp-08],00 { 0 }
Game.exe+4A8A59 - 84 C0 - test al,al
----->>> Game.exe+4A8A5B - 88 81 8D000000 - mov [ecx+0000008D],al
Game.exe+4A8A61 - 8D 45 F4 - lea eax,[ebp-0C]
Game.exe+4A8A64 - C7 45 F4 28D6CF00 - mov [ebp-0C],Game.exe+8FD628 { (008A9188) }
Game.exe+4A8A6B - 89 4D FC - mov [ebp-04],ecx
Game.exe+4A8A6E - 50 - push eax
Game.exe+4A8A6F - 74 08 - je Game.exe+4A8A79
Game.exe+4A8A71 - FF 35 58932601 - push [Game.exe+E69358] { (7) }
Game.exe+4A8A77 - EB 06 - jmp Game.exe+4A8A7F
Game.exe+4A8A79 - FF 35 5C932601 - push [Game.exe+E6935C] { (8) }
Game.exe+4A8A7F - E8 0B04C5FF - call Game.exe+F8E8F
Game.exe+4A8A84 - 8B E5 - mov esp,ebp
Game.exe+4A8A86 - 5D - pop ebp
Game.exe+4A8A87 - C2 0400 - ret 0004 { 4 } |
Not sure what can I do next in order to be able to trigger this function.
btw. Just changing the value is not helping.
Unfortunately in above function I cannot perform any memory modification for some reason, maybe protected? But in other part of the memory I can do that. Therefore I'm just looking for a way to execute the code as it is (as game is doing it).
I hope it's clear,
Thank you in advance for any assistance!!
|
|
| Back to top |
|
 |
ParkourPenguin I post too much
Reputation: 152
Joined: 06 Jul 2014 Posts: 4711
|
Posted: Mon May 13, 2024 10:11 pm Post subject: |
|
|
Use ultimap / code filter (under Memory View -> Tools) to search for calls
There's one or two tutorials on ultimap, and code filter is similar enough
As for actually calling the function, you'll need good knowledge of calling conventions and maybe the game engine itself. e.g. mono has its own crap to deal with:
https://forum.cheatengine.org/viewtopic.php?p=5722879#5722879
_________________
I don't know where I'm going, but I'll figure it out when I get there. |
|
| Back to top |
|
 |
hapvlz How do I cheat?
Reputation: 0
Joined: 30 Mar 2024 Posts: 9
|
Posted: Tue May 14, 2024 11:57 am Post subject: |
|
|
Thank you for response @ParkourPenguin.
Wow I didn't expect it gonna be so diffcult.
Seriously there is no easier way to execute game action? I'm not even changing the way it behave, I just want to execute as it is.
|
|
| Back to top |
|
 |
ParkourPenguin I post too much
Reputation: 152
Joined: 06 Jul 2014 Posts: 4711
|
Posted: Tue May 14, 2024 12:43 pm Post subject: |
|
|
It's often easy to say what you want to do colloquially but hard to do it in practice.
I guess you could try a macro-like approach and virtually press a key from another process. e.g. in CE, `doKeyPress(VirtualKeyCode)`
The game might use some other input API, however, and this might not work. You'd then have to analyze that input API and figure out what "pressing a key" means to that API yourself.
_________________
I don't know where I'm going, but I'll figure it out when I get there. |
|
| Back to top |
|
 |
|
|
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
|
|