| View previous topic :: View next topic |
| Author |
Message |
ishkabible How do I cheat?
Reputation: 0
Joined: 16 Jun 2012 Posts: 4
|
Posted: Sat Jun 16, 2012 12:05 pm Post subject: finding code where temporary(stack) variable is written to |
|
|
so I'm trying to give my character in the game(Magicka) infinite health which is easy but if an enemy does damage that's over my total health it kills me. I figure that in the code that checks if I'm dead uses a temporary variable to store the player_health - damage value. if that value is negative then it kills me. I'm not sure how to find that bit of code.
also, the same code that handles the player damage also handles the enemy damage so when I replace fld [...] with fldz(code that pushes the damage onto the float stack) I can't kill them unless I do more damage to them than they have health I need a way around that too(open to any ideas here). I figure there is some bit of distinguishing data that I can access. It's written in C# but the code is JIT compiled so code injection still works. is anyone familiar with the C# object model? where is the v-table stored(so that I can conditionally check for the player class's v-table)?
|
|
| Back to top |
|
 |
Fresco Grandmaster Cheater
Reputation: 4
Joined: 07 Nov 2010 Posts: 600
|
Posted: Sat Jun 16, 2012 12:49 pm Post subject: |
|
|
why don't you give us the instruction that decreases yours and you enemy's health ?
in the last step of cheat engine 6.2 you can find a tutorial about that.
if you have found the address that, if it's with -, you die, then check what code writes to it and nop it, that should do the trick.
_________________
... Fresco |
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 471
Joined: 09 May 2003 Posts: 25835 Location: The netherlands
|
Posted: Sat Jun 16, 2012 12:55 pm Post subject: |
|
|
Usually in object oriented programs the vtable pointer is stored as the first or second element of the class. Often ECX contains a pointer to the class
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
| Back to top |
|
 |
ishkabible How do I cheat?
Reputation: 0
Joined: 16 Jun 2012 Posts: 4
|
Posted: Sat Jun 16, 2012 1:49 pm Post subject: |
|
|
ok I figured a way to stop the game from resetting my health to 1000. so now I can raise my health high enough that no enemy can kill me in 1 hit. not what I wanted but it seems like it should do the job. unfortunately about 1/3rd the time a certain enemy casts a certain spell that hits me it kills me anyway. I have no clue how to begin to tackle that :/
| Quote: | | why don't you give us the instruction that decreases yours and you enemy's health ? |
I would but I'm not quite sure how to copy a significant amount of the code to my clipboard. also, the function this is in seems very long. I can't find the prolog(push ebp, etc...) or epiloge(pop ebp, ret, etc...) it's several hundred instructions long.
| Quote: | Usually in object oriented programs the vtable pointer is stored as the first or second element of the class. Often ECX contains a pointer to the class
|
how do I view the value ECX at a certain point in the code? and how can I identify which value is the vtable? perhaps I could see what access the address and if an element of it is called then I can be pretty sure it's a vtable.
|
|
| Back to top |
|
 |
Fresco Grandmaster Cheater
Reputation: 4
Joined: 07 Nov 2010 Posts: 600
|
Posted: Mon Jun 18, 2012 2:56 am Post subject: |
|
|
| ishkabible wrote: | | [...]how do I view the value ECX at a certain point in the code?[...] |
go in memory viewer right click the instruction before the instruction you want to know: what ecx is equal to: and click break and trace, give 3 instructions to track, go in game, make it execute the instructions, go back in ce and you'll see a window with 3 instructions, the one before yours and one after, in the right of that window after you click an instruction you'll see the registers and their respective values.
| Fresco wrote: | | why don't you give us the instruction that decreases yours and you enemy's health ? |
usually you find the health address, then find the one code that decreases it, i was wondering why don't you give us that piece of code, some instructions 3/4 before and after it.
_________________
... Fresco |
|
| Back to top |
|
 |
|