| View previous topic :: View next topic |
| Author |
Message |
Kremnari Newbie cheater
Reputation: 0
Joined: 25 Oct 2007 Posts: 20
|
Posted: Wed Dec 15, 2010 7:20 pm Post subject: Greed Corp - money hack help |
|
|
Yes, I know there is an unlimited money cheat out (thank you geri). This is more for a learning experience.
Background: The money comes from two sources; a simple turn based income (which I have found the value for) and a tile based generation (# of tiles * 2).
Goal: I want to find the "*2" instruction and be able to modify the "*2"
Thought process: I have located both the current money total and the turn based income. My thought was that between the two I could locate an instruction that would add the turn based and tile based values together then add them to the total.
I was unable to track the flow between the two.
I do know some assembly, but apparently not enough.
I have CE 5.6.1 and IDA Pro 5.5 with Hexrays 1.1
Any help (direction) would be greatly appreciated.
Kremnari
_________________
Peace in your Journeys
Kremnari |
|
| Back to top |
|
 |
Geri Moderator
Reputation: 111
Joined: 05 Feb 2010 Posts: 5627
|
Posted: Wed Dec 15, 2010 11:02 pm Post subject: |
|
|
What You are trying to figure out is actually pretty hard in this game due to the coding of the program. If You still want to give it a go, I definitely advise to use CE 6 (even though it is in beta stage), because the debugger is more stable with this game with CE 6.
As for tracing back the code, You will have a hard time. The code which is reading the money is used very frequently. And both the reading and writing code is part of a small function that is only a few lines of codes. It will not be easy to trace it backwards, I am sure that the code is full of calls.
EDIT:
Maybe You can try to check "how many tiles are harvested" or "how much money do You get from harvesting". I don't know if they are saved on some memory address or calculated "on the fly" and appearing on a temporary address only. I would suggest to use a manual breakpoint on the code which is writing to the money and when You get cash at the start of the level, the game will stop. In this state, while the game is freezed, try to search for the values that I have mentioned. It may happen that You will find some temporary values only which will be thrown out a second later if You continue the game, but it may still be useful.
_________________
|
|
| Back to top |
|
 |
Kremnari Newbie cheater
Reputation: 0
Joined: 25 Oct 2007 Posts: 20
|
Posted: Thu Dec 23, 2010 2:09 pm Post subject: |
|
|
Thank you Geri! This was enough information that I was able to find what I was looking for.
Goto address 00401B4B, this points to the "02" (in a stack?) that is added each time a harvested tile is processed. I can change this to and it would change the added value.
My question is now, how do I make a cheat out of this? Preferably by allowing the user to change the added value.
Thanks again!
_________________
Peace in your Journeys
Kremnari |
|
| Back to top |
|
 |
Geri Moderator
Reputation: 111
Joined: 05 Feb 2010 Posts: 5627
|
Posted: Thu Dec 23, 2010 2:33 pm Post subject: |
|
|
00401B4B is probably a read-only static address. You could make a script which is changing this value, or just add it as a value to a table/trainer which can be changed, but that would probably mean that it would change for the enemy too.
As to make a player-sided cheat, I didn't look into this kind of cheat, but if You check my CE table, You see what did I use as player ID for the money.
_________________
|
|
| Back to top |
|
 |
|