| View previous topic :: View next topic |
| Author |
Message |
Dameningen How do I cheat?
Reputation: 0
Joined: 01 Apr 2012 Posts: 4
|
Posted: Fri Jun 08, 2012 8:55 pm Post subject: nop a code makes all enemy and allies invincible... |
|
|
I played a RPG last night, then I found the main character's HP and other allies HP address.
Till there, that just fine. But I want make it easier, so I found the opcode and nop it.
| Code: | | 01A83A25 Code :sub [ebx+000001F0],edi |
Suddenly, all the monster and characters on the field became invincible!
After looking at the code I know nop it will make every thing on the map won't decrease HP...(Because I nop the sub)
Seriously, how can I solve this kind of problem? I say "kind", because I try to hack BF2 and BF2142 and gotta same result...
|
|
| Back to top |
|
 |
Slugsnack Grandmaster Cheater Supreme
Reputation: 71
Joined: 24 Jan 2007 Posts: 1857
|
Posted: Fri Jun 08, 2012 9:28 pm Post subject: |
|
|
you really need to inspect stuff manually to see what is happening but i can speculate for you i'm also going to assume you have some knowledge of OOP.
i suspect that all the characters + monsters inherit from some base class which implements a method which deducts health. let's call it animal for argument sake. animal might be defined something like this
| Code: | class animal {
int health = 100;
void received_dmg(int dmg) {
health =- dmg;
}
} |
one common way that this is implemented at the assembly code level is that you have a function received_dmg which takes as an argument a pointer to the receiver object. the receiver object must be of type animal which has a health value at a certain offset. whenever received_dmg is invoked, it takes the object it was called with (this) and adds that offset to get a pointer to the health for that object. it then deducts from that memory location.
so by nop'ing that instruction, you make it so received_dmg never deducts anything! there are several ways you can fix this. one way is to have a check for whether the receiver object is your main character. if not, then execute the original code. else, do nothing. you need a way of identifying whether or not the receiver object is your main character. for this, you need to reverse engineer the object and try to find something which would be unique to your character.
in this case, ebx probably is the object pointer and edi is the dmg value to be subtracted.
for example, say you find that at offset X of all animal objects there is stored a pointer to a string which represents the player/monster id. maybe you know that your id is always 0. then you would do something like this:
| Code: | cmp dword ptr ds:[ebx+X], 0
jz @f
sub [ebx+0x1f0], edi
@@: |
this is not proper auto assembler, more like pseudo-code but hopefully it helps your understanding
|
|
| Back to top |
|
 |
Fresco Grandmaster Cheater
Reputation: 4
Joined: 07 Nov 2010 Posts: 600
|
Posted: Sat Jun 09, 2012 12:46 pm Post subject: |
|
|
try to complete cheat engine's tutorial
** Step 9: Shared code: (PW=31337157)
in ce 6.2 hit help -> ce tut
http://forum.cheatengine.org/viewtopic.php?t=552992
this is a brief explanation of the last step.
if one opcode writes to multiple addresses (like the one you have that writes to you your friends and enemy's hp) you need it to check if it has to write to whether your hp or enemy's and if yours do nothing, if enemy's decrease hp
good luck.
_________________
... Fresco |
|
| Back to top |
|
 |
Dameningen How do I cheat?
Reputation: 0
Joined: 01 Apr 2012 Posts: 4
|
Posted: Wed Jun 20, 2012 11:14 am Post subject: |
|
|
Very thanks for replying, I have download 6.2, and worked on step 9, but...
I was trying on step 9 for hours and hours, using every method to do this job done.
I saw many example, realizing that the key point is [ebx+10] is my mate's op code, and [ebx+4] is not.
My question is: How do you guys find out [ebx+10]? Cause this quest is a shared code, I can't find out except [ebx+4]!!!
I googled and searched many pages here and there, but none of that tells a clue....
No offense, but you won't find ten by try and error, right?
|
|
| Back to top |
|
 |
oLaudix Expert Cheater
Reputation: 3
Joined: 25 Mar 2010 Posts: 138
|
Posted: Wed Jun 20, 2012 1:33 pm Post subject: |
|
|
Memory Viewer --> Tools --> Dissect Data Structure
Get health of you 1 ally and 2 enemies. If you Dissect the structure you might observe that under certain offset there will be variable same for you and your ally and different for the 2 enemies. You will have to add comparison to your AA script so itll only work for you and your ally.
|
|
| Back to top |
|
 |
|