Hi guys,i´m having trouble with Xcrap..
What can i do to make my code work before xcrap loads and detects the modification?
VirtualProtections seems not working,even with correct syntax..
Code works a bit of SECONDS of time and xcrap closes game :mad:
Thank you.
What can i do to make my code work before xcrap loads and detects the modification?
VirtualProtections seems not working,even with correct syntax..
Code:
void WriteDWORD(DWORD *adr, int value)
{
DWORD OldProtection;
VirtualProtect((LPVOID)adr,0x01,PAGE_READWRITE,&OldProtection);//VirtualProtect((LPVOID)0x004C374F,1,PAGE_READWRITE,&OldProtection);
*(DWORD*)(adr) = value;//*(DWORD*)(0x004C374F) = 0x01;
VirtualProtect((LPVOID)adr,0x01,OldProtection,&OldProtection);//VirtualProtect((LPVOID)0x004C374F,1,OldProtection,&OldProtection);
}
Code:
while(1)
{
HWND hWnd = FindWindow(0, "Priston Tale");
if(hWnd)
{
GetWindowThreadProcessId(hWnd, &proc_id);
HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, proc_id);
if(hProcess)
{
WriteDWORD((PDWORD)0x004C374F,0x01);
WriteDWORD((PDWORD)0x004C37A7,0x01);
WriteDWORD((PDWORD)0x004C37EC,0x01);
Thank you.