 |
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
aikoncwd Grandmaster Cheater
Reputation: 23
Joined: 21 Dec 2012 Posts: 591 Location: Spain (Barcelona)
|
Posted: Sun Jan 27, 2013 5:31 pm Post subject: How differentiate between my health and enemy health |
|
|
Hi guru's
I have one big problem. I tried to hack a game, so I want to avoid my life decrease. The game is like a "pokemon-battle" style, so I start with 30 points of health and my enemy have like 10. In few seconds I found the address where my life is; I can manually-modify the value or freeze (this works very fine).
Well, when I have the address I "Find out what writes to this address", when I get a hit, I get this:
Code: | 004B1338 - 66 89 55 FC - mov [ebp-04],dx
004B133C - D9 6D FC - fldcw [ebp-04]
004B133F - DB 58 38 - fistp dword ptr [eax+38] <<
004B1342 - D9 6D FE - fldcw [ebp-02]
004B1345 - C9 - leave
EAX=1D1DC8AC
EBX=1D428618
ECX=1D1DC808
EDX=1D1D0C7F
ESI=0022C788
EDI=0022C6B4
ESP=0022C674
EBP=0022C678
EIP=004B1342
|
I open the AA script and add this line
With this line I force to put 30 on my address, so I got a 'god-mode' and my health never decreases. This works pretty well, but suddenly, the enemy health raise to 30 points too, and I can't dmg him.
This code works for my health and enemy health too, so what can I do to get a working AA script for my health only? I think this is relationated with last step of CE Tutorial
Thanks
EDIT
In Memory View, I used the option: "Find out what addresses this instruction accesses" and I get 2 address (my life and enemy life). How I need to continue?
The first address with 23 value is my health, the other with 4 value is the enmy address
_________________
Hey Hitler
Test here your skill with CheatEngine, I coded a challenge for you. Try to beat it!
HERE |
|
Back to top |
|
 |
mgr.inz.Player I post too much
Reputation: 222
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Sun Jan 27, 2013 7:34 pm Post subject: |
|
|
we can start with basic stuff.
Your screenshot. Do this again and click first address, press ctrl+r. For second address too. Make another screenshoot which contain both windows, then post here.
_________________
|
|
Back to top |
|
 |
dforell Newbie cheater
Reputation: 2
Joined: 31 Aug 2011 Posts: 14
|
Posted: Sun Jan 27, 2013 9:27 pm Post subject: |
|
|
This is a prime example of CE Tutorial Step 9.
Your working with this code...
fistp dword ptr [eax+38]
eax is the ship's structure
38 is the offset to the ship's hull rating
So you want to take a look at the entire ship structure for the player and enemy.
Put the eax addresses from the player and the enemy into the "Dissect data/structures" window.
You want to find a structure offset that is different between the player and the enemy.
You should note that offset 38 in the "Dissect data/structures" window should match hull values.
If not, your doin' it wrong.
My test suggests that offset 4 is what we are looking for.
eax+4 is 0 for the player, and 1 for the enemy.
Just create an auto assemble table with a check and skip.
That's it.
Example for FTL standard. (not GoG or Steam)
Overcommented.
This example can be modified to use AoB to work with all FTL versions.
CE refuses to accept "fldcw dword ptr [ebp-02]" or "fldcw [ebp-02]" in auto assemble,
So I had to just write the bytes. (The "db D9 6D FE" parts)
I created a thread about this in general.
EDIT: Just reread the post and I misread a response.
"fldcw word ptr [ebp-02]" is acceptable. db workaround not needed.
Code: |
[ENABLE] //Write new code when cheat is enabled
alloc(InfiniteHull,32) //Allocate memory for new code
label(SkipDamage) //Create label to skip hull damage
label(return) //Create label to return to regular code
"FTLGame.exe"+B133F: //Address to modify
jmp InfiniteHull //Jump to new code (replaces original codes)
nop
return: //Return marker
InfiniteHull: //Allocated memory for new code
pushfd //Store flags, the current ones may be important
cmp [eax+4],0 //Check for player, set flags
je SkipDamage //Skip to below if player
fistp dword ptr [eax+38] //Original code (Damage hull)
SkipDamage: //Skip to here if player
db D9 6D FE //Original code
popfd //Restore the original flags
jmp return //Return to regular code
[DISABLE] //Restore original code when cheat is disabled
"FTLGame.exe"+B133F: //Address to restore
fistp dword ptr [eax+38] //Original code
db D9 6D FE //Original code
|
You can also create a simpler script that does not require CE Tutorial Step 9.
It basically exploits the routine that draws the player's hull on the screen.
Hope this helped.
Last edited by dforell on Mon Jan 28, 2013 3:31 am; edited 1 time in total |
|
Back to top |
|
 |
aikoncwd Grandmaster Cheater
Reputation: 23
Joined: 21 Dec 2012 Posts: 591 Location: Spain (Barcelona)
|
Posted: Mon Jan 28, 2013 1:57 am Post subject: |
|
|
@dforell: Thanks for your reply, that's why I want to do, but I want to know how to do this, instead of use a someone else code. I think this will help me a lot
@mgr.inz.Player: Here is the screenshoot
The left window is for 1st address (my health), the right window is for second address (enemy health)
======================================
EDIT:
woow, I'm doing what you say dforell
1. Get the EAX values for my health and enemy health
2. Open the dissect data structure and put the 2 values
3. Offset 38 is the health of player and enemy
4. Offset 4 is diferent, 0 for me, 1 for enemy
Well, at this point I think I need to compare the [eax+4] and jump if the result is 0 (me) and do a mov [eax+38],1E, yes?
I will try to do without looking your code
Thanks very much, I'm learning a lot with this game
_________________
Hey Hitler
Test here your skill with CheatEngine, I coded a challenge for you. Try to beat it!
HERE |
|
Back to top |
|
 |
dforell Newbie cheater
Reputation: 2
Joined: 31 Aug 2011 Posts: 14
|
Posted: Mon Jan 28, 2013 3:24 am Post subject: |
|
|
It shouldn't be necessary to write 30 into the player's hull address. The simplest way would be to just prevent damage to the player's hull in the first place. Also, like you guessed, CE Tutorial Step 9 deals with just this scenario. If you can complete it, you should be able to mimic it exactly here.
|
|
Back to top |
|
 |
aikoncwd Grandmaster Cheater
Reputation: 23
Joined: 21 Dec 2012 Posts: 591 Location: Spain (Barcelona)
|
Posted: Mon Jan 28, 2013 3:38 am Post subject: |
|
|
dforell wrote: | It shouldn't be necessary to write 30 into the player's hull address. The simplest way would be to just prevent damage to the player's hull in the first place. Also, like you guessed, CE Tutorial Step 9 deals with just this scenario. If you can complete it, you should be able to mimic it exactly here. |
Thank you very much, finally I did
Well, I want to write 30 because in some missions, you get dmg from a quest, when this happen, your health decrease and this code is in another section. So I prefer to re-fill my health when I get hit to solve this.
BTW, I played a little with this, and I made a 1 shot kill script. Simply I compare the [eax+4] and If is enemy I mov [eax+38],0. The enemy ship is insta-killed.
After this, finally I completed the Step 9 of tutorial. Thanks again, I learned a lot with this
============================
EDIT
Finally I solved this and made another cheat for this game, so now is a +7 Trainer, all thanks to you. Here is my greetings:
_________________
Hey Hitler
Test here your skill with CheatEngine, I coded a challenge for you. Try to beat it!
HERE |
|
Back to top |
|
 |
mgr.inz.Player I post too much
Reputation: 222
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Mon Jan 28, 2013 5:31 am Post subject: |
|
|
OK. Sometimes registry check is enough. My next suggestion would be structure check. But I see you already did it.
Look here btw. http://forum.cheatengine.org/viewtopic.php?t=550252
There were many attempts to achieve inf HP for Painkiller. After many tries, I finally made it.
_________________
|
|
Back to top |
|
 |
aikoncwd Grandmaster Cheater
Reputation: 23
Joined: 21 Dec 2012 Posts: 591 Location: Spain (Barcelona)
|
Posted: Mon Jan 28, 2013 5:41 am Post subject: |
|
|
mgr.inz.Player wrote: | OK. Sometimes registry check is enough. My next suggestion would be structure check. But I see you already did it.
Look here btw. http://forum.cheatengine.org/viewtopic.php?t=550252
There were many attempts to achieve inf HP for Painkiller. After many tries, I finally made it. |
Thank you very much, you help me a lot (on this thread and other threads too), your nick is on my trainer, rep+ 4u
_________________
Hey Hitler
Test here your skill with CheatEngine, I coded a challenge for you. Try to beat it!
HERE |
|
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
|
|