Code:
#include <Windows.h>
int main(int argc, const char* argv[]) {
DWORD dwOffset = 0x00CC0A44;
DWORD dwEnable = 0x00000001;
DWORD dwDisable = 0x00000000;
STARTUPINFO sInfo;
PROCESS_INFORMATION pInfo;
ZeroMemory(&sInfo, sizeof(sInfo));
sInfo.cb = sizeof(sInfo);
ZeroMemory(&pInfo, sizeof(pInfo));
if (CreateProcess(NULL, "WoW.exe", NULL, NULL, FALSE, CREATE_DEFAULT_ERROR_MODE, NULL, NULL, &sInfo, &pInfo)) {
if (WriteProcessMemory(pInfo.hProcess, (LPVOID)dwOffset, &dwEnable, sizeof(dwEnable), NULL)) {
while (true) {
if (GetAsyncKeyState(VK_END)&1) {
WriteProcessMemory(pInfo.hProcess, (LPVOID)dwOffset, &dwDisable, sizeof(dwDisable), NULL);
break;
}
Sleep(1);
}
}
}
CloseHandle(pInfo.hProcess);
CloseHandle(pInfo.hThread);
}
modeleditptr.cpp
Code:
#include <Windows.h>
#include <cstdio>
int main(int argc, const char* argv[]) {
DWORD dwOffset = 0x004020F8;
BYTE bEnable = 0x01;
BYTE bDisable = 0x00;
bool Enabled = true;
STARTUPINFO sInfo;
PROCESS_INFORMATION pInfo;
ZeroMemory(&sInfo, sizeof(sInfo));
sInfo.cb = sizeof(sInfo);
ZeroMemory(&pInfo, sizeof(pInfo));
if (CreateProcess(NULL, "WoW.exe", NULL, NULL, FALSE, CREATE_DEFAULT_ERROR_MODE, NULL, NULL, &sInfo, &pInfo)) {
if (WriteProcessMemory(pInfo.hProcess, (LPVOID)dwOffset, &bEnable, sizeof(bEnable), NULL)){
puts("Press END on your keyboard to disable the fix when prompted and HOME to enable it.r");
puts("Once WoW has finished loading fully please press END then log in.r");
puts("Once logged in (before or after entering the actual realm) press HOME to renable the fix and all model edits.r");
puts("Hopfeully this inconvenience is only temporary, a 'better' fix is being worked on right now.r");
while (true) {
if (Enabled) {
while (true) {
if (GetAsyncKeyState(VK_END)&1) {
WriteProcessMemory(pInfo.hProcess, (LPVOID)dwOffset, &bDisable, sizeof(bDisable), NULL);
puts("Patch disabled");
Enabled = false;
break;
}
Sleep(1);
}
} else {
while (true) {
if (GetAsyncKeyState(VK_HOME)&1) {
WriteProcessMemory(pInfo.hProcess, (LPVOID)dwOffset, &bEnable, sizeof(bEnable), NULL);
puts("Patch enabled");
Enabled = true;
break;
}
Sleep(1);
}
}
Sleep(1);
}
}
}
CloseHandle(pInfo.hProcess);
CloseHandle(pInfo.hThread);
}