#include <windows.h>
void EnableDebugPriv();
int main()
{
//We have to set debug privileges for our app to be allowed to OpenProcess (war3.exe)
EnableDebugPriv();
//Get a Handle on Warcraft III window
HWND hwar3 = FindWindow("Warcraft III",NULL);
if (!hwar3) //If we can't find the window...
{
MessageBox(0, "Run Warcarft III First!", "", MB_OK);
return false;
}
DWORD pid;
GetWindowThreadProcessId(hwar3, &pid);
HANDLE hopen = OpenProcess(PROCESS_ALL_ACCESS, false, pid);
if (!hopen) //Can't open Warcarft III's process.. Must be a PID error.
{
MessageBox(0, "Your getting a PID error, use LoaderZ.", "", MB_OK);
return false;
}
//Now we're ready to change the memory!
//We remember: 6F2A3B91 66:BF 0F00 MOV DI,0x0F
BYTE data[] = {0xBF,0x0F,0x00};
bool success = WriteProcessMemory(hopen,(LPVOID)0x6F2A3B92, &data,3, NULL);
if(success)//Everything worked
{
MessageBox(NULL, "Hack Loaded ", "", MB_OK);
}
else//There was an error!
{
MessageBox(NULL, "Couldn't load hack", "", MB_OK);
}
// Remember to be clean
CloseHandle(hopen);
//Done!
return true;
}
void EnableDebugPriv()
{
HANDLE hToken;
LUID sedebugnameValue;
TOKEN_PRIVILEGES tkp;
OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &hToken);
LookupPrivilegeValue(NULL, SE_DEBUG_NAME, &sedebugnameValue);
tkp.PrivilegeCount = 1;
tkp.Privileges[0].Luid = sedebugnameValue;
tkp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
AdjustTokenPrivileges(hToken, false, &tkp, sizeof tkp, NULL, NULL);
CloseHandle(hToken);
}
September 19, 2009
Disqus Comments
Trending
Label
Antivirus
Automotives
bb themes
blackberry
blackberry themes
blackberry unlock
Blogging
C++
Cosmetic Edits XP
Dota
facebook blackberry
Freewarez
Game Cheat
Headline News
Linux
Lowongan Kerja
Make Money Online
Mobiles
News
PC Games
Php
Phreaking
Recipes
Registry Edit XP
SEO
System Performance Edits for Windows XP
themes
Tips
Tutorials
VBA
Visual Basic
Web Development
Web-Based Game
Whatsapp
Windows
XP Full Tips