ASM Hooker

Posts 19 of 9 · Page 1 of 1
ASM Hooker
Hello guys,
I just made that wonderful function to write in memory :P

Code:
void writer(DWORD address,DWORD bytes, byte opcode)
{
	for (int i  = 0; i < bytes; i++)
	{
		DWORD adr = address+i*1;
		VirtualProtect((LPVOID)adr,1,PAGE_EXECUTE_READWRITE,&oldProtection);
		memcpy((VOID*)adr,&opcode,1);
		VirtualProtect((LPVOID)adr,1,oldProtection,NULL);
	}
}
and to call this use :

Code:
        DWORD cshell = (DWORD)(GetModuleHandleW(L"CShell.dll"));
	DWORD address = (DWORD)(cshell + 0x513D);
	writer(address,1,0x90);
address = the second line from "AntiMemHackThread"...

hope you like it and press thanx if you use
@Jigsaw, @Austin, @Hero, @Royku, @DaRk, @BACKD00R a rename this to ASM Hooker and change it to release , and you can sticky if you like
This could crash the game unless the function isn't called (you NOP PUSH EDI, so the function called after it has AntiMemHackThread as the first parameter and the second parameter is something else).

I wouldn't sticky it, everyone should be able to write such a function.

__

Code:
for (int i  = 0; i < bytes; i++)
{
DWORD adr = address+i*1;
VirtualProtect((LPVOID)adr,1,PAGE_EXECUTE_READWRITE,&oldProtection);
memcpy((VOID*)adr,&opcode,1);
VirtualProtect((LPVOID)adr,1,oldProtection,NULL);
}
->
Code:
VirtualProtect((LPVOID)address,bytes,PAGE_EXECUTE_READWRITE,&oldProtection);
memset((LPVOID)address, opcode, bytes);
VirtualProtect((LPVOID)address,bytes,oldProtection,&oldProtection);
Quote Originally Posted by derh.acker View Post
This could crash the game unless the function isn't called (you NOP PUSH EDI, so the function called after it has AntiMemHackThread as the first parameter and the second parameter is something else).

I wouldn't sticky it, everyone should be able to write such a function.

__

Code:
for (int i  = 0; i < bytes; i++)
{
DWORD adr = address+i*1;
VirtualProtect((LPVOID)adr,1,PAGE_EXECUTE_READWRITE,&oldProtection);
memcpy((VOID*)adr,&opcode,1);
VirtualProtect((LPVOID)adr,1,oldProtection,NULL);
}
->
Code:
VirtualProtect((LPVOID)address,bytes,PAGE_EXECUTE_READWRITE,&oldProtection);
memset((LPVOID)address, opcode, bytes);
VirtualProtect((LPVOID)address,bytes,oldProtection,&oldProtection);
dude it works perfect -.- byt the minnons havent fixed the title ...
Quote Originally Posted by kmanev073 View Post
dude it works perfect -.- byt the minnons havent fixed the title ...
lol you can edit the title yourself
Quote Originally Posted by giniyat101 View Post
lol you can edit the title yourself
no you can only change the title inside the thread... anyway... you like my ASM byteshooker ? there is FOR loop so you can edit a big group of bytes
how this works ?
If you want to hook into memory with another protection than PAGE_EXECUTE_READWRITE, it will be set to PAGE_EXECUTE_READWRITE and it won't get set back (The protection backup is no optional parameter of VirtualProtect)
Good job with this
Might useful to me sometime
Quote Originally Posted by Ryuzaki2 View Post
Good job with this
Might useful to me sometime
i think you need this yo bypass the errors not sure
Posts 19 of 9 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?