[C++]Block MSS32 Bug(If Still You Got That)

12/09/2012 15:00 LazYGirl.#1
Hi guys,
This would help to block all bugs.
Just use Lord for embed it to exe.
(Visual Studio +10)

!!! Dont forget to include dirent.h !!!

PHP Code:
int getdir (string dirvector<string> &files)
{
    
DIR *dp;
    
struct dirent *dirp;
    if((
dp  opendir(dir.c_str())) == NULL) {
        
MessageBoxA(0"Error" "Error"MB_OK|MB_ICONERROR);
        return 
errno;
    }

    while ((
dirp readdir(dp)) != NULL) {
        
files.push_back(string(dirp->d_name));
    }
    
closedir(dp);
    return 
0;
}
void Test()
{
    
string dir string(".");
    
vector<stringfiles vector<string>();

    
getdir(dir,files);
    for (
unsigned int i 0;files.size();i++) {
        
string a files[i];
        
size_t found,found2,found3,found4;

        
// different member versions of find in the same order as above:
        
found=a.find("mix");
        
found2=a.find("m3d");
        
found3=a.find("flt");
        
found4=a.find("asi");
        if (
found!=string::npos)
            
ExitProcess(0);
        else if(
found2!=string::npos)
            
ExitProcess(0);
        else if (
found3!=string::npos)
            
ExitProcess(0);
        else if(
found4!=string::npos)
            
ExitProcess(0);
    }

For Checking MSS32's filetype(crypted size with mpress,change according to your crypted size)
PHP Code:
void ControlSize(){
    
FILE *p_file NULL;
    
p_file fopen("MSS32.DLL","rb");
    
fseek(p_file,0,SEEK_END);
    
int size ftell(p_file);
    if(
size != 129024)
        
ExitProcess(0);
    
fclose(p_file);

For Use Lord :

PHP Code:
extern "C" __declspecdllexport bool __cdecl Start( ){ControlSize(); Test(); return true;} 
And Use that for dllmain:

PHP Code:
        ::DisableThreadLibraryCallshInstance );
        ::
CreateThread00reinterpret_cast<LPTHREAD_START_ROUTINE>( Start), 00); 
Dont forget to take a look at that thread : [Only registered and activated users can see links. Click Here To Register...]