 |
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
++METHOS I post too much
Reputation: 92
Joined: 29 Oct 2010 Posts: 4197
|
Posted: Thu Feb 03, 2022 12:50 am Post subject: Auto Assembly Template for Calling Functions? |
|
|
Maybe this is a stupid question.
How difficult would it be to create an auto assembly template that uses the current breakpoint data that would allow the user to automatically create a script that calls that particular function, with the correct calling convention requirements and all of the necessary parameters, that will continue to work with future sessions?
Would this be possible, or is this something that has to be manually done?
Thanks.
|
|
Back to top |
|
 |
ParkourPenguin I post too much
Reputation: 150
Joined: 06 Jul 2014 Posts: 4652
|
|
Back to top |
|
 |
predprey Master Cheater
Reputation: 24
Joined: 08 Oct 2015 Posts: 486
|
Posted: Thu Feb 03, 2022 4:10 am Post subject: |
|
|
Maybe you could elaborate more on the use case? I would think it would depend on where your breakpoint is. If the breakpoint is on a call to the function that you want to call with your script, you could probably parse the few instructions before the call to detect the common conventions and have the template extract out the lines involved with parameter passing.
But if what you want is to generate the template from anywhere within the function code itself and detect which registers it uses and which of these had their values passed in, that would probably be harder.
Then as ParkourPenguin said, there is still the semantics, so the template would only detect which registers are used for passing values and where these values are to be taken from, but you have to rename or comment on what these values are, similar to decompilation.
|
|
Back to top |
|
 |
++METHOS I post too much
Reputation: 92
Joined: 29 Oct 2010 Posts: 4197
|
Posted: Thu Feb 03, 2022 5:42 am Post subject: |
|
|
Thank you, everyone, for responding. I really appreciate it.
I suppose that it may not be overly practical, now thinking about it. Maybe something basic might be worth considering, just to save time.
predprey wrote: | Maybe you could elaborate more on the use case? I would think it would depend on where your breakpoint is. If the breakpoint is on a call to the function that you want to call with your script, you could probably parse the few instructions before the call to detect the common conventions and have the template extract out the lines involved with parameter passing. | -Yes, something like that, with the breakpoint on the call, where CE could analyze the code before the call and make a best-guess attempt. Maybe CE could also auto-step into the call and analyze some of the code there. For that matter, the entire subroutine could run until return.
It's mostly over my head, anyway. I have no programming background, so I was curious about possibilities.
I see that IDA can make a best-guess attempt at identifying calling convention and arguments, so I was curious.
Thanks, everyone.
|
|
Back to top |
|
 |
atom0s Moderator
Reputation: 204
Joined: 25 Jan 2006 Posts: 8579 Location: 127.0.0.1
|
|
Back to top |
|
 |
++METHOS I post too much
Reputation: 92
Joined: 29 Oct 2010 Posts: 4197
|
Posted: Fri Feb 04, 2022 4:42 am Post subject: |
|
|
Thanks, atom0s.
Getting back into things, and it is frustrating not knowing more about some things, so I think I will start expanding on what I know. Probably going to start with C++.
Thanks, everyone.
|
|
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
|
|