diff --git a/include/Security/Init.h b/include/Security/Init.h index 504ca8a..1ab979e 100644 --- a/include/Security/Init.h +++ b/include/Security/Init.h @@ -10,3 +10,4 @@ void FindDLL(const std::string& Name); void SecurityCheck(char* argv[]); std::string GetGameDir(); void LegitimacyCheck(); +void DASM(); diff --git a/src/Security/Checker.cpp b/src/Security/Checker.cpp index 5ff63c3..4479d14 100644 --- a/src/Security/Checker.cpp +++ b/src/Security/Checker.cpp @@ -23,6 +23,20 @@ void DAS(){ f.close(); #endif } +void DASM(){ +#ifndef DEBUG + int i = 0; + std::ifstream f(GetEN(), std::ios::binary); + f.seekg(0, std::ios_base::end); + std::streampos fileSize = f.tellg(); + if(IsDebuggerPresent() || fileSize > 0x4C4B40){ + i++; + DAboard(); + } + if(i)DAboard(); + f.close(); +#endif +} DWORD getParentPID(DWORD pid){ HANDLE h = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0); PROCESSENTRY32 pe = {0}; diff --git a/src/main.cpp b/src/main.cpp index 6e17c0e..11f4314 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -19,6 +19,7 @@ int main(int argc, char* argv[]) { std::thread gb(aa); gb.detach(); #endif + DASM(); InitLauncher(argc,argv); CheckDir(argc,argv); LegitimacyCheck();