I leave the source you'll need to include asm functions in Bytes and not in lines,
hours hookkare remember well the base, especially in "End Scene" sense function
crashes.
*=================/ Added By Infect /====================*/
/ /
*======================/ WriteAsm /=======================* /
void WriteAsm ( void * pxAddress , BYTE * code , int size ) / /
{ / /
unsigned long Protection ; / /
VirtualProtect (( void *) pxAddress , size , PAGE_READWRITE , & Protection ); / /
memcpy (( void *) pxAddress , ( const void *) code , size ) / /
VirtualProtect (( void *) pxAddress , size , Protection , 0 ) / /
} / /
void WriteAuto ( DWORD Addy , DWORD Addy1 ) / /
{ / /
BYTE Base [] = { 0x11 }, / /
ON1 BYTE [] = { 0x84 }, / /
WriteAsm (( void *) Addy , Base , 1 ); / /
WriteAsm (( void *) Addy1 , ON1 , 1 ); / /
} / /
void RestoreAuto ( DWORD Addy2 , DWORD Addy3 ) / /
{ / /
BYTE Base1 [] = { 0x41 }, / /
OFF1 BYTE [] = { 0x85 }, / /
WriteAsm (( void *) Addy2 , Base1 , 1 ); / /
WriteAsm (( void *) Addy3 , OFF1 , 1 ); / /
} / /
*======================/ WriteAsm /=======================* /
This is the function WriteAsm.
Now I pass a couple of functions and make you understand how to include asm write.
First you need the byte *:
/ / BYTE wtwoff [] = {0xd8, 0x4a, 0x08};
/ / BYTE WTW [] = {0x90, 0x90, 0x90, 0x90, 0x90, 0x90};
Now the function:
if ( WTW == 1 )
{
* ( int *) ( ADR_WTW ) = 0 ;
}
But why is not WriteASm? because if it was not a function of assembler us
the way we would go to write, or else instead of 1 or 0 with 0x1 and so on ...
but since now include the assembly and Write
if ( WTW == 1 )
{
const BYTE WTW [ 6 ] = { 0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 }
{
DWORD dwProtect ;
VirtualProtect (( void *) ( ADR_WTW ), 3 , PAGE_EXECUTE_READWRITE , & dwProtect );
memcpy (( void *) ( ADR_WTW ) & WTW , 3 );
VirtualProtect (( void *) ( ADR_WTW ), 3 , dwProtect , NULL );
}
}
else
{
const BYTE wtwoff [ 3 ] = { 0xd8 , 0x4a , 0x08 };
{
DWORD dwProtect ;
VirtualProtect (( void *) ( ADR_WTW ), 3 , PAGE_EXECUTE_READWRITE , & dwProtect );
memcpy (( void *) ( ADR_WTW ) & wtwoff , 3 );
VirtualProtect (( void *) ( ADR_WTW ), 3 , dwProtect , NULL );
}
}
This feature allows you to WalkTroughtWallare written so the walls in the game
Or if we can include QuickPlant
if ( CH_QuickP == 1 )
{
const BYTE QUICKPLANTONBYTE [ 2 ] = { 0xEB , 0x34 };
{
DWORD dwProtect ;
VirtualProtect (( void *) ( ADR_QUICKPLANT ), 3 , PAGE_EXECUTE_READWRITE , & dwProtect );
memcpy (( void *) ( ADR_QUICKPLANT ) & QUICKPLANTONBYTE , 3 );
VirtualProtect (( void *) ( ADR_QUICKPLANT ), 3 , dwProtect , NULL );
}
}
else
{
const BYTE QUICKPLANTOFF [ 2 ] = { 0x7D , 0x16 };
{
DWORD dwProtect ;
VirtualProtect (( void *) ( ADR_QUICKPLANT ), 3 , PAGE_EXECUTE_READWRITE , & dwProtect );
memcpy (( void *) ( ADR_QUICKPLANT ) & QUICKPLANTOFF , 3 );
VirtualProtect (( void *) ( ADR_QUICKPLANT ), 3 , dwProtect , NULL );
}
}
Byte with the following:
QUICKPLANTONBYTE BYTE [] = { 0xEB , 0x34 };
QUICKPLANTOFF BYTE [] = { 0x7D , 0x16 };
When your hack will be provided with Asm Of this, remember
to put the bytes in your detour in SO End Scene menu
asm hookka quietly in your game ... but it can happen
have different problem-hook ... and if you have them, do not include
WriteAsm if you did not know at least basics of C ++...






