Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


code injection trouble :(

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
willow115
Advanced Cheater
Reputation: 0

Joined: 10 Jan 2007
Posts: 60

PostPosted: Mon May 14, 2007 12:31 pm    Post subject: code injection trouble :( Reply with quote

ok iv been doing DB's tutorial.exe thats included in every uce, but i finally got stuck. the problem is im getting an error when i put my code into the autoassembler layout for code injection.

this is the instructions;
Code injection is a technique where one injects a piece of code into the target process, and then reroute the
execution of code to go through your own written code

In this tutorial you'll have a health value and a button that will decrease your health with 1 each time you click it.
Your task is to use code injection to increase the value of your health with 2 every time it is clicked

Start with finding the address and then find what writes to it.
then when you've found the code that decreases it browse to that address in the disassembler, and open the auto
assembler window (ctrl+a)
There click on template and then code injection, and give it the address that decreases health (If it isn't already filled
in correctly)
That'll generate a basic auto assembler injection framework you can use for your code.

Notice the alloc, that'll allocate a block of memory for your code cave, in the past, in the pre windows 2000 systems,
people had to find code caves in the memory(regiosn of memory unusaed by the game), but thats luckely a thing f
the past since windows 2000, and will these days cause errors when trying to be used, due to SP2 of XP and the NX
bit of new CPU's

Also notice the line newmem: and originalcode: and the text "Place your code here"
As you guessed it, write your code here that will increase the health with 2.
a usefull assembnler instruction in this case is the "ADD instruction"
here are a few examples:
"ADD [00901234],9" to increase the address at 00901234 with 9
"ADD [ESP+4],9" to increase the address pointed to by ESP+4 with 9
In this case, you'll have to use the same thing between the brackets as the original code has that decreases your
health(!!!!!!!this is where im having trouble when i do that and hit write code it says it cant compile it.!!!!!!!!!!)

Notice:
It is recommended to delete the line that decreases your health from the original code section, else you'll have to
increase your health with 3 (you increase with 3, the original code decreases with 1, so the end result is increase
with 2), which might become confusing. But it's all up to you and your programming.

Notice 2:
In some games the original code can exist out of multiple instructions, and sometimes, not always, it might happen
that a code at another place jumps into your jump instruction end will then cause unknown behaviour. If that
happens, you should usually look near that instruction and see the jumps and fix it, or perhaps even choose to use a
different address to do the code injection from. As long as you're able to figure out the address to change from inside
your injected code.



thanks for the help Smile
Back to top
View user's profile Send private message
vdk
How do I cheat?
Reputation: 0

Joined: 14 May 2007
Posts: 3

PostPosted: Mon May 14, 2007 1:20 pm    Post subject: Reply with quote

if you miss the comma after the bracket it will not compile
Back to top
View user's profile Send private message
willow115
Advanced Cheater
Reputation: 0

Joined: 10 Jan 2007
Posts: 60

PostPosted: Mon May 14, 2007 1:39 pm    Post subject: Reply with quote

could u please post the code i should be using because it still doesnt work >.< Rolling Eyes
Back to top
View user's profile Send private message
Labyrnth
Moderator
Reputation: 10

Joined: 28 Nov 2006
Posts: 6301

PostPosted: Tue May 15, 2007 11:10 am    Post subject: Reply with quote

willow115 wrote:
could u please post the code i should be using because it still doesnt work >.< Rolling Eyes


No how about you post yours so someone can tell you what you did wrong.
This is the only way you will learn. Not by being handed someone else's script.
Back to top
View user's profile Send private message
willow115
Advanced Cheater
Reputation: 0

Joined: 10 Jan 2007
Posts: 60

PostPosted: Tue May 15, 2007 3:26 pm    Post subject: Reply with quote

ok nvm i figured it out

i didnt relise u had to mix ur code with the code it gave u
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites