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 


Offset Problem

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

Joined: 03 Aug 2007
Posts: 4

PostPosted: Fri Aug 03, 2007 8:44 pm    Post subject: Offset Problem Reply with quote

Hi iv been searching for the static pointer for a game
I finaly found the pointer 5 levels from the Address i needed to find but
one of the offsets is a Multiply not an Add like the rest and i dunno how to add this value in the Change Address window when setting up pointers.

Start address (Static Pointer) is 0088BF98 then the offsets are

+4a4
+5c
*4 <-------- How To Add this into an Offset (Hex) box
+74
+720
Back to top
View user's profile Send private message
me
Grandmaster Cheater
Reputation: 2

Joined: 24 Jun 2004
Posts: 733
Location: location location

PostPosted: Fri Aug 03, 2007 8:59 pm    Post subject: Reply with quote

*4 is just used to add 4 bytes

so if the offset reg is holding 1 , the offset is 4x 1 = 4 bytes (32bits)

so 0088BF98+4 = 0088BF9c

if the offset reg is holding 2, the offset is 4x 2 = 88BFA4


its just a shorthand way of adding, instead of manually adding the offsets 4,8,c,01
it multiplies 1,2,3,4 ect by 4 to make up multiples of 4 bytes...




now that has made it as clear as mud eh

_________________
Back to top
View user's profile Send private message
Marble
How do I cheat?
Reputation: 0

Joined: 03 Aug 2007
Posts: 4

PostPosted: Sat Aug 04, 2007 6:09 am    Post subject: Reply with quote

If by Clear as Mud you mean Not Clear at all then yes.


The actual code that reads the address i require is


$Address = 0x0088BF98

$v_Read = _MemRead($OpenProcess, $Address, 4)
$location = HEX($v_Read)
$Address2 = Int('0x' & $location) + 0x000004A4

$v_Read2 = _MemRead($OpenProcess, $Address2, 4)
$location2 = HEX($v_Read2)
$Address3 = Int('0x' & $location2) + 0x0000005C

$v_Read3 = _MemRead($OpenProcess, $Address3, 4)
$location3 = HEX($v_Read3)
$Address4 = Int('0x' & $location3) * 0x00000004 ( This messes up the location and + 0x00000004 doesnt work either what should it be???)

$v_Read4 = _MemRead($OpenProcess, $Address4, 4)
$location4 = HEX($v_Read4)
$Address5 = Int('0x' & $location4) + 0x00000074

$v_Read5 = _MemRead($OpenProcess, $Address5, 4)
$location5 = HEX($v_Read5)
$Address6 = Int('0x' & $location5) + 0x00000720

$ValueNeeded = _MemRead($OpenProcess, $Address6, 4)


what is - offset reg
Back to top
View user's profile Send private message
me
Grandmaster Cheater
Reputation: 2

Joined: 24 Jun 2004
Posts: 733
Location: location location

PostPosted: Sat Aug 04, 2007 10:00 am    Post subject: Reply with quote

well thats not assembly language at all is it, its a high level interperated language ,no wonder you cant see the offset register I was on about


lets say you was using asm and EAX is a register being used at that instant for holding an offset

dec [0088BF98 +EAX*4]

so if [EAX] = 0 then you have ..........0088BF98

if [EAX] = 1...............then you have ..........0088BF9c.........cos its your address plus 1X4

get the idea of what I thought you needed ..

but your using a higher level language that is working the registers for you under the bonnet as they say..

try the general programming section, there might be someone who can tell you what to do there

_________________
Back to top
View user's profile Send private message
Marble
How do I cheat?
Reputation: 0

Joined: 03 Aug 2007
Posts: 4

PostPosted: Sat Aug 04, 2007 11:09 am    Post subject: Reply with quote

Bud Thank You

I didnt understand what you meant untill i just Redid finding the Static pointer.

The found result for what is accesing the address that gives the *4 is

ecx + edi * 4
01A45D60 + 00000009 * 4

00000009 * 4 = 24 so the result ends up 01A45D60 + 24

So when i change the line : $Address4 = Int('0x' & $location3) * 0x00000004

to $Address4 = Int('0x' & $location3) + 24

Everything works and i end up with the result i wanted.



But just to confirm is what i just said correct?
Back to top
View user's profile Send private message
me
Grandmaster Cheater
Reputation: 2

Joined: 24 Jun 2004
Posts: 733
Location: location location

PostPosted: Sat Aug 04, 2007 12:10 pm    Post subject: Reply with quote

yup you got it
_________________
Back to top
View user's profile Send private message
Marble
How do I cheat?
Reputation: 0

Joined: 03 Aug 2007
Posts: 4

PostPosted: Sat Aug 04, 2007 1:15 pm    Post subject: Reply with quote

Excellent Cheers for your help Very Happy
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine 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