View previous topic :: View next topic |
Author |
Message |
Camey How do I cheat? Reputation: 0
Joined: 16 Feb 2017 Posts: 4
|
Posted: Fri Feb 17, 2017 4:04 am Post subject: [CE] Pointer base address |
|
|
Hi guys!
I'm new in game hacking and this is my first post, so sorry for my stupid question and my bad english!
To train myself, i decided to code a trainer on a single player game (resident evil 7) in C++. But i have some misunderstandings.
I found a base pointer with pointer scan function, but i don't understand how can i use my result in my code.
I don't know why i can't post screenshot but, the pointer base address found is like this: "re7.exe"+070471D8 -> 050CDBC0.
The pointer is right and stay the same after game restart. But my problem is, i don't understand how can i use this address.
Convert "re7.exe" in hex don't work apparently (or i did something wrong?). I think "re7.exe"+070471D8 is equal to green address (static) because it's work after game restart but again, i don't understand how can i deal with that.
My result is may be bad? That means i have to re use pointer scan with using a highter level pointer?
If somebody can help me, thank you in advance! |
|
Back to top |
|
|
STN I post too much Reputation: 42
Joined: 09 Nov 2005 Posts: 2672
|
Posted: Fri Feb 17, 2017 6:32 am Post subject: |
|
|
Use it where? In your program? if yes then grab the base address of module re7.exe, add the offset.
If in CE, click add address > check pointer > type your pointer. _________________
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 457
Joined: 09 May 2003 Posts: 25262 Location: The netherlands
|
|
Back to top |
|
|
Camey How do I cheat? Reputation: 0
Joined: 16 Feb 2017 Posts: 4
|
Posted: Fri Feb 17, 2017 12:12 pm Post subject: |
|
|
Thank you for taking your time to answer me and yes I want to make an external hack.
Thanks to you I am on the right way now and I have a better understanding of the problem.
I did some search about that this afternoon but I have now a new problem, maybe i'm a fool .
In my program, I can found the game window. And i found the Process ID too thanks to that(7644 for example). But when I try to open process (with Window.h) in a handle it doesn't work (handle is always NULL).
So I decided to open the game process manually with CE. And, when i enter "7644" CE doesn't find him. So i suppose PID is wrong? But I don't know how is it possible, can I have miss something?
In all case i'll continue to search a solution because now it's just a development problem and not a misunderstanding (i hope!).
I have an other question. Is it possible that game process hide himself when i use window.h library? Should I try to make a hack on an older game before trying that on a new?
Thank you again guys !
EDIT : I finaly found the problem with openprocess. Handle equals 0 because my program isn't launch in adminastrator. Thanks Windows! (-_-)"
But i still don't understand why the PID returned by my program is not found by CE. |
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 457
Joined: 09 May 2003 Posts: 25262 Location: The netherlands
|
Posted: Fri Feb 17, 2017 3:02 pm Post subject: |
|
|
ce shows the pid in hexadecimal form _________________
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 |
|
|
Camey How do I cheat? Reputation: 0
Joined: 16 Feb 2017 Posts: 4
|
Posted: Sat Feb 18, 2017 10:55 am Post subject: |
|
|
Yes you are right thanks. So PID is true.
I have read yours tutorials and i did some tests. First of all, i made a program who is able to read and write memory of the final address (she is random and change every time after game restart, of course!), it's work fine (after solve some problems) !
Now i want to use base address and offsets to have a static pointer as i said at the beginning.
As STN said, i tried to get base address of module re7.exe. But i think, he is wrong. Every time my program said that to me:
Code: | D:\Games\RE7\re7.exe (0x40000000) |
Now i'll say why i think it's a false result.
On the screen below, you can see the info window of my pointer in CE (sorry i can't post url yet, you have to remove space between "w w w" to access to screenshot; i hope i'll not get a ban for that):
w w w.hostingpics.net/viewer.php?id=610055infoPointer.png
If i remove Offset 0 (= 0x070464E8) in this window, CE said "re7.exe" is equals to 0x300905A4D. You can see that below :
w w w.hostingpics.net/viewer.php?id=522635infoPointer2.png
After some others tests with CE, i realize "re7.exe" is always equals to that address, so i think 0x300905A4D is in fact the true base address. That's why i think 0x40000000 is a false result. I don't know why my program give me that result.
As 0x300905A4D never change, i tried to use this address as the base address. I have follow your tutorial, so i read the value of this address and i add the first offset 0x070464E8 to the result, etc... I link a part of my code below (i don't put him in a loop yet):
Code: | DWORD add = 0x300905A4D;
DWORD res = 0;
ReadProcessMemory(hProcess, (LPCVOID)add, &res, sizeof(res), NULL);
cout << "RES 0 :" << res << endl;
add = res + 0x070464E8;
ReadProcessMemory(hProcess, (LPCVOID)add, &res, sizeof(res), NULL);
cout << "RES 1 :" << res << endl;
add = res + 0x70;
[...]
finalPointerAddress = res + 0x24;
|
I have an output like this, there is obviously an error.
w w w.hostingpics.net/viewer.php?id=325430infoPointer3.png
So i have two questions:
- Why my program give me a false base address? Or it's CE who give me a false base address?
- Why my finalPointerAddress is wrong?
My external hack is x64 and the game module re7.exe is x64 too. So i think DWORD is not the good var to use but i'm not sure.
Can anyone help me to know where is my mistake? or explain to me what i don't understand? I still searching but i don't find a solution yet.
This is my last problem before my first hack work. If he works a day, i think i will probably post my code and explain (in this post) where were my mistakes to help others noobs like me to code a first hack for this game. I think it'll be usefull.
One more time thank you for your help and your patience. |
|
Back to top |
|
|
Camey How do I cheat? Reputation: 0
Joined: 16 Feb 2017 Posts: 4
|
Posted: Sun Feb 19, 2017 4:38 am Post subject: |
|
|
I got it!
The base address of re7.exe module was good in fact. But if i understand, DWORD is a var for 32bits pointer and my game use 64bits pointer so i replace DWORD by DWORD_PTR and it work finaly! I was so retarded.
In my code i did a mistake like that:
DWORD example = baseModuleAddress (baseModuleAddress is in fact a DWORD_PTR).
baseModuleAddress was equals to 0x140000000.
And with my mistake i got example = 0x40000000.
Thank you for your help guys |
|
Back to top |
|
|
|