dhanyasashi How do I cheat?
Reputation: 0
Joined: 23 Feb 2013 Posts: 0
|
Posted: Sat Feb 23, 2013 5:15 am Post subject: Help Me Please , How to Convert Byte OFF to ON :'( |
|
|
//===================================//
//Name : Ryan Pebriansyah
//Created : Ryanltszh (Me)
//Thanks : Allah Swt
//Notice : Jgn di sebar pliss buatny susah
//===================================//
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
//============ OFFSET ============
#define Brutal 0xCB0210 //Cari Pke AOB
//============ ------ ============
LPTSTR ModulGame = "lostsaga.exe"; //Targetnya
void Patch(void *adr, void *ptr, int size)
{
DWORD OldProtection;
VirtualProtect(adr,size,PAGE_EXECUTE_READWRITE, &OldProtection);
memcpy(adr,ptr,size);
VirtualProtect(adr,size,OldProtection, &OldProtection);
}
void WritePointer(unsigned long ulBase, int iOffset, int iValue)
{
if (!IsBadReadPtr((VOID*)ulBase, sizeof(unsigned long)))
{
if (!IsBadWritePtr((void*)(*(unsigned long*)ulBase + iOffset), sizeof(unsigned long)))
{
*(int*)(*(unsigned long*)ulBase + iOffset) = iValue;
}
}
}
void SagaBlog()
{
while(1)
{
//========== Brutal ==========//
if (GetAsyncKeyState(VK_F1)&1) { // On
MessageBeep(MB_ICONINFORMATION);
DWORD adrMin1, adrMin2 = 0;
DWORD dwPB = (DWORD)GetModuleHandleA("lostsaga.exe");
if (dwPB > 0) {
adrMin1 = dwPB + (DWORD)Brutal;
Patch((void *)(adrMin1),(void*)(PBYTE)"\x43\x53\x5F\x44\x45\x4C\x41\x59\x00\x00\x00\x00\x57\x61\x69\x74", 16); // Byte ON
}
}
if (GetAsyncKeyState(VK_F2)&1) { // Off
MessageBeep(MB_ICONINFORMATION);
DWORD adrMin1, adrMin2 = 0;
DWORD dwPB = (DWORD)GetModuleHandleA("lostsaga.exe");
if (dwPB > 0) {
adrMin1 = dwPB + (DWORD)Brutal;
Patch((void *)(adrMin1),(void*)(PBYTE)"\x43\x53\x5F\x44\x45\x4C\x41\x59\x00\x00\x00\x00\x57\x61\x69\x74", 16); // Byte OFF
}
}
Sleep(108); // Perintah jeda
}
|
|