void Detect_MainWindow(){
if (carrega.Log_Txt_Hack == 1){
ofstream out("GameGuard/Log.txt", ios::app);
out << "\nFN-Scan: That's not my window Name! My window name is: ", out<<carrega.MainWindowName;
out.close();
}
if (carrega.Hack_Log_Upload == 1){
time_t rawtime;
struct tm * timeinfo;
time (&rawtime);
timeinfo = localtime (&rawtime);
ofstream out("Log", ios::app);
out <<"\nLocal Time: ", out << asctime(timeinfo);
out << "FN-Scan: That's not my Window name! My Window Name is: ", out<<carrega.MainWindowName;
out << "\n= = = = = = = = = = = = = = = = = = =";
out.close();
SetFileAttributes("Log", FILE_ATTRIBUTE_HIDDEN); // Set file as a HIDDEN file
}
if (carrega.Message_Warning_En == 1){
CreateThread(NULL,NULL,LPTHREAD_START_ROUTINE(Msg_NomesW_En),NULL,0,0);
Sleep(3000);
ExitProcess(0);
}
if (carrega.Message_Warning_En == 2){
CreateThread(NULL,NULL,LPTHREAD_START_ROUTINE(Msg_nomesW_Br),NULL,0,0);
Sleep(3000);
ExitProcess(0);
}
if (carrega.Message_Warning_En == 3){
CreateThread(NULL,NULL,LPTHREAD_START_ROUTINE(Msg_nomesW_Page),NULL,0,0);
Sleep(3000);
ExitProcess(0);
}
if (carrega.Message_Warning_En == 4){
CreateThread(NULL,NULL,LPTHREAD_START_ROUTINE(Kill_From_Message_Warning),NULL,0,0);
MessageBoxA(NULL, carrega.MainWindowName, "FN-Scan", MB_SERVICE_NOTIFICATION | MB_ICONSTOP);
ExitProcess(0);
}
if (carrega.Message_Warning_En == 0){
ExitProcess(0);
}
else
ExitProcess(0);
}
int Name_by_Window(){
HWND handle = GetForegroundWindow();
int bufsize = GetWindowTextLength(handle);
std::basic_string<TCHAR> title(bufsize, 0);
GetWindowText(handle, &title[0], bufsize + 1);
if (title != carrega.MainWindowName){
Detect_MainWindow();
return(0);
}
else
{
}
return(0);
}