| View previous topic :: View next topic |
| Author |
Message |
Meatballio How do I cheat?
Reputation: 0
Joined: 16 Mar 2023 Posts: 2
|
Posted: Thu Mar 16, 2023 2:45 pm Post subject: Question about values that create new vars every assignment |
|
|
usually in a game for a example values are assigned and then reassigned to the same variable,more specifically same memory location (example)
int hp = 100
and when you take 1 damage
hp = 99
if a game instead of reassigning the same variable, just creates a new variable and assigns it the new value every time
so something like:
Integer hp = new Integar(100)
and when you take 1 damage
hp = new Integar(99)
searching for changed values would no longer work, but is it possible to make something to search for ExecutedCode that has assigned a location in memory a certain value?
so like instead of looking for addresses that have the value 100 and then seeing if any of those changed to 99 when you took damage
look for ExecutedCode that has resulted in an address holding the value 100 and then when you take damage see if any of the past results have been executed and caused an address to hold 99
all i really want to know whether or not its possible/feasible to write a tool that does this,
this might be a very stupid question or literally impossible but just asking for the sake of my sanity
p.s if there's other ways to deal with these kind of variables it would also be greatly apprieciated
|
|
| Back to top |
|
 |
++METHOS I post too much
Reputation: 92
Joined: 29 Oct 2010 Posts: 4197
|
Posted: Thu Mar 16, 2023 3:15 pm Post subject: |
|
|
| Ultimap can search for and filter out calls that have been executed. This would likely work in the scenario that you describe.
|
|
| Back to top |
|
 |
ParkourPenguin I post too much
Reputation: 152
Joined: 06 Jul 2014 Posts: 4718
|
Posted: Thu Mar 16, 2023 3:18 pm Post subject: |
|
|
That's infeasible.
You can scan for certain code (usually `call` instructions) that's been executed (ultimap / ultimap v2 / code filter), but it won't tell you anything about addresses or values.
Abusing the pointer scanner is an alternative. Scan for addresses w/ a certain value, allow dynamic addresses (uncheck "Only find paths w/ a static address"), and limit the max level to 2 or 3.
_________________
I don't know where I'm going, but I'll figure it out when I get there. |
|
| Back to top |
|
 |
Meatballio How do I cheat?
Reputation: 0
Joined: 16 Mar 2023 Posts: 2
|
Posted: Thu Mar 16, 2023 3:35 pm Post subject: |
|
|
i see
about ultimap i actually have tried it, and it does do the job but for certain things there's just way too much stuff the executes along side the call that i'm looking for and it makes it almost impossible to find
and never thought about using the pointer scanner, will definitely go play with it right now lol
these are all the answers i needed, thanks for the super fast replies ♥
|
|
| Back to top |
|
 |
++METHOS I post too much
Reputation: 92
Joined: 29 Oct 2010 Posts: 4197
|
Posted: Thu Mar 16, 2023 3:49 pm Post subject: |
|
|
| ParkourPenguin wrote: | That's infeasible.
You can scan for certain code (usually `call` instructions) that's been executed (ultimap / ultimap v2 / code filter), but it won't tell you anything about addresses or values. | -If we assume that the purpose is to find the instruction that is handling the dynamic data, then narrowing in on the call should allow for that, so ultimap would qualify as a reasonable solution, no?
|
|
| Back to top |
|
 |
ParkourPenguin I post too much
Reputation: 152
Joined: 06 Jul 2014 Posts: 4718
|
Posted: Thu Mar 16, 2023 4:34 pm Post subject: |
|
|
| ++METHOS wrote: | | If we assume that the purpose is to find the instruction that is handling the dynamic data, then narrowing in on the call should allow for that, so ultimap would qualify as a reasonable solution, no? | Sometimes.
OP was specifically asking if there was a practical tool that could record values used as code gets executed, which there isn't. Ultimap still might work if the user understands assembly.
Even if that's fine, there's two main problems: unrelated results often appear that might take a while to identify as not important, and the result you want may not even exist in the first place. e.g. the routine you want to find gets inlined, and a jcc or some weird branchless code disassociates when the caller is run from when the inlined callee is run.
_________________
I don't know where I'm going, but I'll figure it out when I get there. |
|
| Back to top |
|
 |
++METHOS I post too much
Reputation: 92
Joined: 29 Oct 2010 Posts: 4197
|
Posted: Thu Mar 16, 2023 4:43 pm Post subject: |
|
|
I see. You're right. I have a tendency to read between the lines sometimes when people are asking for help here.
|
|
| Back to top |
|
 |
|