[TuT]NOP'ing Memory Hacks

Posts 115 of 66 · Page 1 of 5
[TuT]NOP'ing Memory Hacks
Hey there MPGH, this is my little TUT for those 'new' coders who don't yet know how to NOP Memory hacks.

Alright lets begin.


1) If you are using Gellins base put the following before void cBase::Update (void)
Code:
bool Memoria( void * pDest, char * szPatch, size_t sSize ) 
{ 
DWORD dwOrgProtect = NULL; 
if ( !VirtualProtect ( pDest, sSize, PAGE_EXECUTE_READWRITE, &dwOrgProtect )) 
return FALSE; 
  
memcpy( pDest, szPatch, sSize ); 
VirtualProtect( pDest, sSize, dwOrgProtect, NULL ); 
return TRUE; 
Memoria((LPVOID) (Addies), "\bytes\bytes\bytes\", 3);
Memoria((LPVOID) (Addies), "\bytes\bytes\bytes", 3);
Memoria((LPVOID) (Addies), "\bytes\bytes\bytes\bytes\bytes\bytes\", 6);
Memoria((LPVOID) (Addies), "\bytes\bytes\bytes\", 3);
Memoria((LPVOID) (Addies), "\bytes\bytes\bytes\bytes\bytes\bytes", 6);
}
If you are using your own base, then put it before you put and of the Hack sources.

*Where it says Addies, replace that text with what ever addies you are using.*
**Where it says Bytes, add your bytes**


2) Adding the Memory Hacks to;


A Menu Hack

Code:
if( Menu.mOpt[25].nopt > 0 ){
//No Recoil
Memoria((LPVOID) (Addies), "\bytes\bytes\bytes", 3);			
Memoria((LPVOID) (Addies), "\bytes\bytes\bytes", 3);			
Memoria((LPVOID) (Addies), "\bytes\bytes\bytes\bytes\bytes\bytes", 6);
Memoria((LPVOID) (Addies), "\bytes\bytes\bytes", 3);
}else{
Memoria((LPVOID) (Addies), "\bytes\bytes\bytes", 3);
Memoria((LPVOID) (Addies), "\bytes\bytes\bytes", 3);
Memoria((LPVOID) (Addies), "\bytes\bytes\bytes\bytes\bytes\bytes", 6);
Memoria((LPVOID) (Addies), "\bytes\bytes\bytes", 3);
A Hotkey Hack


Code:
Sleep(50);
if(GetAsyncKeyState(VK_NUMPAD8)<0)
//No Recoil
{
Memoria((LPVOID) (Addies), "\bytes\bytes\bytes", 3);			
Memoria((LPVOID) (Addies), "\bytes\bytes\bytes", 3);			
Memoria((LPVOID) (Addies), "\bytes\bytes\bytes\bytes\bytes\bytes", 6);
Memoria((LPVOID) (Addies), "\bytes\bytes\bytes", 3);
}else{
Memoria((LPVOID) (Addies), "\bytes\bytes\bytes", 3);
Memoria((LPVOID) (Addies), "\bytes\bytes\bytes", 3);
Memoria((LPVOID) (Addies), "\bytes\bytes\bytes\bytes\bytes\bytes", 6);
Memoria((LPVOID) (Addies), "\bytes\bytes\bytes", 3);
}
3)ENJOY


CREDIT PLUS THANK ME
This but ehhh realy do you need to help the "coders"
z0mg good work, but teh n3wbs will still not be able to hack as good as us coders
Quote Originally Posted by mwb1234 View Post
z0mg good work, but teh n3wbs will still not be able to hack as good as us coders
Lol

Nice RageKnight.

BTW mwb I stole this source code from you hotkey base/yea
I'll give credits dont worry.
/me dont leech



Edit: Without VirtualProtect wont this lag alot?
Err, so true but, anyways, still can help people. And zmansquared posted the wrong one, so i decided to post mine
Virtual Protect is there in the source. and if you mean with it, no it does not lag
WoW. Add me on msn, ill explain further
Yeah sorry for that.

And Zoom was saying you need the memoria function but I dont think thats true.
What do you mean?
LOL
When adding a hack to like a menu feature or something, you must have Memoria((LPVOID))______________________________
Did you see this and decide to make a tutorial ?

Anyway, don't copy+paste the function :
Code:
bool Memoria( void * pDest, char * szPatch, size_t sSize ) 
{ 
DWORD dwOrgProtect = NULL; 
if ( !VirtualProtect ( pDest, sSize, PAGE_EXECUTE_READWRITE, &dwOrgProtect )) 
return FALSE; 
  
memcpy( pDest, szPatch, sSize ); 
VirtualProtect( pDest, sSize, dwOrgProtect, NULL ); 
return TRUE; 
Memoria((LPVOID) (Addies), "\bytes\bytes\bytes\", 3);
Memoria((LPVOID) (Addies), "\bytes\bytes\bytes", 3);
Memoria((LPVOID) (Addies), "\bytes\bytes\bytes\bytes\bytes\bytes\", 6);
Memoria((LPVOID) (Addies), "\bytes\bytes\bytes\", 3);
Memoria((LPVOID) (Addies), "\bytes\bytes\bytes\bytes\bytes\bytes", 6);
}
You messed up or something... that might be the whole function except for the last few lines or you could have pasted over, either way you should fix for the C+P noobs.
I didnt mess up.
I have this on mine and worked perfectly fine, i just didnt want to put addies and bytes and stuff.


This is what i have in my base.

Code:
bool Memoria( void * pDest, char * szPatch, size_t sSize ) 
{ 
DWORD dwOrgProtect = NULL; 
if ( !VirtualProtect ( pDest, sSize, PAGE_EXECUTE_READWRITE, &dwOrgProtect )) 
return FALSE; 
  
memcpy( pDest, szPatch, sSize ); 
VirtualProtect( pDest, sSize, dwOrgProtect, NULL ); 
return TRUE; 
			Memoria((LPVOID) (0x3740CEE9), "\x90\x90\x90", 3);
			Memoria((LPVOID) (0x3740CEF8), "\x90\x90\x90", 3);
			Memoria((LPVOID) (0x3740CEFD), "\x90\x90\x90\x90\x90\x90", 6);
			Memoria((LPVOID) (0x3740CF09), "\x90\x90\x90", 3);
			Memoria((LPVOID) (0x37451DC4), "\x90\x90\x90\x90\x90\x90", 6);
}
Quote Originally Posted by RageKnight View Post
I didnt mess up.
I have this on mine and worked perfectly fine, i just didnt want to put addies and bytes and stuff.


This is what i have in my base.

Code:
bool Memoria( void * pDest, char * szPatch, size_t sSize ) 
{ 
DWORD dwOrgProtect = NULL; 
if ( !VirtualProtect ( pDest, sSize, PAGE_EXECUTE_READWRITE, &dwOrgProtect )) 
return FALSE; 
  
memcpy( pDest, szPatch, sSize ); 
VirtualProtect( pDest, sSize, dwOrgProtect, NULL ); 
return TRUE; 
			Memoria((LPVOID) (0x3740CEE9), "\x90\x90\x90", 3);
			Memoria((LPVOID) (0x3740CEF8), "\x90\x90\x90", 3);
			Memoria((LPVOID) (0x3740CEFD), "\x90\x90\x90\x90\x90\x90", 6);
			Memoria((LPVOID) (0x3740CF09), "\x90\x90\x90", 3);
			Memoria((LPVOID) (0x37451DC4), "\x90\x90\x90\x90\x90\x90", 6);
}
You put the function inside the function though. O.O
Shouldn't that keep going forever...

Like :

Code:
void infinite()
{

    infinite();

}

int main()
{

    infinite();

}
Really, damn you mwb
I just have memcpy

Code:
if( Menu.mOpt[11].nopt > 0)
		{
			byte NoRecoilOn1[3] = { 0x90, 0x90, 0x90 };
			byte NoRecoilOn2[3] = { 0x90, 0x90, 0x90 };
			byte NoRecoilOn3[6] = { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 };
			byte NoRecoilOn4[3] = { 0x90, 0x90, 0x90 };
			VirtualProtect((LPVOID)NR1, 3, PAGE_READWRITE, &dwProtect);
			VirtualProtect((LPVOID)NR2, 3, PAGE_READWRITE, &dwProtect);
			VirtualProtect((LPVOID)NR3, 3, PAGE_READWRITE, &dwProtect);
			VirtualProtect((LPVOID)NR4, 3, PAGE_READWRITE, &dwProtect);
			memcpy((PVOID)NR1, (void*)NoRecoilOn1, sizeof(NoRecoilOn2));
			memcpy((PVOID)NR2, (void*)NoRecoilOn2, sizeof(NoRecoilOn2));
			memcpy((PVOID)NR3, (void*)NoRecoilOn3, sizeof(NoRecoilOn3));
			memcpy((PVOID)NR4, (void*)NoRecoilOn4, sizeof(NoRecoilOn4));
			VirtualProtect((LPVOID)NR1, 3, dwProtect, &dwProtect);
			VirtualProtect((LPVOID)NR2, 3, dwProtect, &dwProtect);
			VirtualProtect((LPVOID)NR3, 3, dwProtect, &dwProtect);
			VirtualProtect((LPVOID)NR4, 3, dwProtect, &dwProtect);
there's the on source for mwb's no recoil.
Oh, lol you mean that i put the memoria addies like no recoil and instant reload in the thing as well. no it doesnt go forever, i just put it there as well just in case i lost the codes xD


Oh and mind adding me on msn?
I wanna talk to you
Posts 115 of 66 · Page 1 of 5
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?