View previous topic :: View next topic |
Author |
Message |
rain-13 Expert Cheater
Reputation: 0
Joined: 18 Mar 2009 Posts: 110
|
Posted: Mon Aug 08, 2011 8:38 am Post subject: how do I set readonly pointer or writable? |
|
|
How do I set readonly pointer or variable writable?
Dark Byte wrote: |
Call VirtualProtectEx to make the memory writable
Or adjust the pe header and change the region to writable
|
I don't understand it very well. What and how I need to do this?:
Or adjust the pe header and change the region to writable
Problem: When I change value of found address or pointer, it get's auto set back by game.
How can I set that value writable? Or how can I find writable version of that address?
|
|
Back to top |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25788 Location: The netherlands
|
Posted: Mon Aug 08, 2011 8:47 am Post subject: |
|
|
why don't you just make use of the data the pointer points to?
Also, is this for a program you are making or using cheatengine? If cheatengine you can rightclick the memory region and choose make writable
If your own just read the msdn entry for virtualprotectex
If you mean that after writing a new value it gets reset then use the debugger and find what writes the value back
_________________
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 |
|
 |
rain-13 Expert Cheater
Reputation: 0
Joined: 18 Mar 2009 Posts: 110
|
Posted: Mon Aug 08, 2011 9:57 am Post subject: |
|
|
to make it clear: I am using Cheat engine.
Dark Byte wrote: |
Also, is this for a program you are making or using cheatengine? If cheatengine you can rightclick the memory region and choose make writable
|
You mean that I click on "Memory view" and then do this? I tried both ways but I can't find make writable option.
Am I doing something wrong?
Quote: | If you mean that after writing a new value it gets reset then use the debugger and find what writes the value back |
For this i "Find out what writes to this address" ? Or should I use anyting else?
With Find out what writes to this address I got following:
It said that probable pointer is 002A9E58 which is already in address list See screenshot above. What causes this and what should I do if this happens?
I also tried "Find out what accesses this address" but still got same probable pointer...
What should I do now? Should I use Add Address Manually with following values?
Code: | EAX=418B1540
EBX=0018FC44
ECX=0018FB94
EDX=00000034
ESI=0018FC38
EDI=002A9E58
ESP=0018FB4C
EBP=0018FB54
EIP=70D1F98F |
Edit: just tried: it worked fine (VirtualProtectEx returned non zero which means it succeed, but game still resets it)
Code: | // winapi.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include "windows.h"
#include <tlhelp32.h>
int _tmain(int argc, _TCHAR* argv[])
{
DWORD dwOldProtect;
HANDLE hProc = OpenProcess(PROCESS_ALL_ACCESS,false,5356);
int a = VirtualProtectEx(hProc, (LPVOID)0x002A9E58 ,4,PAGE_READWRITE, &dwOldProtect);
printf("%d\n",&a);
system("pause");
return 0;
}
|
|
|
Back to top |
|
 |
|