Code:
#include <windows.h>
#include <tlhelp32.h>
#include "PNGlib.h"
#include "resource.h"
#include "dlg_colors.h"
#include "ufmod.h"
BOOL GetProcessList();
void Initialize(HWND hwnd,WPARAM wParam, LPARAM lParam);
void RunGame(HWND hwnd,WPARAM wParam, LPARAM lParam);
void timerCall();
void HookExe();
int update_timer = 70;
char *about =
"2012Shop CSS HACK DETECTED\n"
"Ph4nT0m C0D3s\n"
"\n"
"treinado por google\n"
"No!p";
char *gameFileName = "hl2.exe";
BYTE scoretimerlock = -1;
BYTE spawnfroglock = -1;
BYTE fullbright = -1;
BYTE spawnelephantlock = -1;
BYTE drawmydick = -1;
BYTE fulltime = -1;
HINSTANCE AppInstance;
BOOL GameRunning;
DWORD pid, bytes; HWND hwndWindow; HANDLE hand = NULL;
#define BUTTON_COLOR 0x008C8C00
#define BUTTON_TEXT_COLOR 0x00FFFFFF
#define BUTTON_FRAME_COLOR 0x00FCFEFC
BOOL CALLBACK DialogProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
RECT tmpRect;
switch (message)
{
case WM_INITDIALOG:
Initialize(hwnd,wParam,lParam);
c_MakeOwnerDraw(hwnd,IDC_RUNGAME);
c_MakeOwnerDraw(hwnd,IDC_ABOUTBOX);
c_MakeOwnerDraw(hwnd,IDC_MINIMIZE);
c_MakeOwnerDraw(hwnd,IDC_EXITBUTTON);
c_MakeOwnerDraw(hwnd,IDC_EDIT1);
return TRUE;
case WM_DRAWITEM:
return (c_DrawButtonColor(hwnd,lParam,BUTTON_COLOR,BUTTON_TEXT_COLOR,BUTTON_FRAME_COLOR));
break;
case WM_PAINT:
Ge***ientRect(hwnd, &tmpRect);
break;
case WM_MOUSEMOVE:
if (wParam=1)
{
SendMessageA(hwnd,WM_SYSCOMMAND,0x0F012,0);
}
break;
case WM_COMMAND:
switch (LOWORD(wParam))
{
case IDC_RUNGAME:
RunGame(hwnd,wParam,lParam);
return TRUE;
case IDC_MINIMIZE:
ShowWindow(hwnd,SW_MINIMIZE);
return TRUE;
case IDC_ABOUTBOX:
MessageBox(hwnd,about,"Com ajuda de Mudlord",MB_OK);
return TRUE;
case IDC_EXITBUTTON:
EndDialog (hwnd, 0);
return TRUE;
}
return TRUE;
case WM_DESTROY:
PostQuitMessage(0);
return TRUE;
case WM_CLOSE:
PostQuitMessage(0);
return TRUE;
case WM_TIMER:
timerCall();
return TRUE;
}
return FALSE;
}
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow )
{
AppInstance=hInstance;
DialogBox(hInstance,MAKEINTRESOURCE(IDD_MAINDLG), NULL,DialogProc);
return 0;
}
void Initialize(HWND hwnd,WPARAM wParam, LPARAM lParam) {
GetProcessList();
if(GameRunning==TRUE)
{
GetWindowThreadProcessId(hwndWindow, &pid);
hand = OpenProcess(PROCESS_ALL_ACCESS,0,pid);
SetTimer(hwnd, 1, update_timer, NULL);
}
}
void OpenGame(HWND hwnd)
{
OPENFILENAME ofn;
char szFileName[MAX_PATH] = "";
ZeroMemory(&ofn, sizeof(ofn));
ofn.lStructSize = sizeof(ofn);
ofn.hwndOwner = hwnd;
ofn.lpstrFilter = "hl2 (*.exe)\0*.exe\0";
ofn.lpstrFile = szFileName;
ofn.nMaxFile = MAX_PATH;
ofn.Flags = OFN_EXPLORER | OFN_FILEMUSTEXIST | OFN_HIDEREADONLY;
ofn.lpstrDefExt = "exe";
if(GetOpenFileName(&ofn))
{
PROCESS_INFORMATION pi;
STARTUPINFO si;
memset(&si,0,sizeof(si));
si.cb= sizeof(si);
CreateProcess(NULL, szFileName, NULL, NULL, false, 0, NULL,NULL,&si,&pi);
SetTimer(hwnd, 1, update_timer, NULL);
HookExe();
}
}
int ConfirmLoading(HWND hwnd, LPCSTR lpstrText)
{
int msgboxID = MessageBox(
hwnd,
lpstrText,
"Engine de Mudlords",
MB_ICONEXCLAMATION | MB_YESNO
);
if (msgboxID == IDYES)
{
OpenGame(hwnd);
}
return msgboxID;
}
void RunGame(HWND hwnd,WPARAM wParam, LPARAM lParam)
{
GetProcessList();
if(GameRunning==TRUE)
{
GetWindowThreadProcessId(hwndWindow, &pid);
hand = OpenProcess(PROCESS_ALL_ACCESS,0,pid);
SetTimer(hwnd, 1, update_timer, NULL);
}
else
{
ConfirmLoading(hwnd, "Ja que o jogo ainda nao esta carregado , carregue agora..(se for steam clique no incone do desktop");
}
}
void HookExe()
{
CloseHandle(hand);
GetProcessList( );
GetWindowThreadProcessId(hwndWindow, &pid);
hand = OpenProcess(PROCESS_ALL_ACCESS,0,pid);
}
BOOL GetProcessList( )
{
HANDLE hProcessSnap;
HANDLE hProcess;
PROCESSENTRY32 pe32;
DWORD dwPriorityClass;
int PidTest;
GameRunning=FALSE;
hProcessSnap = CreateToolhelp32Snapshot( TH32CS_SNAPPROCESS, 0 );
if( hProcessSnap == INVALID_HANDLE_VALUE ) return( FALSE );
pe32.dwSize = sizeof( PROCESSENTRY32 );
if( !Process32First( hProcessSnap, &pe32 ) )
{
CloseHandle( hProcessSnap );
return( FALSE );
}
do
{
dwPriorityClass = 0;
hProcess = OpenProcess( PROCESS_ALL_ACCESS, FALSE, pe32.th32ProcessID );
if( hProcess != NULL )
{
dwPriorityClass = GetPriorityClass( hProcess );
if( !dwPriorityClass )
CloseHandle( hProcess );
}
PidTest=strcmp(gameFileName, pe32.szExeFile);
if(PidTest==0){ pid=pe32.th32ProcessID; GameRunning=TRUE;}
} while( Process32Next( hProcessSnap, &pe32 ) );
CloseHandle( hProcessSnap );
return( TRUE );
}
void nicetry (
HANDLE phandle,
LONG minhapica,
int newvalue,
int sizeofbytes)
{
WriteProcessMemory(phandle, (LPVOID)minhapica, (LPVOID) &newvalue, sizeofbytes, 0);
}
void timerCall()
{
HookExe();
if(GetAsyncKeyState(VK_F1))
scoretimerlock*=-1;
if (scoretimerlock == 1)
{
nicetry(hand, 0x204CF694, 0, 4);
nicetry(hand, 0x204F0C24, 1, 4);
nicetry(hand, 0x243B0C9C, 2, 4);
nicetry(hand, 0x2051F774, 1, 4);
nicetry(hand, 0x2051F5C4, 0, 4);
}
if(GetAsyncKeyState(VK_F2))
spawnfroglock*=-1;
if (spawnfroglock == 1)
{
nicetry(hand, 0x204F0C24, 2, 4);
}
if(GetAsyncKeyState(VK_F6))
fulltime*=-1;
if (fulltime == 1)
{
nicetry(hand, 0x204CF694, 1, 4);
nicetry(hand, 0x204F0C24, 0, 4);
nicetry(hand, 0x243B0C9C, 1, 4);
nicetry(hand, 0x2051F774, 0, 4);
nicetry(hand, 0x2051F5C4, 1, 4);
}
}
//bool LoadPNGResource(HWND hWnd, PNGINFO *pPngInfo)
//{
// PNG_LoadResource(pPngInfo, AppInstance, (char*)IDR_PNGDATA);
// PNG_Decode(pPngInfo);
// hPNG = PNG_CreateBitmap(pPngInfo, hWnd, PNG_OUTF_AUTO, false);
// pngWidth = pPngInfo->iWidth;
// pngHeight = pPngInfo->iHeight;
// return true;
//}
//int LoadPNGData(HWND hWnd)
//{
// PNGINFO pngInfo;
// bool bSuccess;
// PNG_Init(&pngInfo);
// bSuccess = LoadPNGResource(hWnd,&pngInfo);
// PNG_Cleanup(&pngInfo);
// return bSuccess ? 0 : -1;
//}
Now i got it into this and im distributing it with a VAC DISABLER....