# SolvedPointers

#### Vyr

##### Newbie
Full Member
I know the basics like hell, but when I see them in hacks like:

C++:
``*(INT*)(*(DWORD*)0x7AC7F0 + 0x55A8) = 3084069;``
I can't break it down to get to it's actual value... It's complex... All I know is the address 0x7AC7F0 is being added to the offset 0x55A8 (I may be wrong if the pointer is pointingÂ to the address of 0x7AC7F0 to get a base address...) It's just so fucking confusing and I'm asking for help...

I can do the shit like:

C++:
``````int x = 10; // Lets say the address of x is 0DE1F89
int* p = &x; // p = the address of x; Â *p = the value that's allocated with the address p store (0DE1F89)

std::cout << p << std::endl << *p << std::endl;

COMPILER:
>0DE1F89
>10``````
Can someone explain or link me somewhere were I can learn how to do this specifically:

C++:
``*(INT*)(*(DWORD*)0x7AC7F0 + 0x55A8) = 3084069;``

#### mambda

Escobar Tier VIP
Trump Tier Donator
When reading in C++, work in reverse.

*(INT*)(*(DWORD*)0x7AC7F0 + 0x55A8) = 3084069;

Look at the type casts first, before anything else too.

*(DWORD*)0x7AC7F0 + ..... , so the first thing they did was dereference that address, and THEN added 0x55A8.

Then, they casted it to an int*, dereferneced it, and set the value to 3084069.

Its the same as doing it the long way around, just easier to write it this way when you get a bit used to it.

#### Vyr

##### Newbie
Full Member

1. I thought it was casts into an INT ?
2. How are you adding *startAddr (the variable/value it's pointing at and not the address) to 0x55A8
3. How does (DWORD*) even works... Why do you have it in parenthesis

#### Rake

1. I thought it was casts into an INT ?
2. How are you adding *startAddr (the variable/value it's pointing at and not the address) to 0x55A8
3. How does (DWORD*) even works... Why do you have it in parenthesis

C++:
``````DWORD * startAddr = 0x7AC7F0;
* is the dereferencing operator when you're reading the code in your head think "the value pointed to by" when you see it
the value in this case is an address stored as a DWORD

https://www.learncpp.com/cpp-tutorial/67-introduction-to-pointers/

(DWORD*) is called typecasting

https://www.learncpp.com/cpp-tutorial/4-4a-explicit-type-conversion-casting/

This can be hard to understand when you're new, just give it time, Good luck!

#### Vyr

##### Newbie
Full Member
Yea been studying C++ for almost 2 months now (20/7 Literally) and I been studying things like memory manipulation, reverse engineering, winapi functions, offesets, and pointers for almost a month.

EDIT: I totally forgot DWORD values store addresses in hex form (0x0000)

Last edited:

#### Vyr

##### Newbie
Full Member
Rake;41554 said:
C++:
``````DWORD * startAddr = 0x7AC7F0;
* is the dereferencing operator when you're reading the code in your head think "the value pointed to by" when you see it
the value in this case is an address stored as a DWORD

https://www.learncpp.com/cpp-tutorial/67-introduction-to-pointers/

(DWORD*) is called typecasting

https://www.learncpp.com/cpp-tutorial/4-4a-explicit-type-conversion-casting/

This can be hard to understand when you're new, just give it time, Good luck!

It makes a lot more sense when you changed
to

Because why would you need to cast it into a DWORD when it's already declared as a DWORD type. The whole point was getting it down to an integer which is now possible since you have an integer typecast which is pointing to the result of *startAddr + 0x55A8 (the base address in other words),

#### Rake

For the record DWORD is a typedef for unsigned int, I believe it will work in the same exact way, therefore nothing wrong with mambda's code

#### mambda

Escobar Tier VIP
Trump Tier Donator
Yea been studying C++ for almost 2 months now (20/7 Literally) and I been studying things like memory manipulation, reverse engineering, winapi functions, offesets, and pointers for almost a month.

EDIT: I totally forgot DWORD values store addresses in hex form (0x0000)
DWORDs dont store addresses in any form, you can view a dword as decimal, or as hexadecimal, its all about how you interpret it, you could keep the addresses you want in decimal and use ints and it'd be fine

#### Vyr

##### Newbie
Full Member
DWORDs dont store addresses in any form, you can view a dword as decimal, or as hexadecimal, its all about how you interpret it, you could keep the addresses you want in decimal and use ints and it'd be fine
What exactly are addresses ? Each cell in RAM can hold up to 1 byte (possibly more depending on your pc) which takes your data and record it in binary (1's and 0's) and is refenced to by the address, but what exactly is the address ?

Last edited:

#### Rake

What exactly are addresses ? Each cell in RAM can hold up to 1 byte (possibly more depending on your pc) which takes your data and record it in binary (1's and 0's) and is refenced to by the address, but what exactly is the address ?

It's all binary, it's either a 1 or a 0 because it's based on the conduction of electricity. If the circuit is closed it's a 1, if the circuit is not closed it's a 0. That is the basis of it all, believe it or not!

Human brains cannot interpret bulk binary data so we represent the same data using hexadecimal. Hexadecimal is only a representation. An address is a way of referencing a location, generally referring to a location in memory. A cell of RAM is a BIT, the smallest denomination of data. Either 0 or 1.

#### mambda

Escobar Tier VIP
Trump Tier Donator
What exactly are addresses ? Each cell in RAM can hold up to 1 byte (possibly more depending on your pc) which takes your data and record it in binary (1's and 0's) and is refenced to by the address, but what exactly is the address ?

To append to what was already said "a hexadecimal" doesn't mean anything its just a notation, thats the same as saying "an octal", "a binary", "a decimal", "a roman numeral", addresses are pretty much the mailbox you open to put bytes into / get bytes out of, and they are expressed as a number, usually read in hexadecimal for ease, but can be read in any other notation

#### rN'

##### Jr.Hacker
Meme Tier VIP
Can someone explain or link me somewhere were I can learn how to do this specifically:
C++:
``*(INT*)(*(DWORD*)0x7AC7F0 + 0x55A8) = 3084069;``
Here is a short example: ( btw: reinterpret_cast > C cast style ^^ )
let's say on 0x7AC7F0 is a pointer to a class (in this example the pointer to the class foo)
C++:
``````class foo
{
private:
public:
int health; // 0x5548
};//Size=0x55AC
auto* pFoo = reinterpret_cast< foo* >( 0x7AC7F0 );

*reinterpret_cast< int* >( pFoo + 0x5548 ) = 3084069;
//is the same as
pFoo->health = 3084069``````

Attention! Before you post:

99% of questions are answered in the Beginner's Guide, do it before asking a question.

No Hack Requests. Post in the correct section.  Search the forum first. Read the rules.

How to make a good post:

• Fill out the form correctly
• Tell us the game name & coding language