HelpGame Crahsed When Editing Memory Directly

Posts 1–4 of 4 · Page 1 of 1
Game Crahsed When Editing Memory Directly
first,sorry my bad english
WriteProcessMemory Funtion is not work for gg antihack.So i used this code:
Code:
*(DWORD*)0x1111111 = 5;
and then my game is crash,while i'm using this code:
Code:
Y=*(DWORD*)(0xmy address);
sprintf (s,"%d",Y);
MessageBox (0,s,"Doc memory",0);
it's working.

plz tell me how to writeprocessmemory work for it,thanks
//Note: The adress are fake!
#define ADDR_TIME 0x0100579C
#define ADDR_MONEY 0x01005194
DWORD *Time = ADDR_TIME;

PBYTE NOP[] = {0x90,0x90,0x90,0x90,0x90,0x90,0x90};

if(GetAsyncKeyState(VK_NUMPAD1))
{
*(DWORD*)Time = NOP;
*(int*)ADDR_MONEY = 10000000;
}

I hope it help's you .
Could be you're trying to access protected memory. Try this: VirtualProtect function

Code:
DWORD *dwOld;
VirtualProtect( (void*)0xADDRESS,sizeof(DWORD),PAGE_EXECUTE_READWRITE,dwOld );
//...
Quote Originally Posted by KissU View Post
//Note: The adress are fake!
#define ADDR_TIME 0x0100579C
#define ADDR_MONEY 0x01005194
DWORD *Time = ADDR_TIME;

PBYTE NOP[] = {0x90,0x90,0x90,0x90,0x90,0x90,0x90};

if(GetAsyncKeyState(VK_NUMPAD1))
{
*(DWORD*)Time = NOP;
*(int*)ADDR_MONEY = 10000000;
}


I hope it help's you .
i tried to do it,and my game get crashed(i tested it in another process memory).My Code:
Code:
#include "stdafx.h"
#include <Windows.h>
//
#define writetoit 0x0051D3F0
DWORD WINAPI StartAddress(LPVOID lpArgs)
{
while(1)
{

if(GetAsyncKeyState(VK_F6))
{
*(int*)writetoit = 55555;
}


Sleep(100);
}
return 0;
}
BOOL APIENTRY DllMain( HANDLE hModule, 
DWORD ul_reason_for_call, 
LPVOID lpReserved
)
{
if (ul_reason_for_call == DLL_PROCESS_ATTACH)
CreateThread(NULL, NULL, StartAddress, NULL, NULL, NULL); 
return TRUE;
}


Quote Originally Posted by Void View Post
Could be you're trying to access protected memory. Try this: VirtualProtect function

Code:
DWORD *dwOld;
VirtualProtect( (void*)0xADDRESS,sizeof(DWORD),PAGE_EXECUTE_READWRITE,dwOld );
//...
when i test in another process memory,it's working,but in protected memory,my game get crashed too.My Code:
Code:
#include "stdafx.h"
#include <Windows.h>
//
DWORD WINAPI StartAddress(LPVOID lpArgs)
{
long t = 3 ;
unsigned long Protection;
while(1)
{

if(GetAsyncKeyState(VK_F6))
{
BYTE value[] = {0x00, 0xEB, 0x07, 0x8B};
VirtualProtect((void*)0x0051D3F0, sizeof(t), PAGE_READWRITE, &Protection);
memcpy((void*)0x0051D3F0, value, sizeof(t));
VirtualProtect((void*)0x0051D3F0, sizeof(t), Protection, 0);
}


Sleep(100);
}
return 0;
}
BOOL APIENTRY DllMain( HANDLE hModule, 
DWORD ul_reason_for_call, 
LPVOID lpReserved
)
{
if (ul_reason_for_call == DLL_PROCESS_ATTACH)
CreateThread(NULL, NULL, StartAddress, NULL, NULL, NULL); 
return TRUE;
}
how i can do that?,i tried continuous 3 day but nothing changed,plz help me
Posts 1–4 of 4 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?