// Video tutorial: [URL]http://www.youtube.com/user/vertexbrasil[/URL]
#include "StdAfx.h"
#include <psapi.h>
#pragma comment (lib, "psapi.lib")
int i34;
int main(int argc, _TCHAR* argv[])
{
HWND WinTitle = FindWindowA(NULL,"Mxmain"); //carrega.MainWindowName
cout << "Handle: " << WinTitle << endl;
DWORD cbNeeded;
DWORD processID;
GetWindowThreadProcessId(WinTitle, &processID);
cout << "Process ID: " << processID << endl;
HANDLE handle = OpenProcess(PROCESS_ALL_ACCESS, TRUE, processID);
cout << "Process Handle: " << handle << endl;
HMODULE hMods[1024];
if (EnumProcessModules(handle, hMods, sizeof(hMods), &cbNeeded))
{
for (i34 = 0; i34 < (cbNeeded / sizeof(WinTitle)); i34++)
{
TCHAR szModName[MAX_PATH];
if (GetModuleFileNameEx(handle, hMods[i34], szModName, sizeof(szModName) / sizeof(TCHAR))){
cout << szModName<<endl; // Wide string char thing
//cout << "Entry Number: " << hMods[i34]<<endl; // hMods may be wide string, too, IDK, I didn't use it yet.
//Create Log////////////////////////////////////////////////////////////
int turn_Log_on = 0;
if (turn_Log_on == 1){
ofstream out("GameGuard/szModName.txt", ios::app);
out <<"(strstr(szModName, "<<szModName<<" )) ||"<<endl;
out.close();
}
else
{
if
////////////////////////////////////////////////////////////////////////
(strstr(szModName, "Mxmain.exe") ||
(strstr(szModName, "ntdll.dll")) ||
(strstr(szModName, "kernel32.dll")) ||
(strstr(szModName, "KERNELBASE.dll")) ||
(strstr(szModName, "msvcrt.dll")) ||
(strstr(szModName, "Codex.dll")) ||
(strstr(szModName, "USER32.dll")) ||
(strstr(szModName, "GDI32.dll")) ||
(strstr(szModName, "LPK.dll")) ||
(strstr(szModName, "USP10.dll")) ||
(strstr(szModName, "ADVAPI32.dll")) ||
(strstr(szModName, "sechost.dll")) ||
(strstr(szModName, "RPCRT4.dll")) ||
(strstr(szModName, "SHELL32.dll")) ||
(strstr(szModName, "SHLWAPI.dll")) ||
(strstr(szModName, "IPHLPAPI.DLL")) ||
(strstr(szModName, "NSI.dll")) ||
(strstr(szModName, "WINNSI.DLL")) ||
(strstr(szModName, "WININET.dll")) ||
(strstr(szModName, "urlmon.dll")) ||
(strstr(szModName, "ole32.dll")) ||
(strstr(szModName, "OLEAUT32.dll")) ||
(strstr(szModName, "CRYPT32.dll")) ||
(strstr(szModName, "MSASN1.dll")) ||
(strstr(szModName, "iertutil.dll")) ||
(strstr(szModName, "PSAPI.DLL")) ||
(strstr(szModName, "IMM32.DLL")) ||
(strstr(szModName, "MSCTF.dll"))){
/////////////////////////////////////////
//cout <<"existe"<<endl;
}
else
{
cout <<"nao existe"<<endl;
cout << szModName<<endl; // Wide string char thing
MessageBoxA(NULL,"NEW Scan\n\nInjection!", carrega.Nome_das_Janelas, MB_SERVICE_NOTIFICATION | MB_ICONWARNING);
CloseHandle(handle);
return 0;
}
}
}
}
}
}
void mainx (){
again:
main(0,0);
Sleep (1000);
goto again;
}
void TESTES(){
CreateThread(NULL,NULL,LPTHREAD_START_ROUTINE(mainx),NULL,0,0);
}