
Originally Posted by
myheart
try this:
SetByte(0x0061AE31, 0x4);
SetByte(0x0061AE81, 0x4);
Thanks does this have to be done with custom .dll only or with ollydbg too?
Code:
#include "Windows.h"
DWORD OldProtect;
DWORD WriteMemory(const LPVOID lpAddress, const LPVOID lpBuf, const UINT uSize)
{
DWORD dwErrorCode = 0;
DWORD dwOldProtect = 0;
int iRes = VirtualProtect(lpAddress, uSize, PAGE_EXECUTE_READWRITE, &dwOldProtect);
if (iRes == 0)
{
dwErrorCode = GetLastError();
return dwErrorCode;
}
memcpy(lpAddress, lpBuf, uSize);
DWORD dwBytes = 0;
iRes = VirtualProtect(lpAddress, uSize, dwOldProtect, &dwBytes);
if (iRes == 0)
{
dwErrorCode = GetLastError();
return dwErrorCode;
}
return 0x00;
}
DWORD SetByte(const LPVOID dwOffset, const BYTE btValue)
{
return WriteMemory(dwOffset, (LPVOID)& btValue, sizeof(BYTE));
}
extern "C" __declspec(dllexport)void Init()
{
if (VirtualProtect(LPVOID(0x401000), 0xD21FFF, PAGE_EXECUTE_READWRITE, &OldProtect))
{
SetByte((PVOID)(0x004030D1 + 3), 6);
}
}

- - - Updated - - -
i changed the 5 to 4 with ollydbg and after loading select character the client closes