Global extern with Base Pointer ???

Need Help With an Existing Feature in Memory Hacking Software? Ask Here

Moderators: g3nuin3, SpeedWing, WhiteHat, mezzo

Global extern with Base Pointer ???

Postby xplorexxx » Sat Aug 11, 2007 10:30 pm

Hi bro,

How can i initialize a global extern variable at Base Add Pointer + Offset.For ex:

Code: Select all
extern struct NPC Player = {"", [0x00DC9988] + 0xABCD};


This code doesn't work.

Help me please.
xplorexxx
Hackleberry Fin
 
Posts: 20
Joined: Sat Jul 21, 2007 10:48 am

Postby L. Spiro » Sun Aug 12, 2007 10:13 am

Because it is gobal you have to make a structure and initialize as a pointer to that structure.
If it was not global, you would have other options, but this is still the correct solution anyway.



Code: Select all
extern struct BASE {
    BYTE bOffset[0xABCD];
    NPC Player;
} * e_pbBase = { "", 0x00DC9988 };




The BASE structure fills in the offset for you, cleanly putting your NPC structure 0xABCD bytes after the location where 0x00DC9988 points.



L. Spiro
User avatar
L. Spiro
L. Spiro
 
Posts: 3129
Joined: Mon Jul 17, 2006 10:14 pm
Location: Tokyo, Japan

Postby xplorexxx » Sun Aug 12, 2007 11:44 am

Thank bro.
xplorexxx
Hackleberry Fin
 
Posts: 20
Joined: Sat Jul 21, 2007 10:48 am

Postby xplorexxx » Mon Sep 03, 2007 7:43 pm

Hi bro,
How can I initialize a global extern with baseAdd 0x5A60A0 like this:
Code: Select all
[[[[[0x5A60A0]+0x3C]+0x3C]+0x48]+0x4]


Thanks
xplorexxx
Hackleberry Fin
 
Posts: 20
Joined: Sat Jul 21, 2007 10:48 am

Postby L. Spiro » Mon Sep 03, 2007 10:20 pm

Code: Select all
extern struct {
    BYTE    bBuffer[0x3C];
    struct {
        BYTE    bBuffer[0x3C];
        struct {
            BYTE    bBuffer[0x48];
            struct {
                BYTE    bBuffer[0x4];
                PDWORD   pdwVal;
            } * s;
        } * s;
    } * s;
} * e_sObject = { "", 0x5A60A0 };


Accessed via:
Code: Select all
e_sObject->s->s->s->pdwVal;



L. Spiro
User avatar
L. Spiro
L. Spiro
 
Posts: 3129
Joined: Mon Jul 17, 2006 10:14 pm
Location: Tokyo, Japan

Postby xplorexxx » Tue Sep 04, 2007 9:00 am

Thank man very much
xplorexxx
Hackleberry Fin
 
Posts: 20
Joined: Sat Jul 21, 2007 10:48 am


Return to Help

Who is online

Users browsing this forum: No registered users and 0 guests

cron