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 


Hi there I have a simple question..

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

Joined: 24 Dec 2018
Posts: 20

PostPosted: Mon Dec 24, 2018 12:18 pm    Post subject: Hi there I have a simple question.. Reply with quote

Hi ,I just wanted to ask how to get a static memory address ,even if I can get the static in cheat engine. What will I have to do to make that address
feasible in a c++ program ?

I can post the code of my program, if neccessary.
The problem I think is the pointer type ,because in cheat engine you get the static addresses in form of pointers.

So what could I do to embedd this in my very own c++ program ?

Any help would be dearly appreciated.

I hope you can do that ,

regards,

Denis.
Back to top
View user's profile Send private message Send e-mail
OldCheatEngineUser
Whateven rank
Reputation: 20

Joined: 01 Feb 2016
Posts: 1586

PostPosted: Mon Dec 24, 2018 2:21 pm    Post subject: Reply with quote

process base address + offset, you probably need to read + write to that address.
_________________
About Me;
I Use CE Since Version 1.X, And Still Learning How To Use It Well!
Jul 26, 2020
STN wrote:
i am a sweetheart.
Back to top
View user's profile Send private message Visit poster's website
denismu321
Newbie cheater
Reputation: 0

Joined: 24 Dec 2018
Posts: 20

PostPosted: Tue Dec 25, 2018 9:43 am    Post subject: Hi thank you for responding so fast ;-) Reply with quote

So thanks for answering..

Here are my questions. Would the base address be something like
Doom3BFG.exe+D09F10 and the offsets something like , e.g.
+0x20
+0x3190 ?

Because I cannot figure that out in c++.
Also ,if I want to calculate the Doom3BFG.exe+D09F10 + offsets I never end up at the address that Cheat engine points me to.

Thanks for your help,
and btw have some good holidays...

regards,

Denis.



cheatDoom.PNG
 Description:
just some additional info.
 Filesize:  62.46 KB
 Viewed:  3566 Time(s)

cheatDoom.PNG


Back to top
View user's profile Send private message Send e-mail
OldCheatEngineUser
Whateven rank
Reputation: 20

Joined: 01 Feb 2016
Posts: 1586

PostPosted: Tue Dec 25, 2018 1:51 pm    Post subject: Reply with quote

denismu321 wrote:
Would the base address be something like
Doom3BFG.exe+D09F10

no.
in PE header there is a preferred virtual address base, the default is 00400000.
however some programs have a relocation directory or changed their default base, in this case windows program-loader may load the executable in a different virtual address base.

Code:
if we said default is 00400000, then:
Doom3BFG.exe is the 00400000 as well.

so "Doom3BFG.exe"+D09F10 is:
00400000 + 00D09F10 = 01109F10

your static address is:
01109F10 + 3190 = ??
?? + 20 = your desired address.


you will need at least to:
- open the process
- get the module base address *
- read/write to process memory

* API GetModuleHandle is useful when you inject it into process memory and call it from there, not sure about GetModuleHandleEx.
there is an alternative, which is VirtualQueryEx.

OldCheatEngineUser wrote:
your static address is:
01109F10 + 3190 = ??
?? + 20 = your desired address.

you must sum the static address and the first offset, and then pass it to ReadProcessMemory.
then sum the returned address and the next offset, do the same for every offset you have.

once the desired address is found, you can simply write and/or read it value.

_________________
About Me;
I Use CE Since Version 1.X, And Still Learning How To Use It Well!
Jul 26, 2020
STN wrote:
i am a sweetheart.
Back to top
View user's profile Send private message Visit poster's website
denismu321
Newbie cheater
Reputation: 0

Joined: 24 Dec 2018
Posts: 20

PostPosted: Tue Dec 25, 2018 4:01 pm    Post subject: Hi thank you for answering.. Reply with quote

I am going to provide you with a bit of code I wrote, because I think I can understand, but it still won't work out..

here it is :

DWORD address, address2, address3;

DWORD value1, value2;

address = 0x01109f10 + 0x3190;

ReadProcessMemory(handle, (void *)address, &address2, sizeof(DWORD), 0);
printf("address is now %x\n", address2);

address2 = address2 + 0x20;

ReadProcessMemory(handle, (void *)address2, &value1, sizeof(DWORD), 0);
printf("address is %d\n",value1);

It does not work ,but I think the green static address just said "01109f10".

Here is a picture of the output.



output.PNG
 Description:
 Filesize:  5.19 KB
 Viewed:  3538 Time(s)

output.PNG


Back to top
View user's profile Send private message Send e-mail
OldCheatEngineUser
Whateven rank
Reputation: 20

Joined: 01 Feb 2016
Posts: 1586

PostPosted: Tue Dec 25, 2018 4:37 pm    Post subject: Reply with quote

something is incorrect, and display values as hex.

question, what offset you got first in CE?
also keep in-mind the top offset in CE is the last offset, and the bottom one is the first offset.

and about your second post, im not sure in what order you typed your offsets.

_________________
About Me;
I Use CE Since Version 1.X, And Still Learning How To Use It Well!
Jul 26, 2020
STN wrote:
i am a sweetheart.
Back to top
View user's profile Send private message Visit poster's website
denismu321
Newbie cheater
Reputation: 0

Joined: 24 Dec 2018
Posts: 20

PostPosted: Tue Dec 25, 2018 4:43 pm    Post subject: hi thanks again.. Reply with quote

Here I will provide you with two pictures.
One is cheat engine , the other is the output of the program.

I hope you can tell what's wrong Sad



output-002.PNG
 Description:
 Filesize:  4.82 KB
 Viewed:  3529 Time(s)

output-002.PNG



cheatengine.PNG
 Description:
 Filesize:  82.1 KB
 Viewed:  3529 Time(s)

cheatengine.PNG


Back to top
View user's profile Send private message Send e-mail
OldCheatEngineUser
Whateven rank
Reputation: 20

Joined: 01 Feb 2016
Posts: 1586

PostPosted: Tue Dec 25, 2018 4:54 pm    Post subject: Reply with quote

denismu321 wrote:
I hope you can tell what's wrong

yes, i was wrong.
i wrote what i did not mean, i apologize.

OldCheatEngineUser wrote:
your static address is:
01109F10 + 3190 = ??
?? + 20 = your desired address.

i meant:

01109F10 = ?
? + 3190 = ??
?? + 20 = your desired address.

_________________
About Me;
I Use CE Since Version 1.X, And Still Learning How To Use It Well!
Jul 26, 2020
STN wrote:
i am a sweetheart.
Back to top
View user's profile Send private message Visit poster's website
denismu321
Newbie cheater
Reputation: 0

Joined: 24 Dec 2018
Posts: 20

PostPosted: Tue Dec 25, 2018 5:19 pm    Post subject: Hey ,thanks a lot ,it all worked out Reply with quote

Very Happy

Hey ,thank you very much for your help..
It works now ,so I guess my pointerscan was not so good like I thought.

Here's a picture of the program working now..

Thanks again and have yourself a good time,
kind regards,

Denis.



success.PNG
 Description:
 Filesize:  23.37 KB
 Viewed:  3520 Time(s)

success.PNG


Back to top
View user's profile Send private message Send e-mail
OldCheatEngineUser
Whateven rank
Reputation: 20

Joined: 01 Feb 2016
Posts: 1586

PostPosted: Tue Dec 25, 2018 5:29 pm    Post subject: Reply with quote

enjoy, seems you added couple more offsets.

anyhow, its better to put this in a loop with a hotkey to increase or decrease the value.
or simply freeze it by writing the same value over and over, and if the freeze rate is too high just call sleep function.

_________________
About Me;
I Use CE Since Version 1.X, And Still Learning How To Use It Well!
Jul 26, 2020
STN wrote:
i am a sweetheart.
Back to top
View user's profile Send private message Visit poster's website
denismu321
Newbie cheater
Reputation: 0

Joined: 24 Dec 2018
Posts: 20

PostPosted: Tue Dec 25, 2018 6:10 pm    Post subject: Reply with quote

well I'll do what I can, but for now I am delighted..

Thx,

Denis.

Smile
Back to top
View user's profile Send private message Send e-mail
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