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 


Adding my own code into a .exe.

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
MooMooCow
Newbie cheater
Reputation: 0

Joined: 07 Jun 2007
Posts: 21

PostPosted: Thu Jun 19, 2008 12:18 am    Post subject: Adding my own code into a .exe. Reply with quote

For some reason this seems like it should be very easy, but I can't seem to grasp anyway of doing it. I am trying to take some code and convert it to hex and then add it into an empty spot in a .exe. Then I will jump to my code from a function to run my code. Basically, it will be like jumping to ASM or AA code. I don't want to use DLL injection or anything like that. I need to implement my own code inside of an already existing .exe. Does anyone know of a way to do this. Any information would be appreciated. I know C++ and ASM if that helps.

Edit: An example would be adding something like this into the .exe:
Code:

for(int i=0; i<2; i++)
{
    MessageBox(NULL, "Hello", "Alert", MB_OK);
}


That is just an example, but hopefully it gets my point across. Ultimately I want to be able to add a function that connects to a server running on my PC to verify that the .exe should be running. If not, it would then terminate the .exe. It is going to be a form of hack prevention and that is why I don't want an external program.

Edit2: Sorry, I think I figured it out.
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 programming 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