// Video tutorial: http://www.youtube.com/user/vertexbrasil
#include "StdAfx.h"
#include "BanServer.h"
#define Exe_Name PROCESSENTRY32 *pe32 = GetProcessInfo (carrega.Nome_do_Main)
#define Threads (pe32->cntThreads)
#define Ativa_DC (carrega.Dont_kill_yet)
#define NumeroMinimo (carrega.Minimum_thread)
void Msg_K2_Br(){
MessageBoxA(NULL,"IT-Scan\n\nA integridade do processo foi corrompida!", carrega.Nome_das_Janelas, MB_SERVICE_NOTIFICATION | MB_ICONWARNING);
}
void Msg_K2_En(){
MessageBoxA(NULL, "Thread Scan\n\nThread attack and the game will be closed!", carrega.Nome_das_Janelas, MB_SERVICE_NOTIFICATION | MB_ICONWARNING);
}
void Msg_K3_Page(){
ShellExecute(NULL, "open", carrega.HackSplash_WebSite, NULL, NULL, SW_SHOWNORMAL);
}
void DC2(){
if (carrega.Log_Txt_Hack == 1){
ofstream out("GameGuard/Log.txt", ios::app);
out << "\n !и Warning: ", out << "Thread attack and the game will be closed!";
out.close();
}
if (carrega.Message_Warning_En == 1){
CreateThread(NULL,NULL,LPTHREAD_START_ROUTINE(Msg_K2_En),NULL,0,0);
Sleep(5000);
ExitProcess(0);
}
if (carrega.Message_Warning_En == 2){
CreateThread(NULL,NULL,LPTHREAD_START_ROUTINE(Msg_K2_Br),NULL,0,0);
Sleep(5000);
ExitProcess(0);
}
if (carrega.Message_Warning_En == 3){
CreateThread(NULL,NULL,LPTHREAD_START_ROUTINE(Msg_K3_Page),NULL,0,0);
Sleep(5000);
ExitProcess(0);
}
if (carrega.Message_Warning_En == 0){
ExitProcess(0);
}
else
ExitProcess(0);
}
void Msg_K_Br(){
MessageBoxA(NULL,"AK-Scan\n\nA integridade do processo foi corrompida!", carrega.Nome_das_Janelas, MB_SERVICE_NOTIFICATION | MB_ICONWARNING);
}
void Msg_K_En(){
MessageBoxA(NULL,"AK-Scan\n\nFile Integrity violated!", carrega.Nome_das_Janelas, MB_SERVICE_NOTIFICATION | MB_ICONWARNING);
}
void Msg_K_Page(){
Sleep (4000);
ShellExecute(NULL, "open", carrega.HackSplash_WebSite, NULL, NULL, SW_SHOWNORMAL);
}
void DC(){
if (carrega.Log_Txt_Hack == 1){
ofstream out("GameGuard/Log.txt", ios::app);
out << "\n AK-Scan: ", out << "Thread attack!";
out.close();
}
if (carrega.Log_Txt_Hack == 2){
ofstream out("Up.dll", ios::app);
out << "\n AK-Scan: ", out << "Thread attack!";
out.close();
}
if (carrega.Message_Warning_En == 1){
CreateThread(NULL,NULL,LPTHREAD_START_ROUTINE(Msg_K_En),NULL,0,0);
Sleep(5000);
ExitProcess(0);
}
if (carrega.Message_Warning_En == 2){
CreateThread(NULL,NULL,LPTHREAD_START_ROUTINE(Msg_K_Br),NULL,0,0);
Sleep(5000);
ExitProcess(0);
}
if (carrega.Message_Warning_En == 3){
CreateThread(NULL,NULL,LPTHREAD_START_ROUTINE(Msg_K_Page),NULL,0,0);
Sleep(5000);
ExitProcess(0);
}
if (carrega.Message_Warning_En == 0){
ExitProcess(0);
}
else
ExitProcess(0);
}
PROCESSENTRY32 *GetProcessInfo(char *szExeFile)
{
PROCESSENTRY32 *pe32 = new PROCESSENTRY32
[sizeof(PROCESSENTRY32)];
HANDLE hSnapshot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
if(hSnapshot == INVALID_HANDLE_VALUE)
return NULL;
if(!Process32First(hSnapshot, pe32))
{
CloseHandle(hSnapshot);
return NULL;
}
while(Process32Next( hSnapshot, pe32 ))
{
if( strcmp(szExeFile, pe32->szExeFile) == 0)
{
CloseHandle(hSnapshot);
return pe32;
}
}
return NULL;
}
//A 1///////////////////////////////////////////////////////////////////
void k1(){
Exe_Name;
if ((Ativa_DC == 1) && (Threads < NumeroMinimo)){
DC();
}
}
void A1(){
Sleep (15000);
again:
Sleep (2000);
k1();
goto again;
}
void AntiKill1(){
CreateThread(NULL,NULL,LPTHREAD_START_ROUTINE(A1),NULL,0,0);
}
//A 2///////////////////////////////////////////////////////////////////
void k2(){
Exe_Name;
if ((Ativa_DC == 1) && (Threads < NumeroMinimo)){
DC();
}
}
void A2(){
Sleep (17000);
again:
Sleep (2200);
k2();
goto again;
}
void AntiKill2(){
CreateThread(NULL,NULL,LPTHREAD_START_ROUTINE(A2),NULL,0,0);
}
//A 3///////////////////////////////////////////////////////////////////
void k3(){
Exe_Name;
if ((Ativa_DC == 1) && (Threads < NumeroMinimo)){
DC();
}
}
void A3(){
Sleep (19000);
again:
Sleep (2400);
k3();
goto again;
}
void AntiKill3(){
CreateThread(NULL,NULL,LPTHREAD_START_ROUTINE(A3),NULL,0,0);
}
//A 4///////////////////////////////////////////////////////////////////
void k4(){
Exe_Name;
if ((Ativa_DC == 1) && (Threads < NumeroMinimo)){
DC();
}
}
void A4(){
Sleep (21000);
again:
Sleep (2600);
k4();
goto again;
}
void AntiKill4(){
CreateThread(NULL,NULL,LPTHREAD_START_ROUTINE(A4),NULL,0,0);
}
//A 5///////////////////////////////////////////////////////////////////
void k5(){
Exe_Name;
if ((Ativa_DC == 1) && (Threads < NumeroMinimo)){
DC();
}
}
void A5(){
Sleep (23000);
again:
Sleep (2800);
k5();
goto again;
}
void AntiKill5(){
CreateThread(NULL,NULL,LPTHREAD_START_ROUTINE(A5),NULL,0,0);
}
//A 6 ///////////////////////////////////////////////////////////////////
// This Thread integrates Server_Ban functions
void k6(){
Exe_Name;
if ((Ativa_DC == 1) && (Threads < NumeroMinimo)){
DC();
}
else
{
if(carrega.Server_Ban == 1)
PHP_con(); // Start Ban server autentication
}
}
void A6(){
again:
Sleep(carrega.BanSec_Update_time); // Ban server autentication time
k6();
goto again;
}
void AntiKill6(){
CreateThread(NULL,NULL,LPTHREAD_START_ROUTINE(A6),NULL,0,0);
}
//Detecta Inject by thread count + 1 ///////////////////////////////////////////////////////////////////
void Inject_2(){
Exe_Name;
if ((Ativa_DC == 1) && (Threads > NumeroMinimo )){
DC2();
}
}
void Inject_Thread(){
Sleep (300000); //Wait 5 minutes to thread count stabilizes
again:
Sleep (carrega.DInject_Thread_occours);
Inject_2();
goto again;
}
void DLL_Inject_Thread(){
CreateThread(NULL,NULL,LPTHREAD_START_ROUTINE(Inject_Thread),NULL,0,0);
}