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 


How do you access "somegame.exe"+offset ?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
three0s
How do I cheat?
Reputation: 0

Joined: 21 Aug 2015
Posts: 3

PostPosted: Mon Sep 07, 2015 10:44 pm    Post subject: How do you access "somegame.exe"+offset ? Reply with quote

I was following some basic tutorial on how to write a trainer in C++. And I found my base pointer through pointer scanning.
I got "somegame.exe"+offset as my starting point (followed by few other offsets which I know how they work). Now my question is what is this offset? And how do I access this location in C++? Say I have the handle to the exe, what should be the next step?

Thanks in advance!

Edit:
I think I found how to solve it, would still appreciate if someone can give a detailed solution (or explaination). Thanks.
Back to top
View user's profile Send private message
STN
I post too much
Reputation: 43

Joined: 09 Nov 2005
Posts: 2676

PostPosted: Tue Sep 08, 2015 2:24 am    Post subject: Reply with quote

CreateToolhelp32Snapshot();
ProcessFirst/Next() // Find your game process, in this case somegame.exe
Module32First/Next() ; // To grab the module/game's base address. You can also use this in case the cheat is in a dll not an exe.

The structure (MODULEENTRY32) should contain module's base address, use that and add the offset to it and there goes your cheat address.

That is what CE does, "somegame.exe"+offset is basically "somegame.exe base"+offset.

Hope this helps Wink

_________________
Cheat Requests/Tables- Fearless Cheat Engine
https://fearlessrevolution.com
Back to top
View user's profile Send private message
three0s
How do I cheat?
Reputation: 0

Joined: 21 Aug 2015
Posts: 3

PostPosted: Tue Sep 08, 2015 6:25 am    Post subject: Reply with quote

STN wrote:
CreateToolhelp32Snapshot();
ProcessFirst/Next() // Find your game process, in this case somegame.exe
Module32First/Next() ; // To grab the module/game's base address. You can also use this in case the cheat is in a dll not an exe.

The structure (MODULEENTRY32) should contain module's base address, use that and add the offset to it and there goes your cheat address.

That is what CE does, "somegame.exe"+offset is basically "somegame.exe base"+offset.

Hope this helps Wink

Tyvm !
Back to top
View user's profile Send private message
STN
I post too much
Reputation: 43

Joined: 09 Nov 2005
Posts: 2676

PostPosted: Tue Sep 08, 2015 6:47 am    Post subject: Reply with quote

No problem, glad to be of help Smile
_________________
Cheat Requests/Tables- Fearless Cheat Engine
https://fearlessrevolution.com
Back to top
View user's profile Send private message
lolofdoom
How do I cheat?
Reputation: 0

Joined: 30 Dec 2013
Posts: 5
Location: idk

PostPosted: Fri Oct 23, 2015 4:32 pm    Post subject: Reply with quote

STN wrote:
No problem, glad to be of help Smile

i have the exact same question but in vb, help please? D:

_________________
Doom is Coming... Lol
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
hey
How do I cheat?
Reputation: 0

Joined: 04 Nov 2015
Posts: 4

PostPosted: Wed Nov 04, 2015 12:12 pm    Post subject: Reply with quote

STN wrote:
CreateToolhelp32Snapshot();
ProcessFirst/Next() // Find your game process, in this case somegame.exe
Module32First/Next() ; // To grab the module/game's base address. You can also use this in case the cheat is in a dll not an exe.

The structure (MODULEENTRY32) should contain module's base address, use that and add the offset to it and there goes your cheat address.

That is what CE does, "somegame.exe"+offset is basically "somegame.exe base"+offset.

Hope this helps Wink


How to find base address from my own .exe (c++) application, not by injection dll? I found really nice code here but I cannot get GetModuleBase to work (forum.cheatengine.org/viewtopic.php?t=584686)
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Wed Nov 04, 2015 1:10 pm    Post subject: Reply with quote

lolofdoom wrote:
STN wrote:
No problem, glad to be of help Smile

i have the exact same question but in vb, help please? D:


If you are using Vb.NET or C# you can make use of the Process class seen here:
https://msdn.microsoft.com/en-us/library/system.diagnostics.process(v=vs.110).aspx

It contains everything you need to obtain processes and their modules.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
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