Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- ** VAC Bannatron
- ** (c) 2010 TEAM METALSLAVE RAGE CO. All rights reserved.
- **
- ** This is the application version.
- */
- #include <stdio.h>
- #include <conio.h>
- #include <windows.h>
- #include <Tlhelp32.h>
- // The patch code for the decryption function.
- // Once the patch hits, all attempts at decryption fail and fgts get detected ok
- static UINT8 patchcode[] = { 0x33, 0xc0, 0xc3, };
- static UINT32 patch_offset = 0x27EE;
- static UINT32 patch_done = 0;
- void FindAndPatchVac( DWORD steamProcId ) {
- MODULEENTRY32 modEntry;
- HANDLE hSnapShot = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, steamProcId);
- // return and dont do shit ok
- if (!hSnapShot) return;
- modEntry.dwSize = sizeof(MODULEENTRY32);
- BOOL haveModule = Module32First( hSnapShot, &modEntry );
- while ( haveModule ) {
- if ( strstr( modEntry.szModule, ".tmp" ) ){
- // Open that process
- HANDLE hProcess = OpenProcess( PROCESS_ALL_ACCESS, NULL, steamProcId );
- if (hProcess) {
- UINT32 ptr = patch_offset + (UINT32)modEntry.modBaseAddr;
- SIZE_T byteswritten;
- VirtualProtectEx( hProcess, (LPVOID)ptr, 10, PAGE_EXECUTE_READWRITE, NULL );
- WriteProcessMemory( hProcess, (LPVOID)ptr, patchcode, 3, &byteswritten );
- if (byteswritten == 3) {
- patch_done = 1;
- MessageBoxA(NULL, "Hack loaded successfully!", "Success", MB_OK);
- ExitProcess(0);
- } else {
- MessageBoxA(NULL, "Error opening HL2 process", "Error", MB_OK);
- }
- }
- }
- haveModule = Module32Next( hSnapShot, &modEntry);
- }
- }
- void BannatronThread() {
- if ( MessageBoxA(NULL, "Source engine multihack by JG WENTWORTH\nWant to run?","haxens", MB_YESNO) == IDNO ) {
- return;
- }
- //AllocConsole();
- //cprintf("Starting banloop\n");
- //cprintf("Started bannatron thread.\n");
- while(1) {
- HANDLE hSnapShot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
- if (hSnapShot) {
- PROCESSENTRY32 procEntry;
- procEntry.dwSize = sizeof(PROCESSENTRY32);
- // enum through processes, find steam
- BOOL hasProc = Process32First( hSnapShot, &procEntry );
- while (hasProc) {
- if (strstr( procEntry.szExeFile, "Steam.exe" )){
- FindAndPatchVac( procEntry.th32ProcessID );
- }
- hasProc = Process32Next( hSnapShot, &procEntry );
- }
- if (patch_done == 0) {
- if( MessageBoxA(NULL, "Game not running. Launch it and click OK to try again.","Error!",MB_OKCANCEL) == 2) {
- ExitProcess( 0 );
- }
- }
- } else {
- MessageBoxA(NULL,"Startup error.","Error!",MB_OK);
- }
- Sleep(1);
- }
- }
- int CALLBACK WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow ) {
- BannatronThread();
- return 0;
- }
Add Comment
Please, Sign In to add comment