CoolEasier/Neater memory editing

Posts 1–11 of 11 · Page 1 of 1
Easier/Neater memory editing
I got bored and made this class for the lolz (I haven't tested, but I'm nearly positive that it works):
Edit: just realized I forgot to add the reset function - added it in, btw the class is the complicated part, using it is simple
Code:
class memEdit // unsigned long int = dword I just put it like that to point out the obvious
{
	public:
		bool firstTime;
		void easyPoint(memEdit feature, int levels, bool offset,DWORD value, DWORD firstAdress, DWORD = 0, DWORD = 0, DWORD = 0, DWORD = 0, DWORD = 0);
		void reset(memEdit feature);
		void checks(memEdit feature);
	private:
		DWORD finalAdress;
		DWORD originalValue;
		DWORD value;
		bool activated;
		void restart(memEdit feature, DWORD value);
};
Definitions:
Code:
#include "memEdit.h"

void memEdit::easyPoint(memEdit feature, int levels,  bool offset, DWORD value, DWORD firstAdress, DWORD a, DWORD b, DWORD c, DWORD d, DWORD e)
{
	DWORD offsets[6] = {a, b, c, d, e};

	int * i = new int;
	if(offset == false) levels ++;
	DWORD & rFirstAdress = firstAdress;

	for(;  *i < levels - 1; i++)
	{
		rFirstAdress = *(DWORD*)(rFirstAdress + offsets[*i]); //Aderess + offset = pointer. Value of pointer = next adress.	
	}
	if(offset == true)firstAdress = firstAdress + offsets[*i+1];
	
	feature.originalValue = *(DWORD*)firstAdress;
	finalAdress = firstAdress;
	*(DWORD*)firstAdress = value;

	delete i;
	feature.activated = true;
}

void memEdit::reset(memEdit feature)
{
	*(DWORD*)finalAdress = originalValue;
	feature.activated = false;
}
void memEdit::restart(memEdit feature, DWORD value)
{
	*(DWORD*)finalAdress = value;
	feature.activated = true;
}

void memEdit::checks(memEdit feature)
{
	if(feature.activated == true)feature.reset(feature);
	else feature.restart(feature, feature.value);
}
and here is one way to use it: (Using a shotty spread addy for m16 only(not sure if it still works))
Code:
		memEdit shotgunSpread;
		shotgunSpread.firstTime = true;

		if(GetAsyncKeyState(VK_F6))
		{
			if(shotgunSpread.firstTime == true)shotgunSpread.easyPoint(shotgunSpread, 3, true, 5, cshell, 0x00A287A8, 0x64, 834);

			else shotgunSpread.checks(shotgunSpread);
		}
And as far as the function easyPoint goes, it's really quite simple:
levels is the number offsets

if the pointer ends in an offset then it's true, if it ends in a pointer it's false.

value is what you're changing it to, it is a dword by default. (if you want a single byte or something of the sort just do 0xw/e)

first address is where you start from, if you first address is a static pointer, then for your first offset just put 0

everything else are offsets (in order from first to last)

oh and if it isn't obvious reset turns the feature off

edit: I just added the function restart ( didn't put in compiler just typed from the edit prompt so there might be a misspelling or something) it optimized it by lowering the calls to the function easyPoint which is much more intense than restart

edit: Changed void to bool for efficiency (made it four lines shorter)

edit: Switched true and false values for "offset" because I realized it didn't make sense to have it the way I did, now it makes sense (though it worked the other way)

EDIT:Super epic upgrade - I don't know why I didn't think of this in the first place, but now the on and off is automatic you only have to do 3 things to create an infinite (if you want) on/off loop. All you have to do is:
Make an object of my class and set first time to true
call the function easy point and use the instructions above
call checks and put in the name of your object

my class does the rest for you


this can take up to five levels (I'd appreciate if someone tested this for me rotfl)
Jesus, was just tarting to understand CA C++ coding aswell
Quote Originally Posted by Cal View Post
Jesus, was just tarting to understand CA C++ coding aswell
@Cal It might be complicated to understand if your new, but you don't need to. It simplifies the memory editing part so even newbies can use it ( not that being a noob is bad, everyone starts somewhere)
Nice :O Very nice,Spotted a Pro Coder
i will use(with credits ) /Try this in my hack..
anyway its too big to make 1 simple code of ShotgunSpread
There are better ways
the nice thing on this , it is ON/OFF
@CheatCreatorzzz You only have to define the class memEdit once, then you can use it for all your features. It only needs to be 8 lines (on the shotgun spread part) but I added an extra 3 or so to reduce calls to easyPoint that way it's easier on your computer and turns on/off instantly. I know you could just write out the pointer, but this stores the final address and original value in it's object so you don't need to calculate the address twice.
yeah lol thats nice,.. i m testing at home maybe we finish our d3d and add this in it,.. hahaha would be so nice
Quote Originally Posted by Code[VB] View Post
yeah lol thats nice,.. i m testing at home maybe we finish our d3d and add this in it,.. hahaha would be so nice
@Code[VB] rotfl, tell me if it works, I don't have crossfire on this computer atm so I haven't tried it yet. I just made it because I'm learning the OOP part of c++ atm
The biggest advantage to use this is an easy panic key. At the end of your loop you could just add
Code:
shotgunSpread.reset();
blah.reset();
randomFeature.reset();
and vhuallaha all your features are off
Quote Originally Posted by tdct View Post


@Code[VB] rotfl, tell me if it works, I don't have crossfire on this computer atm so I haven't tried it yet. I just made it because I'm learning the OOP part of c++ atm
The biggest advantage to use this is an easy panic key. At the end of your loop you could just add
Code:
shotgunSpread.reset();
blah.reset();
randomFeature.reset();
and vhuallaha all your features are off
@nice.. tdct i have to call ahmed he is the menue coder at the moment,.. becouse i m not at home at the moment too.. and can´t help at the moment.. if i am at home i going to try but thx for this!!!
@Code[VB] lolz I already have his skype cuz I gave him no flash and the addy for a visual weapon hack
AnotherWay Memory Edit...! [Good Job]
I just realized I forgot to to make a reference to variables in my class. You guys need to add that or everything will be out of scope
Posts 1–11 of 11 · Page 1 of 1

Post a Reply

Tags for this Thread

None

Talk with us