Reading pointer from injected dll

01/31/2016 23:06 Rogier55#1
Hey,

So I inject a DLL into a game and i try to read the pointers that i found with CE.

CE address:
[Only registered and activated users can see links. Click Here To Register...]

Code that i tried to get the values with
Code:
HANDLE handle = GetModuleHandleA(0);
DWORD *baseAddress = (DWORD*)handle;
DWORD value = *(DWORD*)(*(DWORD*)baseAddress + 0xE750F4);
But this returns the wrong value

Any ideas?
02/01/2016 08:40 qqdev#2
Try:
DWORD value = *((DWORD*)handle + 0xE750F4);
02/01/2016 08:43 Biesi#3
^ this and are you sure that this one is static?
02/01/2016 10:34 mac'que#4
Quote:
Originally Posted by Rogier55 View Post
Code:
DWORD base = (DWORD)GetModuleHandleA(0);
DWORD val = *(DWORD*)(base + 0xE750F4);
^
02/01/2016 15:09 Jeoni#5
Quote:
Originally Posted by qqdev View Post
Try:
DWORD value = *((DWORD*)handle + 0xE750F4);
This won't work due to pointer arithmetics.

Quote:
Originally Posted by mac'que View Post
Code:
DWORD base = (DWORD)GetModuleHandleA(0);
DWORD val = *(DWORD*)(base + 0xE750F4);
This won't work if you're working in a x64 application.
Why is every god damn newbie (excuse that word, but it was my experience so far) so obsessed with using DWORD as pointer type? Even the winapi does have something like UINT_PTR. In my opinion it's just bad coding style and shows that the programmer didn't make his own basic thoughts and / or has no idea what he is doing and / or is just C&Ping.

With best regards
Jeoni
02/01/2016 21:14 _asm#6
Quote:
Originally Posted by Jeoni View Post
This won't work due to pointer arithmetics.


This won't work if you're working in a x64 application.
Why is every god damn newbie (excuse that word, but it was my experience so far) so obsessed with using DWORD as pointer type? Even the winapi does have something like UINT_PTR. In my opinion it's just bad coding style and shows that the programmer didn't make his own basic thoughts and / or has no idea what he is doing and / or is just C&Ping.

With best regards
Jeoni
^this
I agree with you and I assume these beginners simply watched some crappy YouTube tutorial and c&p the exact same code without understanding the concept behind it (which I noticed quite a lot, especially in this forum).
He should at least have used some C++ casting instead of c-casts for dereferencing like:
Code:
*reinterpret_cast< std::uintptr_t *>(0xDEADBEAF)
02/06/2016 18:11 qqdev#7
Because it is all over the internet :p Better tell how to do it right and leave the other part out.