 |
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
Betcha Expert Cheater
Reputation: 4
Joined: 13 Aug 2015 Posts: 232 Location: Somewhere In Space
|
Posted: Sun Oct 04, 2015 9:53 am Post subject: GTA VC One Hit Kill. |
|
|
Hello.
So, Im Playing arround with Old GTA VC. Made things like infinity HP,Stealth,Armor,Money,Car DMG. Then wanned to make thing like one hit kill.
So i found the enemy's HP. Found what writes to this address when i hit the enemy. Clicked Show disassembler/then Ctrl+A and yeah the code injection, then everything stops for me cuse i dont understand how to edit this line - fstp dword ptr [ebx+00000354]
I was searching for this - fstp dword ptr meaning, but didnt really found way to edit in my case.
What is the ways to edit codes like this?
Thank you.
Description: |
|
Filesize: |
70.22 KB |
Viewed: |
7282 Time(s) |

|
|
|
Back to top |
|
 |
STN I post too much
Reputation: 43
Joined: 09 Nov 2005 Posts: 2676
|
Posted: Sun Oct 04, 2015 10:28 am Post subject: |
|
|
It is float arithmetics.
Anyway since it is fstp the value from float stack is written into [ebx+354] so writing anything to [ebx+354] (mov) will not work. Do this
fstp st(0) // pop the float stack, the current health value gets written to st(0)
mov [ebx+354], (float)999 // write infinite health
Now you must not re-crease the original instruction if you plan to use the above code. But if you want to use it anyway, just add this instruction with the above
fld [ebx+354]
then recreate the original instruction. Reason being the float stack will be imbalanced if you don't properly push and pop values just like the normal stack.
You can also use fadd/fsub etc to modify the float stack directly instead of loading your own value.
I remember the health address being shared by both enemy and player so that address is probably writing to your player health as well (doesn't matter if you found it by bping enemy health). Find out what accesses this address on your health address, there will be a ton of code locations. Filter through each and you will find an instruction that will access just your health then just do a compare and if its you don't kill, if its enemy kill the bustard.
Here is a tutorial that explains how to do it in GTA VC (excuse the bad formatting)
http://deviatedhacking.com/topic/478-dmacode-injection-tutorials/
_________________
|
|
Back to top |
|
 |
Betcha Expert Cheater
Reputation: 4
Joined: 13 Aug 2015 Posts: 232 Location: Somewhere In Space
|
Posted: Sun Oct 18, 2015 12:56 pm Post subject: |
|
|
STN wrote: | It is float arithmetics.
Anyway since it is fstp the value from float stack is written into [ebx+354] so writing anything to [ebx+354] (mov) will not work. Do this
fstp st(0) // pop the float stack, the current health value gets written to st(0)
mov [ebx+354], (float)999 // write infinite health
Now you must not re-crease the original instruction if you plan to use the above code. But if you want to use it anyway, just add this instruction with the above
fld [ebx+354]
then recreate the original instruction. Reason being the float stack will be imbalanced if you don't properly push and pop values just like the normal stack.
You can also use fadd/fsub etc to modify the float stack directly instead of loading your own value.
I remember the health address being shared by both enemy and player so that address is probably writing to your player health as well (doesn't matter if you found it by bping enemy health). Find out what accesses this address on your health address, there will be a ton of code locations. Filter through each and you will find an instruction that will access just your health then just do a compare and if its you don't kill, if its enemy kill the bustard.
Here is a tutorial that explains how to do it in GTA VC (excuse the bad formatting)
/ |
Woops. Im Sorry for Late respond.
Umm, i played arround with your answer and with the link, but didn't really made it work some how... In that link i had uncomfortable moments like this - ( Now click on Enable Debugger and Auto hack window. When the window appears, right click on the address u found and click Auto Hack. Go back to the game and get shot so that ur health decreases. )
tutorial is 5 years old, and that how he explains, didnt work for me in latest CE version, sounded like. .. So yeah.. i failed with own ''one hit kill'', but i succeeded in other way, Downloaded one hit kill table for GTA VC and looked how its made, and somehow, made it work in own project..
I found that i have problems to understand Float code injections. its kind different than 4 bytes, doubles and else. Maybe you know some good tutorial about code injection, where is talk about float.?
Thank you for help, and Sorry for Very late respond.
Have a good day.
|
|
Back to top |
|
 |
STN I post too much
Reputation: 43
Joined: 09 Nov 2005 Posts: 2676
|
Posted: Sun Oct 18, 2015 1:10 pm Post subject: |
|
|
Yeah it uses Tsearch but the concept is exactly the same. Autohack is simply just a breakpoint you place on your address (CE equivalent of "Find out what writes(reads) to this address"). All the code and everything else should be same providing you have the same version of the game. The tutorial is actually more than a decade old and i learned from it when i was starting out myself.
Only another tut about Floats i can recommend is by DabHand
http://www.vwaskar.pwp.blueyonder.co.uk/asm4FF/asmd2.txt
Or you can search these forums, there probably are tutorials scattered around on the subject.
Floats are not that different from working with other data types, just understand that you need special instructions for copying/accessing data in float variables and most of the times its just these two instructions that you will be using
fld/fst(p). Fld loads the data from the register you give it to float stack, fst writes the data from float stack to register, the fstp variant pops the float stack after writing the value.
You can't just move data between registers/memory location like you can with integers, so you have to first push(load) the float variables into float stack and then write it from there into your desired register or memory location. That is all there is to it.
Fadd/Fsub etc. are same instructions as for normal data types arthmetic except you add/subtract from the float stack.
_________________
|
|
Back to top |
|
 |
Betcha Expert Cheater
Reputation: 4
Joined: 13 Aug 2015 Posts: 232 Location: Somewhere In Space
|
Posted: Sun Oct 18, 2015 1:58 pm Post subject: |
|
|
STN wrote: | Yeah it uses Tsearch but the concept is exactly the same. Autohack is simply just a breakpoint you place on your address (CE equivalent of "Find out what writes(reads) to this address"). All the code and everything else should be same providing you have the same version of the game. The tutorial is actually more than a decade old and i learned from it when i was starting out myself.
Only another tut about Floats i can recommend is by DabHand
Or you can search these forums, there probably are tutorials scattered around on the subject.
Floats are not that different from working with other data types, just understand that you need special instructions for copying/accessing data in float variables and most of the times its just these two instructions that you will be using
fld/fst(p). Fld loads the data from the register you give it to float stack, fst writes the data from float stack to register, the fstp variant pops the float stack after writing the value.
You can't just move data between registers/memory location like you can with integers, so you have to first push(load) the float variables into float stack and then write it from there into your desired register or memory location. That is all there is to it.
Fadd/Fsub etc. are same instructions as for normal data types arthmetic except you add/subtract from the float stack. |
Thank you once again. gonna get my things clear about it.
|
|
Back to top |
|
 |
STN I post too much
Reputation: 43
Joined: 09 Nov 2005 Posts: 2676
|
Posted: Sun Oct 18, 2015 2:49 pm Post subject: |
|
|
Not a problem. It will seem confusing at first but with practice you'll get the hang of it. GTA VC is a good practice game, you will find plenty of tutorials for this specific game even if they are using old tools, just grab these tools and the game version and make the hacks. You will learn a lot. The tool's interfaces change but they all do the same thing.
If you don't already, learn what stack is and how it works, the float stack works the same way except holding bigger values. Same way for the XMM registers.
_________________
|
|
Back to top |
|
 |
vng21092 Grandmaster Cheater
Reputation: 15
Joined: 05 Apr 2013 Posts: 644
|
Posted: Sun Oct 18, 2015 5:47 pm Post subject: |
|
|
In the event that the instruction above doesn't write to the player health, there's no reason why adding mov [ebx+354],0 right beneath fstp dword ptr [ebx+00000354] wouldn't work.
|
|
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
|
|