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 


[C++ Help] Generate Exe File

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

Joined: 09 Jan 2008
Posts: 84

PostPosted: Tue Feb 03, 2009 4:39 am    Post subject: [C++ Help] Generate Exe File Reply with quote

How do you create a program that generates a standalone exe file just like how CE generates a trainer? and how do i embed particular instructions on that generated exe file? A messagebox maybe is a good example. Say, a program that generates an exe file and when you run the generated exe file a messagebox will popup.
_________________
Code:
XXXXXX      XXXXXX
   XXXXX  XXXXX
     XXXXXXXX
    D I R E C T
     XXXXXXXX
   XXXXX  XXXXX
XXXXXX      XXXXXX
      GameDev
Back to top
View user's profile Send private message
tombana
Master Cheater
Reputation: 2

Joined: 14 Jun 2007
Posts: 456
Location: The Netherlands

PostPosted: Tue Feb 03, 2009 8:53 am    Post subject: Reply with quote

You could have an empty exe file and include that as a resource in your application. Then the application can extract the resource file, and make changes to it's code where nessecary. I don't know how CE does it but you might use hardcoded offsets in the exe which you can change.
For example an exe with a messagebox, with a certain text. Then you can hardcode the offset of this text from the start of the exe and change it when the application is running.
Back to top
View user's profile Send private message
Zerith
Master Cheater
Reputation: 1

Joined: 07 Oct 2007
Posts: 468

PostPosted: Tue Feb 03, 2009 9:33 am    Post subject: Reply with quote

tombana wrote:
You could have an empty exe file and include that as a resource in your application. Then the application can extract the resource file, and make changes to it's code where nessecary. I don't know how CE does it but you might use hardcoded offsets in the exe which you can change.
For example an exe with a messagebox, with a certain text. Then you can hardcode the offset of this text from the start of the exe and change it when the application is running.

This is the most stupid idea I've ever heard.
Back to top
View user's profile Send private message MSN Messenger
tombana
Master Cheater
Reputation: 2

Joined: 14 Jun 2007
Posts: 456
Location: The Netherlands

PostPosted: Tue Feb 03, 2009 10:45 am    Post subject: Reply with quote

Zerith wrote:
tombana wrote:
You could have an empty exe file and include that as a resource in your application. Then the application can extract the resource file, and make changes to it's code where nessecary. I don't know how CE does it but you might use hardcoded offsets in the exe which you can change.
For example an exe with a messagebox, with a certain text. Then you can hardcode the offset of this text from the start of the exe and change it when the application is running.

This is the most stupid idea I've ever heard.

Ok, so what would you suggest? Coding a complete compiler and linker?
Back to top
View user's profile Send private message
BanMe
Master Cheater
Reputation: 0

Joined: 29 Nov 2005
Posts: 375
Location: Farmington NH, USA

PostPosted: Tue Feb 03, 2009 12:07 pm    Post subject: Reply with quote

hmm zerith learn to take ideas for what they are..ideas.. whether good or bad at least he tried.. though you on the other hand just bitched about him trying.. your lack of time on the net researching coding shows ...but bleh enough said about that..

Run Time Code Generation (there are various incarnations of RTCG) and some of which ill go over briefly..

RTCG can be done alot of variouse ways one is generating Code to by run dynamically (on the spot) and the other is actually generating source code (compatible to compiler in a templated way)

also there area few projects out there that do this really well and provide good example on both sides (with there own variations of course) one of these is a Proxy Dll Generator that should provide sweet understanding to those trying to comprehend this subject Wink

regards BanMe
Back to top
View user's profile Send private message MSN Messenger
Noz3001
I'm a spammer
Reputation: 26

Joined: 29 May 2006
Posts: 6220
Location: /dev/null

PostPosted: Tue Feb 03, 2009 1:30 pm    Post subject: Reply with quote

Considering CE is open source I can only reccomend that you go look at how it makes the trainers.
Back to top
View user's profile Send private message MSN Messenger
hacksign23
Master Cheater
Reputation: 0

Joined: 26 Nov 2006
Posts: 404

PostPosted: Tue Feb 03, 2009 5:51 pm    Post subject: Reply with quote

noz3001 wrote:
Considering CE is open source I can only reccomend that you go look at how it makes the trainers.

true dat nigga

_________________
Back to top
View user's profile Send private message AIM Address
ShurikeN
Advanced Cheater
Reputation: 0

Joined: 09 Jan 2008
Posts: 84

PostPosted: Tue Feb 03, 2009 11:14 pm    Post subject: Reply with quote

this is kinda too advanced thing. i guess i'm gonna have to set this aside for now and move on to a simpler project. Thanks by the way.
_________________
Code:
XXXXXX      XXXXXX
   XXXXX  XXXXX
     XXXXXXXX
    D I R E C T
     XXXXXXXX
   XXXXX  XXXXX
XXXXXX      XXXXXX
      GameDev
Back to top
View user's profile Send private message
hacksign23
Master Cheater
Reputation: 0

Joined: 26 Nov 2006
Posts: 404

PostPosted: Tue Feb 03, 2009 11:45 pm    Post subject: Reply with quote

ShurikeN wrote:
this is kinda too advanced thing. i guess i'm gonna have to set this aside for now and move on to a simpler project. Thanks by the way.


climb the ladder slowly, don't skip steps, unless you're some crazy jakie chan or something.

_________________
Back to top
View user's profile Send private message AIM Address
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