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 


Help editing a pointer-address (please read..)

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
iPromise
Grandmaster Cheater
Reputation: -1

Joined: 27 Jun 2009
Posts: 529
Location: Canada

PostPosted: Wed Jun 16, 2010 11:21 pm    Post subject: Help editing a pointer-address (please read..) Reply with quote

So I have this pointer with the following offsets:

GunBound.gme+2752B8

Offset #3: 73A
Offset #2: 0
Offset #1: 144

I followed Dark Bytes FAQ on pointers thoroughly leaving me with:

Code:

DWORD GunBound = (DWORD) GetModuleHandle(L"GunBound.gme");

DWORD WindSpeed = ( *(DWORD*) ( *(DWORD*) ( *(DWORD*) ( *(DWORD*) ( *(DWORD*) GunBound ) + 0x2752B8 ) + 0x73A ) + 0x0 ) + 0x144 );


But I am reading from the wrong address and I don't know whats going wrong, i'm reading the 4 bytes, adding the offset, reading the 4 bytes, adding the offset, etc.

Whats wrong?
Back to top
View user's profile Send private message MSN Messenger
Dark Byte
Site Admin
Reputation: 471

Joined: 09 May 2003
Posts: 25832
Location: The netherlands

PostPosted: Wed Jun 16, 2010 11:26 pm    Post subject: Reply with quote

can't be bothered riht now to split this up into seperate lines
Anyhow, ( *(DWORD*) GunBound ) looks really really bad to me (you're reading the 4 byte value from the base address of GunBound.gme+0, which is MZ**)

try at least:
( *(DWORD*) (GunBound + 0x2752B8) )

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
iPromise
Grandmaster Cheater
Reputation: -1

Joined: 27 Jun 2009
Posts: 529
Location: Canada

PostPosted: Wed Jun 16, 2010 11:38 pm    Post subject: Reply with quote

Hmm, trying everything, no luck, tried what you told me:

Code:

DWORD WindSpeed = ( *(DWORD*) ( *(DWORD*) ( *(DWORD*) ( *(DWORD*) (  GunBound + 0x2752B8 ) ) + 0x73A ) + 0x0 ) + 0x144 );


I GET a huge number then a access violation because the address is invalid, something is wrong..
Back to top
View user's profile Send private message MSN Messenger
NoMercy
Master Cheater
Reputation: 1

Joined: 09 Feb 2009
Posts: 289

PostPosted: Thu Jun 17, 2010 12:17 am    Post subject: Reply with quote

Why so difficult, try to find the real adress without GunBound.gme+2752B8. and 1 offset by on, makes it much easier to read.

int x = base + first.
int y = x + second

etc

Also, your brackets are wrong
Back to top
View user's profile Send private message
zile
Advanced Cheater
Reputation: 0

Joined: 11 Jul 2009
Posts: 75

PostPosted: Thu Jun 17, 2010 8:18 am    Post subject: Reply with quote

Code:

DWORD Base = GunBound+2752B8;
DWORD OFF1 = 0x144;
DWORD OFF2 = 0; //NOT NEEDED
DWORD OFF3 = 0x73A;
*(DWORD*)(*(DWORD*)(*(DWORD*)Base + OFF1)+OFF2)+OFF3;

Breaking it down..
first level :
*(DWORD*)Base + OFF1 = A // value of base ( another address ) + offset
second level :
*(DWORD*)A+OFF2 = B // Value of A(another address) + offset
third level:
*(DWORD*)B+OFF3 = C // C is the address you want - same as above - make sure you dont do *(DWORD*)C
Back to top
View user's profile Send private message
Slugsnack
Grandmaster Cheater Supreme
Reputation: 71

Joined: 24 Jan 2007
Posts: 1857

PostPosted: Thu Jun 17, 2010 8:36 am    Post subject: Reply with quote

the funny thing is that wind is a 2 byte value and a level 1 pointer Laughing
Back to top
View user's profile Send private message
iPromise
Grandmaster Cheater
Reputation: -1

Joined: 27 Jun 2009
Posts: 529
Location: Canada

PostPosted: Thu Jun 17, 2010 3:32 pm    Post subject: Reply with quote

Thank you guys for all the help men
Back to top
View user's profile Send private message MSN Messenger
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