This article describes the VC + + Plant war zombie Chinese version of the implementation code. Share to everyone for your reference. The specific analysis is as follows:
This is a very simple auxiliary tool, the key is game data analysis, achieved two functions, infinite sunlight and no cooling. Special attention, if the use of VS2008 compiled, debugging is normal, but after the function will be invalid, this is because of openprocess permissions, the need to mention the right, under the VC6 is normal.
void Czhiwudlg::onbnclickedbutton1 ()
{
//Infinite Sunshine code
HWND hjubing;
DWORD LID;
DWORD base = 0x006a9ec0;
DWORD Cunfang;
Hjubing= Findwindowa (NULL, "Plant vs Zombies Chinese version");
GetWindowThreadProcessId (hjubing,&lid);
HANDLE hopen = OpenProcess (process_all_access,0,lid);
ReadProcessMemory (Hopen, (LPVOID) base,&cunfang,4,null);
Base = Cunfang + 0x768;
ReadProcessMemory (Hopen, (LPVOID) base,&cunfang,4,null);
Base = Cunfang + 0x5560;
cunfang=9999;
WriteProcessMemory (Hopen, (LPVOID) base,&cunfang,4,null);
}
void Czhiwudlg::onbnclickedbutton2 ()
{
//No Cooling time code
DWORD LID;
DWORD base = 0x00488e73;
HWND hjubing = Findwindowa (NULL, "Plant vs. Zombie Chinese version");
GetWindowThreadProcessId (Hjubing,&lid); Gets the process id
HANDLE hopen = OpenProcess (process_all_access,null,lid);
Open process get all operation permissions
DWORD Pianyi = 0x80;
WriteProcessMemory (Hopen, (LPVOID) base,&pianyi,1,null);
}
I hope this article describes the VC + + program to help.