Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <windows.h>
- #define dwpLTClient 0x377F4930
- DWORD posptr;
- DWORD posy;
- DWORD playertarget;
- DWORD nom;
- DWORD pos;
- DWORD teleloc;
- DWORD hD3D, adr, *vtbl;
- bool Compare(const BYTE* pData, const BYTE* bMask, const char* szMask)
- {
- for(;*szMask;++szMask,++pData,++bMask)
- if(*szMask=='x' && *pData!=*bMask) return 0;
- return (*szMask) == NULL;
- }
- DWORD Findpattern(DWORD dwAddress,DWORD dwLen,BYTE *bMask,char * szMask)
- {
- for(DWORD i=0; i<dwLen; i++)
- if (Compare((BYTE*)(dwAddress+i),bMask,szMask)) return (DWORD)(dwAddress+i);
- return 0;
- }
- bool IsGameReadyForHook()
- {
- if( GetModuleHandleA( "d3d9.dll" ) != NULL
- && GetModuleHandleA( "ClientFX.fxd" ) != NULL
- && GetModuleHandleA( "CShell.dll" ) != NULL )
- return true;
- return false;
- }
- bool memoria( void * pDest, char * szPatch, size_t sSize ) //Nopping Method
- {
- DWORD dwOrgProtect = NULL;
- if ( !VirtualProtect ( pDest, sSize, PAGE_EXECUTE_READWRITE, &dwOrgProtect ))
- return FALSE;
- memcpy( pDest, szPatch, sSize );
- VirtualProtect( pDest, sSize, dwOrgProtect, NULL );
- return TRUE;
- }
- DWORD Status;
- DWORD superbullets;
- DWORD NoCoilAddy1;
- DWORD NoCoilAddy2;
- DWORD NoCoilAddy3;
- DWORD NoCoilAddy4;
- DWORD NoCoilAddy5;
- DWORD RPP;
- void GetAddresses (void)
- {
- superbullets = Findpattern((DWORD)GetModuleHandleA("CShell.dll"), 0xFFFFFF, (PBYTE)"\x0F\x94\xC0\x5E\xC3\xCC\xCC\xCC\xCC\xCC", "xxxxxxxxxx");
- NoCoilAddy1 = Findpattern((DWORD)GetModuleHandleA("CShell.dll"), 0x900000, (PBYTE)"\xD8\x66\x54\xD9\x5C\x24\x14\xD9\x44\x24\x14\xEB\x02", "xxxxxxxxxxxxx?");
- NoCoilAddy2 = Findpattern((DWORD)GetModuleHandleA("CShell.dll"), 0x900000, (PBYTE)"\xC7\x84\x24\x00\x00\x00\x00\x00\x00\x00\x00\x89\xBC\x24\x00\x00\x00\x00\xC6\x84\x24\x00\x00\x00\x00\x00\x39\x74\x24\x78", "xxx????????xxx????xxx?????xxxx");
- NoCoilAddy3 = Findpattern((DWORD)GetModuleHandleA("CShell.dll"), 0x900000, (PBYTE)"\xD9\x5E\x54\xD9\x46\x48\xD9\xC9\xDC\xC0\xDE\xE9", "xxxxxxxxxxxx");
- NoCoilAddy4 = Findpattern((DWORD)GetModuleHandleA("CShell.dll"), 0x900000, (PBYTE)"\xD9\x46\x48\xD9\xC9\xDC\xC0\xDE\xE9", "xxxxxxxxx");
- NoCoilAddy5 = Findpattern((DWORD)GetModuleHandleA("CShell.dll"), 0x900000, (PBYTE)"\xD9\x5E\x48\xE8\x00\x00\x00\x00\x90", "xxxx????x");
- RPP = Findpattern((DWORD)GetModuleHandleA("CShell.dll"), 0x91F000, (PBYTE)"\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\x00\x00\xFF\xFF", "xxxxxxxxxxxxxx");
- Status = Findpattern((DWORD)GetModuleHandleA("CShell.dll"), 0x97D000, (PBYTE)"\x71\x37\x50\x94\x71\x37", "xxxxxx");
- if(Status)
- {
- Status -= 0xA;
- }
- }
- void __cdecl PTC( const char* szCommand )
- {
- if( !eng.IsReady || dwpLTClient == NULL )
- return;
- DWORD dwConsoleFunc = *( DWORD* )( dwpLTClient + 0x208 );
- DWORD dwRealCallA = ( dwConsoleFunc + 0x26 );//JMP to real func
- DWORD dwRealCallB = *(DWORD*)( dwRealCallA + 0x1 );
- DWORD dwRealCall = ( dwRealCallA + dwRealCallB + 0x5 );
- if( *(BYTE*)dwRealCallA == 0xE9 )
- dwConsoleFunc = dwRealCall;
- __asm
- {
- push szCommand;
- call dwConsoleFunc;
- add esp, 4;
- }
- }
- void main()
- {
- while(true)
- {
- PushToConsole("PerturbRotationEffect 0.000000" );
- PushToConsole("PerturbIncreaseSpeed 0.000000" );
- PushToConsole("PerturbWalkPercent 0.000000" );
- PushToConsole("PerturbFiringIncreaseSpeed 0.000000" );
- PushToConsole("PerturbRecoil 0.000000" );
- PushToConsole("FireMovePerturb 0.000000" );
- PushToConsole("ZoomedFireMoveDuckPerturb 0.000000" );
- PushToConsole("ZoomedFireMovePerturb 0.000000" );
- PushToConsole("ZoomedFireDuckPerturb 0.000000" );
- Sleep(500);
- }}
- DWORD WINAPI dwHackThread(LPVOID) {
- while( !IsGameReadyForHook() )
- Sleep(200);
- main();
- return 0;
- }
- BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
- {
- DisableThreadLibraryCalls(hDll);
- if ( dwReason == DLL_PROCESS_ATTACH )
- CreateThread(NULL,NULL,dwHackThread,NULL,NULL,NULL);
- {
- }
- return TRUE;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement