Im having problem with this part. Say the address is 0078201E and the bytes are 90 90 90, what would I put in that to make Hack1 patch that address to a NOP. Could you mabye fill it in, so I can see how to do it? I learn best that way. Thank you for reading this post!!
BYTE byPatch2[2] = { 0x90,0x90 };//Declare What bytes to patch
BYTE byPatch3[3] = { 0x90,0x90,0x90 };
BYTE byPatch4[4] = { 0x90,0x90,0x90,0x90 };
BYTE byPatch6[6] = { 0x90,0x90,0x90,0x90,0x90,0x90 };
BYTE HackByte1[6] = { 0x00,0x00,0x00,0x00,0x00,0x00 };
BYTE HackByte2[6] = { 0x00,0x00,0x00,0x00,0x00,0x00 };
BYTE HackByte3[6] = { 0x00,0x00,0x00,0x00,0x00,0x00 };
void fMainHacks()//Made Function For Calling Hacks
{
if(iHack1 == 1){Patch(0x01193FA8,&byPatch6,6);}//Patch Function called and The address 0x00000000 is put into
else{Patch(0x01193FA8,&HackByte1,6);}//the parameters along with Which Bytes and how Many
if(iHack2 == 1){Patch(0x00000000,&byPatch6,6);}
else{Patch(0x00000000,&HackByte2,6);}
if(iHack3 == 1){Patch(0x00000000,&byPatch6,6);}
else{Patch(0x00000000,&HackByte3,6);}
}
#include <windows.h>
#include <iostream>//Includes Input Output Stream
using namespace std;//To Avoid STD::
void Patch(int,LPVOID,DWORD);//Prodotype Of Patch Func
char iHack1 = 0;//Declare hack options 1/0
char iHack2 = 0;
char iHack3 = 0;
char iOptionToggle = 0;//Declare Option
char iMenuSelect = 0;
BYTE byPatch2[2] = { 0x90,0x90 };//Declare What bytes to patch
BYTE byPatch3[3] = { 0x90,0x90,0x90 };
BYTE byPatch4[4] = { 0x90,0x90,0x90,0x90 };
BYTE byPatch6[6] = { 0x90,0x90,0x90,0x90,0x90,0x90 };
BYTE HackByte1[6] = { 0x00,0x00,0x00,0x00,0x00,0x00 };
BYTE HackByte2[6] = { 0x00,0x00,0x00,0x00,0x00,0x00 };
BYTE HackByte3[6] = { 0x00,0x00,0x00,0x00,0x00,0x00 };
void fMainHacks()//Made Function For Calling Hacks
{
if(iHack1 == 1){Patch(0x01193FA8,&byPatch6,6);}//Patch Function called and The address 0x00000000 is put into
else{Patch(0x01193FA8,&HackByte1,6);}//the parameters along with Which Bytes and how Many
if(iHack2 == 1){Patch(0x00000000,&byPatch6,6);}
else{Patch(0x00000000,&HackByte2,6);}
if(iHack3 == 1){Patch(0x00000000,&byPatch6,6);}
else{Patch(0x00000000,&HackByte3,6);}
}
void fOptionStatus()//Function for Calling Input of Arrow Keys
{
if(GetAsyncKeyState(VK_RIGHT)&1){iOptionToggle++;}
if(GetAsyncKeyState(VK_LEFT)&1){iOptionToggle--;}
if(iOptionToggle < 0){iOptionToggle++;}//Limits Amount to 1/0
if(iOptionToggle > 1){iOptionToggle--;}
}
void fMenuControls()
{
if(GetAsyncKeyState(VK_DOWN)&1){iMenuSelect++;}
if(GetAsyncKeyState(VK_UP)&1){iMenuSelect--;}
if(iMenuSelect > 2){iMenuSelect--;}
if(iMenuSelect < 0){iMenuSelect++;}
}
int fIfSelected(int iInputint)//Made Func That Takes in Option From Hack
{
if(iMenuSelect == 0){ iOptionToggle = iHack1; fOptionStatus(); iInputint = iHack1 = iOptionToggle;}//Puts Value of Option into iOptionToggle
if(iMenuSelect == 1){ iOptionToggle = iHack2; fOptionStatus(); iInputint = iHack2 = iOptionToggle;}//Then calls the Func For Arrow Keys
if(iMenuSelect == 2){ iOptionToggle = iHack3; fOptionStatus(); iInputint = iHack3 = iOptionToggle;}//Then Puts the Changed value into all
return iInputint;//returns The value
}
void fMenu()//Menu Func
{
cout << "-------------------------------\n";//Looks Purty
cout << " Gen's Base 1.1\n";
cout << "-------------------------------\n";
cout << "\n\n -]Menu Discription \n \n";
iMenuSelect == 0 ? cout << ">" : cout << " ";//Checks If It is selected To Put > or Just a space
if ( iHack1 == 1 )//If Hack Option is On 1 then Say:
{
cout << " Hack1 1.0\n" ;
}
else//If Not Then Say:
{
cout << " Hack1 0.0\n";
}
iMenuSelect == 1 ? cout << ">" : cout << " ";
if ( iHack2 == 1 )
{
cout << " Hack2 1.0\n";
}
else
{
cout << " Hack2 0.0\n";
}
iMenuSelect == 2 ? cout << ">" : cout << " ";
if ( iHack3 == 1 )
{
cout << " Hack3 1.0\n";
}
else
{
cout << " Hack3 0.0\n";
}
}
void fControl()
{
fIfSelected(iHack1);//Throws all Options into If Selected Func
fIfSelected(iHack2);
fIfSelected(iHack3);
}
void fStatus()
{
int i = iMenuSelect + iOptionToggle;//Puts value of iMenuSelect and OptionToggle into i
int k = i;//Puts value of i into k
do{
fControl();//Calls for arrow Keys Funcs
fMenuControls();
i = iMenuSelect + iOptionToggle;//Puts Value int i again
}while(k == i);//Keeps looping until You change value with arrow keys
system("cls");//Clears Screen
}
void fIntro()
{
HWND hWndTarget = FindWindow(NULL,"Step 2");//Gets handle For game Window
cout << "\n\nGen's Base\n";
cout << "Made By SEGnosis\n\n";
if (hWndTarget != 0){cout << "\n\nThank You For Having GameName On";}//Checks if failed
else{cout << "\n\nPlease Turn On GameName";}
Sleep(3000);//pauses for 3 seconds
}
void fFuncCalls()//Calls Funcs
{
fMenu();
fMainHacks();
}
int main(){
SetConsoleTitle( "Gen's Base v1.1" );//Sets Window Title
fIntro();
system("cls");
while(1)//Loops Forever
{
fFuncCalls();
fStatus();
}
return 0;
}
//_________________________Patch Fuction *Special Thanks to Mr.Novacain
void Patch(int nAddress,LPVOID lpvPatch,DWORD dwSize){
DWORD dwProcessID;//will hold the process-id
DWORD dwOldProtect;//will hold the memory access-rights
HANDLE hProcess;//will hold the process-handle
HWND hWndTarget = FindWindow(NULL,"Window Name");//find windows Game window
if(hWndTarget!=0){//if window was found
GetWindowThreadProcessId(hWndTarget,&dwProcessID);//get the process-id
hProcess = OpenProcess(PROCESS_ALL_ACCESS,0,dwProcessID);//get the process-handle from the id
VirtualProtectEx(hProcess,(void*)nAddress,dwSize,PAGE_EXECUTE_READWRITE,&dwOldProtect);//make the memory-space writeable
WriteProcessMemory(hProcess,(void*)nAddress,lpvPatch,dwSize,0);//write the byte-patch
VirtualProtectEx(hProcess,(void*)nAddress,dwSize,dwOldProtect,&dwOldProtect);//write back the original access
CloseHandle(hProcess);//close handle
return;
}
return;
}


Sign In
Create Account

Back to top










