SHARE
TWEET

Untitled

a guest Oct 12th, 2017 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <Windows.h>
  2. #include <iostream>
  3. #include <TlHelp32.h>
  4. #include <fstream>
  5. #include <stdio.h>
  6. #include "MemoryManagment.h"
  7. #include <string>
  8. #include <thread>
  9.  
  10. using namespace std;
  11.  
  12. void SetColour(int ForgC);
  13. void Navigation();
  14. void Switch(int index);
  15. void UpdateMenu();
  16.  
  17. const int IGLOW = 3;
  18. const int IBHOP = 2;
  19. const int IRADAR = 1;
  20. const int ISKIN = 0;
  21.  
  22. int Smoothness = 1;
  23. int M_Index = 0;
  24. int Changes = 0;
  25. int LR = 0;
  26.  
  27.  
  28. bool glow = false;
  29. bool bhop = false;
  30. bool radar = false;
  31. bool skinchanger = false;
  32. bool updated = false;
  33.  
  34. DWORD pid, clientdll, enginedll;
  35. HANDLE csgo_h;
  36.  
  37.  
  38.  
  39. namespace Offsets
  40. {
  41.  
  42.     DWORD localplayer = 0xAAFC3C;
  43.     DWORD entitylist = 0x4A8D05C;
  44.     DWORD flags = 0x100;
  45.     DWORD crosshairid = 0xB294;
  46.     DWORD health = 0xFC;
  47.     DWORD forceattack = 0x2ECF3DC;
  48.     DWORD forcejump = 0x4F23F08;
  49.     DWORD teamnum = 0xF0;
  50.     DWORD dormant = 0xE9;
  51.     DWORD isdefusing = 0x3884;
  52.     DWORD glowobject = 0x4FA9AA8;
  53.     DWORD clientstate = 0x5A5344;
  54.     DWORD glowobjectsize = glowobject + 0xC;
  55.     DWORD bspottedbymask = 0x97C;
  56.     DWORD viewangles = 0x4D10;
  57.     DWORD punchangles = 0x301C;
  58.     DWORD shotsfired = 0xA2A0;
  59.     DWORD clrrender = 0x70;
  60. }
  61.  
  62. namespace sc
  63. {
  64.     bool once = false;
  65.  
  66.     DWORD activewapon = 0x2EE8;
  67.     DWORD fallbackpaintkit = 0x3170;
  68.     DWORD fallbackseed = 0x3174;
  69.     DWORD fallbackwear = 0x3178;
  70.     DWORD fallbackstatrak = 0x317C;
  71.     DWORD itemdefinitionindex = 0x2F88;
  72.     DWORD entityquality = 0x2F8C;
  73.     DWORD myweapons = 0x2DE8;
  74.     DWORD entitylevel = 0x2F90;
  75.     DWORD attributemanager = 0x2D70;
  76.     DWORD itemidhigh = 0x2FA0;
  77.     DWORD item = 0x2DB0;
  78.     DWORD itemidlow = 0x2FA4;
  79.     DWORD ownerhigh = 0x316C;
  80.     DWORD accountid = 0x2FA8;
  81.     DWORD customname = 0x301C;
  82.     DWORD account = 0xA9F8;
  83.     DWORD weaponidoff = 0x0030;
  84.     DWORD originalownerxuidlow = 0x3168;
  85.  
  86. }
  87.  
  88. void getProcess(char* Process)
  89. {
  90.     PROCESSENTRY32 EntryP;
  91.     EntryP.dwSize = sizeof(PROCESSENTRY32);
  92.  
  93.     HANDLE sProc = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
  94.     if (Process32First(sProc, &EntryP)) // retrieve the information about the first process with Process32First
  95.     {
  96.         do
  97.         {
  98.             if (!strcmp(EntryP.szExeFile, Process))
  99.             {
  100.                 pid = EntryP.th32ProcessID;
  101.                 csgo_h = OpenProcess(PROCESS_ALL_ACCESS, false, pid);
  102.                 break;
  103.             }
  104.         } while (Process32Next(sProc, &EntryP)); // keep retrieving information about the next process as long as Process32Next returns a TRUE
  105.     }
  106.  
  107.     if (sProc != INVALID_HANDLE_VALUE)
  108.         CloseHandle(sProc);
  109. }
  110.  
  111. DWORD getModule(LPCSTR Module)
  112. {
  113.  
  114.     MODULEENTRY32 EntryM;
  115.     EntryM.dwSize = sizeof(MODULEENTRY32);
  116.  
  117.     DWORD dwRetn = NULL;
  118.  
  119.     HANDLE hMod = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, pid);
  120.     if (Module32First(hMod, &EntryM))
  121.     {
  122.         do
  123.         {
  124.             if (!strcmp(EntryM.szModule, Module))
  125.             {
  126.                 dwRetn = (DWORD)EntryM.modBaseAddr;
  127.                 break;
  128.             }
  129.         } while (Module32Next(hMod, &EntryM));
  130.     }
  131.  
  132.     if (hMod != INVALID_HANDLE_VALUE)
  133.         CloseHandle(hMod);
  134.  
  135.     return dwRetn;
  136. }
  137.  
  138. enum CSGO_Weapon_ID
  139. {
  140.     weapon_none,
  141.     weapon_deagle,
  142.     weapon_elite,
  143.     weapon_fiveseven,
  144.     weapon_glock,
  145.     weapon_p228,
  146.     weapon_usp,
  147.     weapon_ak47,
  148.     weapon_aug,
  149.     weapon_awp,
  150.     weapon_famas,
  151.     weapon_g3sg1,
  152.     weapon_galil,
  153.     weapon_galilar,
  154.     weapon_m249,
  155.     weapon_m3,
  156.     weapon_m4a1,
  157.     weapon_mac10,
  158.     weapon_mp5navy,
  159.     weapon_p90,
  160.     weapon_scout,
  161.     weapon_sg550,
  162.     weapon_sg552,
  163.     weapon_tmp,
  164.     weapon_ump45,
  165.     weapon_xm1014,
  166.     weapon_bizon,
  167.     weapon_mag7,
  168.     weapon_negev,
  169.     weapon_sawedoff,
  170.     weapon_tec9,
  171.     weapon_taser,
  172.     weapon_hkp2000,
  173.     weapon_mp7,
  174.     weapon_mp9,
  175.     weapon_nova,
  176.     weapon_p250,
  177.     weapon_scar17,
  178.     weapon_scar20,
  179.     weapon_sg556,
  180.     weapon_ssg08,
  181.     weapon_knifegg,
  182.     weapon_knife,
  183.     weapon_flashbang,
  184.     weapon_hegrenade,
  185.     weapon_smokegrenade,
  186.     weapon_molotov,
  187.     weapon_decoy,
  188.     weapon_incgrenade,
  189.     weapon_c4
  190. };
  191.  
  192. struct glowColor
  193. {
  194.     glowColor(float _r, float _g, float _b, float _a)
  195.     {
  196.         r = _r; g = _g; b = _b; a = _a;
  197.     }
  198.     float r, g, b, a;
  199. };
  200.  
  201. struct glowColorSets
  202. {
  203.     glowColorSets(bool _a1, bool _a2, bool _a3)
  204.     {
  205.         a1 = _a1; a2 = _a2; a3 = _a3;
  206.     }
  207.     bool a1, a2, a3;
  208. };
  209.  
  210. struct setChams
  211. {
  212.     setChams(int _r, int _g, int _b, int _a)
  213.     {
  214.         r = _r; g = _g; b = _b; a = _a;
  215.     }
  216.     int r, g, b, a;
  217. };
  218.  
  219. struct Vector
  220. {
  221.     float x;
  222.     float y;
  223.     float z;
  224. };
  225.  
  226. Vector nAngle(Vector angle)
  227. {
  228.     if (angle.x > 89.0f && angle.x <= 180.0f)
  229.     {
  230.         angle.x = 89.0f;
  231.     }
  232.     while (angle.x > 180.f)
  233.     {
  234.         angle.x -= 360.f;
  235.     }
  236.     while (angle.x < -89.0f)
  237.     {
  238.         angle.x = -89.0f;
  239.     }
  240.     while (angle.y > 180.f)
  241.     {
  242.         angle.y -= 360.f;
  243.     }
  244.     while (angle.y < -180.f)
  245.     {
  246.         angle.y += 360.f;
  247.     }
  248.  
  249.     angle.z = 0;
  250.     return angle;
  251. }
  252.  
  253. DWORD localplayerBase()
  254. {
  255.     DWORD lcbase;
  256.     ReadProcessMemory(csgo_h, (LPVOID)(clientdll + Offsets::localplayer), &lcbase, sizeof(lcbase), 0);
  257.     return lcbase;
  258. }
  259.  
  260. DWORD engineBase()
  261. {
  262.     DWORD enginebase;
  263.     ReadProcessMemory(csgo_h, (LPVOID)(enginedll + Offsets::clientstate), &enginebase, sizeof(enginebase), 0);
  264.  
  265.     return enginebase;
  266. }
  267.  
  268. void changevAngle(Vector angle)
  269. {
  270.     if (angle.x >= -89 && angle.x <= 89 && angle.y >= -180 && angle.y <= 180)
  271.     {
  272.         WriteProcessMemory(csgo_h, (LPVOID)(engineBase() + Offsets::viewangles), &angle, sizeof(angle), 0);
  273.     }
  274. }
  275.  
  276. void forceUpdate()
  277. {
  278.     int value = -1;
  279.     WriteProcessMemory(csgo_h, (LPVOID)(engineBase() + /*m_nDeltaTick*/ 0x174), &value, sizeof(value), 0);
  280. }
  281.  
  282. DWORD getWeapon(int i)
  283. {
  284.     DWORD lcbase;
  285.  
  286.     ReadProcessMemory(csgo_h, (LPVOID)(clientdll + Offsets::localplayer), &lcbase, sizeof(lcbase), 0);
  287.  
  288.     if (lcbase)
  289.     {
  290.         DWORD wIndex;
  291.  
  292.         ReadProcessMemory(csgo_h, (LPVOID)(lcbase + sc::myweapons + ((i - 1) * 0x4)), &wIndex, sizeof(wIndex), 0);
  293.         wIndex &= 0xFFFF;
  294.  
  295.         DWORD wEntity;
  296.  
  297.         ReadProcessMemory(csgo_h, (LPVOID)(clientdll + Offsets::entitylist + (wIndex - 1) * 0x10), &wEntity, sizeof(wEntity), 0);
  298.  
  299.         int result;
  300.  
  301.         ReadProcessMemory(csgo_h, (LPVOID)(wEntity + sc::itemdefinitionindex), &result, sizeof(result), 0);
  302.  
  303.  
  304.         return result;
  305.     }
  306. }
  307.  
  308. void printLoading()
  309. {
  310.     MemoryManagment Mem("csgo.exe");
  311.     cout << "> Waiting for csgo!" << endl;
  312.  
  313.     while (!Mem.Initialize()) {
  314.         Sleep(300);
  315.     }
  316.     cout << "> Updating offsets..." << endl;
  317.     Sleep(1300);
  318.     cout << "> Enjoy game!" << endl;
  319.     Sleep(600);
  320. }
  321.  
  322. string bools[2] = { "[OFF]|", "[ON] |" };
  323.  
  324. void SetColour(int ForgC) // got online
  325. {
  326.     WORD wColor;
  327.  
  328.     HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE);
  329.     CONSOLE_SCREEN_BUFFER_INFO csbi;
  330.  
  331.     //We use csbi for the wAttributes word.
  332.     if (GetConsoleScreenBufferInfo(hStdOut, &csbi))
  333.     {
  334.         //Mask out all but the background attribute, and add in the forgournd color
  335.         wColor = (csbi.wAttributes & 0xF0) + (ForgC & 0x0F);
  336.         SetConsoleTextAttribute(hStdOut, wColor);
  337.     }
  338.     return;
  339. }
  340.  
  341. void Navigation()
  342. {
  343.     /*for (;;)*/
  344.     //{
  345.     for (int i = 2; i < 180; i++)
  346.     {
  347.         if (GetAsyncKeyState(i) & 0x8000)
  348.         {
  349.             switch (i)
  350.             {
  351.             case 38: // UP ARROW
  352.                 if (M_Index < 4)
  353.                     M_Index++;
  354.                 Changes++;
  355.                 updated = true;
  356.                 break;
  357.             case 40: // DOWN ARROW
  358.                 if (M_Index > 0)
  359.                     M_Index--;
  360.                 Changes++;
  361.                 updated = true;
  362.                 break;
  363.             case 37: // LEFT ARROW
  364.                 Switch(M_Index);
  365.                 Changes--;
  366.                 LR++;
  367.                 updated = true;
  368.                 break;
  369.             case 39: // RIGHT ARROW
  370.                 Switch(M_Index);
  371.                 Changes++;
  372.                 LR++;
  373.                 updated = true;
  374.                 break;
  375.             }
  376.             Sleep(100);
  377.         }
  378.     }
  379. }
  380.  
  381. void Switch(int index)
  382. {
  383.     if (index == IGLOW)
  384.     {
  385.         glow = !glow;
  386.     }
  387.     if (index == IBHOP)
  388.     {
  389.         bhop = !bhop;
  390.     }
  391.     if (index == IRADAR)
  392.     {
  393.         radar = !radar;
  394.     }
  395.     if (index == ISKIN)
  396.     {
  397.         skinchanger = !skinchanger;
  398.     }
  399. }
  400.  
  401. void UpdateMenu()
  402. {
  403.     int temp = -1;
  404.     /*for (;;)*/
  405.     //{
  406.     if (temp != Changes)
  407.     {
  408.         temp = Changes;
  409.         system("CLS");
  410.         SetColour(15);
  411.         cout << "       >> XYUHACK <<" << endl;
  412.  
  413.         if (M_Index == IGLOW)
  414.         {
  415.            
  416.             SetColour(14);
  417.             cout << " ----------Ba3e1uH---------" << endl;
  418.             cout << "| Glow                " << bools[glow] << endl;
  419.             glow = !glow;
  420.         }
  421.         else
  422.         {
  423.            
  424.             SetColour(15);
  425.             cout << " ------------By------------" << endl;
  426.             cout << "| Glow                " << bools[glow] << endl;
  427.             glow = !glow;
  428.         }
  429.  
  430.         //--------------
  431.  
  432.         if (M_Index == IBHOP)
  433.         {
  434.        
  435.             SetColour(14);
  436.             cout << "| Bhop                " << bools[bhop] << endl;
  437.         }
  438.         else
  439.         {
  440.            
  441.             SetColour(15);
  442.             cout << "| Bhop                " << bools[bhop] << endl;
  443.         }
  444.  
  445.         //--------------
  446.  
  447.         if (M_Index == IRADAR)
  448.         {
  449.            
  450.             SetColour(14);
  451.             cout << "| Radar               " << bools[radar] << endl;
  452.         }
  453.         else
  454.         {
  455.        
  456.             SetColour(15);
  457.             cout << "| Radar               " << bools[radar] << endl;
  458.         }
  459.  
  460.         //--------------
  461.  
  462.         if (M_Index == ISKIN)
  463.         {
  464.            
  465.             SetColour(14);
  466.             cout << "| Skin Changer        " << bools[skinchanger] << endl;
  467.             cout << " -------Special-For--------" << endl;
  468.         }
  469.  
  470.         else
  471.         {
  472.            
  473.             SetColour(15);
  474.             cout << "| Skin Changer        " << bools[skinchanger] << endl;
  475.             cout << " -------Prime-Coding-------" << endl;
  476.         }
  477.  
  478.     }
  479.  
  480.     //}
  481. }
  482.  
  483.  
  484. //void printMenu()
  485. //{
  486. // 
  487. //  cout << "      XYUHACK" << endl;
  488. //  cout << " ------------------" << endl;
  489. //  cout << "| [F1] Glow ESP    |" << endl;
  490. //  cout << "| [F2] Bunnyhop    |" << endl;
  491. //  cout << "| [F3] Radar Hack  |" << endl;
  492. //  cout << "| [F4] Skin Changer|" << endl;
  493. //  cout << " ------------------" << endl;
  494. //  cout << "  </>Prime Coding\n" << endl;
  495. //  cout << "       [LOG]\n" << endl;
  496. //}
  497.  
  498. void doLoop()
  499. {
  500.  
  501.     DWORD glow_dw = 0;
  502.     int glow_entries = 0;
  503.  
  504.     ReadProcessMemory(csgo_h, (LPVOID)(clientdll + Offsets::glowobject), &glow_dw, sizeof(glow_dw), 0);
  505.  
  506.     if (!glow_dw) return;
  507.    
  508.     ReadProcessMemory(csgo_h, (LPVOID)(clientdll + Offsets::glowobjectsize), &glow_entries, sizeof(glow_entries), 0);
  509.  
  510.     for (auto i = 0; i < glow_entries; i++)
  511.     {
  512.         int classid = 0;
  513.         bool edormant = false;
  514.         DWORD buffer_dw = 0;
  515.         DWORD entry_dw = 0;
  516.         DWORD lcbase = 0;
  517.         int myteam = 0;
  518.         int myhealth = 0;
  519.         int eteam = 0;
  520.         int ehealth = 0;
  521.         bool edefusing = false;
  522.  
  523.         ReadProcessMemory(csgo_h, (LPVOID)(glow_dw + (i * 0x38)), &entry_dw, sizeof(entry_dw), 0);
  524.  
  525.         if (!entry_dw) continue;
  526.  
  527.         ReadProcessMemory(csgo_h, (LPVOID)(entry_dw + Offsets::dormant), &edormant, sizeof(edormant), 0);
  528.  
  529.         if (edormant) continue;
  530.  
  531.         ReadProcessMemory(csgo_h, (LPVOID)(entry_dw + 0x8), &buffer_dw, sizeof(buffer_dw), 0);
  532.  
  533.         if (!buffer_dw) continue;
  534.  
  535.         ReadProcessMemory(csgo_h, (LPVOID)(buffer_dw + 0x8), &buffer_dw, sizeof(buffer_dw), 0);
  536.  
  537.         if (!buffer_dw) continue;
  538.  
  539.         ReadProcessMemory(csgo_h, (LPVOID)(buffer_dw + 0x1), &buffer_dw, sizeof(buffer_dw), 0);
  540.  
  541.         if (!buffer_dw) continue;
  542.  
  543.         ReadProcessMemory(csgo_h, (LPVOID)(buffer_dw + 0x14), &classid, sizeof(classid), 0);
  544.  
  545.         if (!classid) continue;
  546.  
  547.         ReadProcessMemory(csgo_h, (LPVOID)(clientdll + Offsets::localplayer), &lcbase, sizeof(lcbase), 0);
  548.  
  549.         if (!lcbase) continue;
  550.  
  551.         ReadProcessMemory(csgo_h, (LPVOID)(lcbase + Offsets::teamnum), &myteam, sizeof(myteam), 0);
  552.  
  553.         ReadProcessMemory(csgo_h, (LPVOID)(lcbase + Offsets::health), &myhealth, sizeof(myhealth), 0);
  554.  
  555.         ReadProcessMemory(csgo_h, (LPVOID)(entry_dw + Offsets::teamnum), &eteam, sizeof(eteam), 0);
  556.  
  557.         ReadProcessMemory(csgo_h, (LPVOID)(entry_dw + Offsets::health), &ehealth, sizeof(ehealth), 0);
  558.  
  559.         ReadProcessMemory(csgo_h, (LPVOID)(entry_dw + Offsets::isdefusing), &edefusing, sizeof(edefusing), 0);
  560.  
  561.         if (glow)
  562.         {
  563.             //Player
  564.             if (classid == 35)
  565.             {
  566.                 if (myteam == 1 || myhealth > 1)
  567.                 {
  568.                     if (eteam == 2) //T
  569.                     {
  570.                         glowColor color(1, 0, 0, 1);
  571.                         glowColorSets settings(true, false, false);
  572.  
  573.                         WriteProcessMemory(csgo_h, (LPVOID)(glow_dw + (i * 0x38) + 0x4), &color, sizeof(color), 0);
  574.                         WriteProcessMemory(csgo_h, (LPVOID)(glow_dw + (i * 0x38) + 0x24), &settings, sizeof(settings), 0);
  575.                     }
  576.                     if (eteam == 3) //CT
  577.                     {
  578.                         glowColor color(0, 0, 1, 1);
  579.                         glowColorSets settings(true, false, false);
  580.  
  581.                         WriteProcessMemory(csgo_h, (LPVOID)(glow_dw + (i * 0x38) + 0x4), &color, sizeof(color), 0);
  582.                         WriteProcessMemory(csgo_h, (LPVOID)(glow_dw + (i * 0x38) + 0x24), &settings, sizeof(settings), 0);
  583.                     }
  584.                 }
  585.                 else
  586.                 {
  587.                     if (eteam == 2) //T
  588.                     {
  589.                         glowColor color(1, 0, 0, 1);
  590.                         glowColorSets settings(true, false, false);
  591.  
  592.                         WriteProcessMemory(csgo_h, (LPVOID)(glow_dw + (i * 0x38) + 0x4), &color, sizeof(color), 0);
  593.                         WriteProcessMemory(csgo_h, (LPVOID)(glow_dw + (i * 0x38) + 0x24), &settings, sizeof(settings), 0);
  594.                     }
  595.                     if (eteam == 3) //CT
  596.                     {
  597.                         glowColor color(0, 0, 1, 1);
  598.                         glowColorSets settings(true, false, false);
  599.  
  600.                         WriteProcessMemory(csgo_h, (LPVOID)(glow_dw + (i * 0x38) + 0x4), &color, sizeof(color), 0);
  601.                         WriteProcessMemory(csgo_h, (LPVOID)(glow_dw + (i * 0x38) + 0x24), &settings, sizeof(settings), 0);
  602.                     }
  603.                 }
  604.             }
  605.  
  606.             //Bomb || C4
  607.             if (classid == 29 || classid == 108)
  608.             {
  609.                 glowColor color(1, 1, 0, 0.8);
  610.                 glowColorSets settings(true, false, false);
  611.  
  612.                 WriteProcessMemory(csgo_h, (LPVOID)(glow_dw + (i * 0x38) + 0x4), &color, sizeof(color), 0);
  613.                 WriteProcessMemory(csgo_h, (LPVOID)(glow_dw + (i * 0x38) + 0x24), &settings, sizeof(settings), 0);
  614.  
  615.             }
  616.  
  617.             //Flashbang
  618.             if (classid == 9)
  619.             {
  620.                 glowColor color(0, 0, 1, 0.8);
  621.                 glowColorSets settings(true, false, false);
  622.  
  623.                 WriteProcessMemory(csgo_h, (LPVOID)(glow_dw + (i * 0x38) + 0x4), &color, sizeof(color), 0);
  624.                 WriteProcessMemory(csgo_h, (LPVOID)(glow_dw + (i * 0x38) + 0x24), &settings, sizeof(settings), 0);
  625.             }
  626.  
  627.             //Weapons
  628.             if (classid == 1 || classid == 39 || classid >= 204 && classid <= 244)
  629.             {
  630.                 glowColor color(1, 0.5, 0, 0.8);
  631.                 glowColorSets settings(true, false, false);
  632.  
  633.                 WriteProcessMemory(csgo_h, (LPVOID)(glow_dw + (i * 0x38) + 0x4), &color, sizeof(color), 0);
  634.                 WriteProcessMemory(csgo_h, (LPVOID)(glow_dw + (i * 0x38) + 0x24), &settings, sizeof(settings), 0);
  635.             }
  636.         }
  637.  
  638.         if (radar)
  639.         {
  640.             if (myteam != eteam)
  641.             {
  642.                 bool bspotted;
  643.                 bool value = true;
  644.  
  645.                 ReadProcessMemory(csgo_h, (LPVOID)(entry_dw + Offsets::bspottedbymask), &bspotted, sizeof(bspotted), 0);
  646.  
  647.                 if (!bspotted)
  648.                     WriteProcessMemory(csgo_h, (LPVOID)(entry_dw + Offsets::bspottedbymask), &value, sizeof(value), 0);
  649.             }
  650.         }
  651.     }
  652. }
  653.  
  654. void doTriggerbot()
  655. {
  656.     if (GetAsyncKeyState(0x06) & 0x8000)
  657.     {
  658.         DWORD lcbase, entity;
  659.         int myteam, eteam, inc;
  660.  
  661.         int value = 6;
  662.  
  663.         ReadProcessMemory(csgo_h, (LPVOID)(clientdll + Offsets::localplayer), &lcbase, sizeof(lcbase), 0);
  664.  
  665.         if (!lcbase) return;
  666.  
  667.         ReadProcessMemory(csgo_h, (LPVOID)(lcbase + Offsets::crosshairid), &inc, sizeof(inc), 0);
  668.         ReadProcessMemory(csgo_h, (LPVOID)(lcbase + Offsets::teamnum), &myteam, sizeof(myteam), 0);
  669.        
  670.         ReadProcessMemory(csgo_h, (LPVOID)(clientdll + Offsets::entitylist + (0x10 * (inc - 1))), &entity, sizeof(entity), 0);
  671.  
  672.         if (!entity) return;
  673.  
  674.         ReadProcessMemory(csgo_h, (LPVOID)(entity + Offsets::teamnum), &eteam, sizeof(eteam), 0);
  675.  
  676.         if (inc > 0 && inc <= 64)
  677.         {
  678.             if (myteam != eteam)
  679.             {
  680.                 WriteProcessMemory(csgo_h, (LPVOID)(clientdll + Offsets::forceattack), &value, sizeof(value), 0);
  681.             }
  682.         }
  683.     }
  684. }
  685.  
  686. void doBhop()
  687. {
  688.     DWORD lcbase;
  689.  
  690.     ReadProcessMemory(csgo_h, (LPVOID)(clientdll + Offsets::localplayer), &lcbase, sizeof(lcbase), 0);
  691.  
  692.     if (!lcbase) return;
  693.  
  694.     if (GetAsyncKeyState(VK_SPACE) & 0x8000)
  695.     {
  696.         int flags;
  697.  
  698.         int value = 6;
  699.  
  700.         ReadProcessMemory(csgo_h, (LPVOID)(lcbase + Offsets::flags), &flags, sizeof(flags), 0);
  701.  
  702.         if (flags & 1 << 0)
  703.         {
  704.             WriteProcessMemory(csgo_h, (LPVOID)(clientdll + Offsets::forcejump), &value, sizeof(value), 0);
  705.         }
  706.     }
  707. }
  708.  
  709. void doSkinChanger()
  710. {
  711.     if (!sc::once)
  712.     {
  713.         forceUpdate();
  714.         sc::once = true;
  715.     }
  716.  
  717.     for (int i = 0; i < 64; i++)
  718.     {
  719.         DWORD lcbase;
  720.  
  721.         ReadProcessMemory(csgo_h, (LPVOID)(clientdll + Offsets::localplayer), &lcbase, sizeof(lcbase), 0);
  722.  
  723.         if (!lcbase) continue;
  724.  
  725.         DWORD wIndex;
  726.  
  727.         ReadProcessMemory(csgo_h, (LPVOID)(lcbase + sc::myweapons + ((i - 1) * 0x4)), &wIndex, sizeof(wIndex), 0);
  728.         wIndex &= 0xFFFF;
  729.  
  730.         DWORD wEntity;
  731.  
  732.         ReadProcessMemory(csgo_h, (LPVOID)(clientdll + Offsets::entitylist + (wIndex - 1) * 0x10), &wEntity, sizeof(wEntity), 0);
  733.  
  734.         if (getWeapon(i) == weapon_ak47)
  735.         {
  736.             int value_1 = 0;
  737.             int value_2 = 2048;
  738.             int value_3 = 302;
  739.  
  740.             WriteProcessMemory(csgo_h, (LPVOID)(wEntity + sc::itemidhigh), &value_1, sizeof(value_1), 0);
  741.             WriteProcessMemory(csgo_h, (LPVOID)(wEntity + sc::itemidlow), &value_2, sizeof(value_2), 0);
  742.             WriteProcessMemory(csgo_h, (LPVOID)(wEntity + sc::originalownerxuidlow), &value_1, sizeof(value_1), 0);
  743.             WriteProcessMemory(csgo_h, (LPVOID)(wEntity + sc::ownerhigh), &value_1, sizeof(value_1), 0);
  744.             WriteProcessMemory(csgo_h, (LPVOID)(wEntity + sc::fallbackpaintkit), &value_3, sizeof(value_3), 0);
  745.         }
  746.  
  747.         if (getWeapon(i) == weapon_awp)
  748.         {
  749.             int value_1 = 0;
  750.             int value_2 = 2048;
  751.             int value_3 = 344;
  752.  
  753.             WriteProcessMemory(csgo_h, (LPVOID)(wEntity + sc::itemidhigh), &value_1, sizeof(value_1), 0);
  754.             WriteProcessMemory(csgo_h, (LPVOID)(wEntity + sc::itemidlow), &value_2, sizeof(value_2), 0);
  755.             WriteProcessMemory(csgo_h, (LPVOID)(wEntity + sc::originalownerxuidlow), &value_1, sizeof(value_1), 0);
  756.             WriteProcessMemory(csgo_h, (LPVOID)(wEntity + sc::ownerhigh), &value_1, sizeof(value_1), 0);
  757.             WriteProcessMemory(csgo_h, (LPVOID)(wEntity + sc::fallbackpaintkit), &value_3, sizeof(value_3), 0);
  758.         }
  759.  
  760.         if (getWeapon(i) == weapon_ssg08)
  761.         {
  762.             int value_1 = 0;
  763.             int value_2 = 2048;
  764.             int value_3 = 624;
  765.  
  766.             WriteProcessMemory(csgo_h, (LPVOID)(wEntity + sc::itemidhigh), &value_1, sizeof(value_1), 0);
  767.             WriteProcessMemory(csgo_h, (LPVOID)(wEntity + sc::itemidlow), &value_2, sizeof(value_2), 0);
  768.             WriteProcessMemory(csgo_h, (LPVOID)(wEntity + sc::originalownerxuidlow), &value_1, sizeof(value_1), 0);
  769.             WriteProcessMemory(csgo_h, (LPVOID)(wEntity + sc::ownerhigh), &value_1, sizeof(value_1), 0);
  770.             WriteProcessMemory(csgo_h, (LPVOID)(wEntity + sc::fallbackpaintkit), &value_3, sizeof(value_3), 0);
  771.         }
  772.  
  773.         if (getWeapon(i) == weapon_aug)
  774.         {
  775.             int value_1 = 0;
  776.             int value_2 = 2048;
  777.             int value_3 = 280;
  778.  
  779.             WriteProcessMemory(csgo_h, (LPVOID)(wEntity + sc::itemidhigh), &value_1, sizeof(value_1), 0);
  780.             WriteProcessMemory(csgo_h, (LPVOID)(wEntity + sc::itemidlow), &value_2, sizeof(value_2), 0);
  781.             WriteProcessMemory(csgo_h, (LPVOID)(wEntity + sc::originalownerxuidlow), &value_1, sizeof(value_1), 0);
  782.             WriteProcessMemory(csgo_h, (LPVOID)(wEntity + sc::ownerhigh), &value_1, sizeof(value_1), 0);
  783.             WriteProcessMemory(csgo_h, (LPVOID)(wEntity + sc::fallbackpaintkit), &value_3, sizeof(value_3), 0);
  784.         }
  785.  
  786.         if (getWeapon(i) == weapon_famas)
  787.         {
  788.             int value_1 = 0;
  789.             int value_2 = 2048;
  790.             int value_3 = 604;
  791.  
  792.             WriteProcessMemory(csgo_h, (LPVOID)(wEntity + sc::itemidhigh), &value_1, sizeof(value_1), 0);
  793.             WriteProcessMemory(csgo_h, (LPVOID)(wEntity + sc::itemidlow), &value_2, sizeof(value_2), 0);
  794.             WriteProcessMemory(csgo_h, (LPVOID)(wEntity + sc::originalownerxuidlow), &value_1, sizeof(value_1), 0);
  795.             WriteProcessMemory(csgo_h, (LPVOID)(wEntity + sc::ownerhigh), &value_1, sizeof(value_1), 0);
  796.             WriteProcessMemory(csgo_h, (LPVOID)(wEntity + sc::fallbackpaintkit), &value_3, sizeof(value_3), 0);
  797.         }
  798.  
  799.         if (getWeapon(i) == weapon_galilar)
  800.         {
  801.             int value_1 = 0;
  802.             int value_2 = 2048;
  803.             int value_3 = 398;
  804.  
  805.             WriteProcessMemory(csgo_h, (LPVOID)(wEntity + sc::itemidhigh), &value_1, sizeof(value_1), 0);
  806.             WriteProcessMemory(csgo_h, (LPVOID)(wEntity + sc::itemidlow), &value_2, sizeof(value_2), 0);
  807.             WriteProcessMemory(csgo_h, (LPVOID)(wEntity + sc::originalownerxuidlow), &value_1, sizeof(value_1), 0);
  808.             WriteProcessMemory(csgo_h, (LPVOID)(wEntity + sc::ownerhigh), &value_1, sizeof(value_1), 0);
  809.             WriteProcessMemory(csgo_h, (LPVOID)(wEntity + sc::fallbackpaintkit), &value_3, sizeof(value_3), 0);
  810.         }
  811.  
  812.         if (getWeapon(i) == 60)
  813.         {
  814.             int value_1 = 0;
  815.             int value_2 = 2048;
  816.             int value_3 = 644;
  817.  
  818.             WriteProcessMemory(csgo_h, (LPVOID)(wEntity + sc::itemidhigh), &value_1, sizeof(value_1), 0);
  819.             WriteProcessMemory(csgo_h, (LPVOID)(wEntity + sc::itemidlow), &value_2, sizeof(value_2), 0);
  820.             WriteProcessMemory(csgo_h, (LPVOID)(wEntity + sc::originalownerxuidlow), &value_1, sizeof(value_1), 0);
  821.             WriteProcessMemory(csgo_h, (LPVOID)(wEntity + sc::ownerhigh), &value_1, sizeof(value_1), 0);
  822.             WriteProcessMemory(csgo_h, (LPVOID)(wEntity + sc::fallbackpaintkit), &value_3, sizeof(value_3), 0);
  823.         }
  824.  
  825.         if (getWeapon(i) == weapon_m4a1)
  826.         {
  827.             int value_1 = 0;
  828.             int value_2 = 2048;
  829.             int value_3 = 309;
  830.  
  831.             WriteProcessMemory(csgo_h, (LPVOID)(wEntity + sc::itemidhigh), &value_1, sizeof(value_1), 0);
  832.             WriteProcessMemory(csgo_h, (LPVOID)(wEntity + sc::itemidlow), &value_2, sizeof(value_2), 0);
  833.             WriteProcessMemory(csgo_h, (LPVOID)(wEntity + sc::originalownerxuidlow), &value_1, sizeof(value_1), 0);
  834.             WriteProcessMemory(csgo_h, (LPVOID)(wEntity + sc::ownerhigh), &value_1, sizeof(value_1), 0);
  835.             WriteProcessMemory(csgo_h, (LPVOID)(wEntity + sc::fallbackpaintkit), &value_3, sizeof(value_3), 0);
  836.         }
  837.  
  838.         if (getWeapon(i) == 61)
  839.         {
  840.             int value_1 = 0;
  841.             int value_2 = 2048;
  842.             int value_3 = 653;
  843.  
  844.             WriteProcessMemory(csgo_h, (LPVOID)(wEntity + sc::itemidhigh), &value_1, sizeof(value_1), 0);
  845.             WriteProcessMemory(csgo_h, (LPVOID)(wEntity + sc::itemidlow), &value_2, sizeof(value_2), 0);
  846.             WriteProcessMemory(csgo_h, (LPVOID)(wEntity + sc::originalownerxuidlow), &value_1, sizeof(value_1), 0);
  847.             WriteProcessMemory(csgo_h, (LPVOID)(wEntity + sc::ownerhigh), &value_1, sizeof(value_1), 0);
  848.             WriteProcessMemory(csgo_h, (LPVOID)(wEntity + sc::fallbackpaintkit), &value_3, sizeof(value_3), 0);
  849.         }
  850.  
  851.         if (getWeapon(i) == 63)
  852.         {
  853.             int value_1 = 0;
  854.             int value_2 = 2048;
  855.             int value_3 = 643;
  856.  
  857.             WriteProcessMemory(csgo_h, (LPVOID)(wEntity + sc::itemidhigh), &value_1, sizeof(value_1), 0);
  858.             WriteProcessMemory(csgo_h, (LPVOID)(wEntity + sc::itemidlow), &value_2, sizeof(value_2), 0);
  859.             WriteProcessMemory(csgo_h, (LPVOID)(wEntity + sc::originalownerxuidlow), &value_1, sizeof(value_1), 0);
  860.             WriteProcessMemory(csgo_h, (LPVOID)(wEntity + sc::ownerhigh), &value_1, sizeof(value_1), 0);
  861.             WriteProcessMemory(csgo_h, (LPVOID)(wEntity + sc::fallbackpaintkit), &value_3, sizeof(value_3), 0);
  862.         }
  863.  
  864.         if (getWeapon(i) == weapon_deagle)
  865.         {
  866.             int value_1 = 0;
  867.             int value_2 = 2048;
  868.             int value_3 = 37;
  869.  
  870.             WriteProcessMemory(csgo_h, (LPVOID)(wEntity + sc::itemidhigh), &value_1, sizeof(value_1), 0);
  871.             WriteProcessMemory(csgo_h, (LPVOID)(wEntity + sc::itemidlow), &value_2, sizeof(value_2), 0);
  872.             WriteProcessMemory(csgo_h, (LPVOID)(wEntity + sc::originalownerxuidlow), &value_1, sizeof(value_1), 0);
  873.             WriteProcessMemory(csgo_h, (LPVOID)(wEntity + sc::ownerhigh), &value_1, sizeof(value_1), 0);
  874.             WriteProcessMemory(csgo_h, (LPVOID)(wEntity + sc::fallbackpaintkit), &value_3, sizeof(value_3), 0);
  875.         }
  876.  
  877.         if (getWeapon(i) == weapon_fiveseven)
  878.         {
  879.             int value_1 = 0;
  880.             int value_2 = 2048;
  881.             int value_3 = 660;
  882.  
  883.             WriteProcessMemory(csgo_h, (LPVOID)(wEntity + sc::itemidhigh), &value_1, sizeof(value_1), 0);
  884.             WriteProcessMemory(csgo_h, (LPVOID)(wEntity + sc::itemidlow), &value_2, sizeof(value_2), 0);
  885.             WriteProcessMemory(csgo_h, (LPVOID)(wEntity + sc::originalownerxuidlow), &value_1, sizeof(value_1), 0);
  886.             WriteProcessMemory(csgo_h, (LPVOID)(wEntity + sc::ownerhigh), &value_1, sizeof(value_1), 0);
  887.             WriteProcessMemory(csgo_h, (LPVOID)(wEntity + sc::fallbackpaintkit), &value_3, sizeof(value_3), 0);
  888.         }
  889.  
  890.         if (getWeapon(i) == weapon_glock)
  891.         {
  892.             int value_1 = 0;
  893.             int value_2 = 2048;
  894.             int value_3 = 353;
  895.  
  896.             WriteProcessMemory(csgo_h, (LPVOID)(wEntity + sc::itemidhigh), &value_1, sizeof(value_1), 0);
  897.             WriteProcessMemory(csgo_h, (LPVOID)(wEntity + sc::itemidlow), &value_2, sizeof(value_2), 0);
  898.             WriteProcessMemory(csgo_h, (LPVOID)(wEntity + sc::originalownerxuidlow), &value_1, sizeof(value_1), 0);
  899.             WriteProcessMemory(csgo_h, (LPVOID)(wEntity + sc::ownerhigh), &value_1, sizeof(value_1), 0);
  900.             WriteProcessMemory(csgo_h, (LPVOID)(wEntity + sc::fallbackpaintkit), &value_3, sizeof(value_3), 0);
  901.         }
  902.  
  903.         if (getWeapon(i) == 32)
  904.         {
  905.             int value_1 = 0;
  906.             int value_2 = 2048;
  907.             int value_3 = 389;
  908.  
  909.             WriteProcessMemory(csgo_h, (LPVOID)(wEntity + sc::itemidhigh), &value_1, sizeof(value_1), 0);
  910.             WriteProcessMemory(csgo_h, (LPVOID)(wEntity + sc::itemidlow), &value_2, sizeof(value_2), 0);
  911.             WriteProcessMemory(csgo_h, (LPVOID)(wEntity + sc::originalownerxuidlow), &value_1, sizeof(value_1), 0);
  912.             WriteProcessMemory(csgo_h, (LPVOID)(wEntity + sc::ownerhigh), &value_1, sizeof(value_1), 0);
  913.             WriteProcessMemory(csgo_h, (LPVOID)(wEntity + sc::fallbackpaintkit), &value_3, sizeof(value_3), 0);
  914.         }
  915.  
  916.         if (getWeapon(i) == weapon_p250)
  917.         {
  918.             int value_1 = 0;
  919.             int value_2 = 2048;
  920.             int value_3 = 271;
  921.  
  922.             WriteProcessMemory(csgo_h, (LPVOID)(wEntity + sc::itemidhigh), &value_1, sizeof(value_1), 0);
  923.             WriteProcessMemory(csgo_h, (LPVOID)(wEntity + sc::itemidlow), &value_2, sizeof(value_2), 0);
  924.             WriteProcessMemory(csgo_h, (LPVOID)(wEntity + sc::originalownerxuidlow), &value_1, sizeof(value_1), 0);
  925.             WriteProcessMemory(csgo_h, (LPVOID)(wEntity + sc::ownerhigh), &value_1, sizeof(value_1), 0);
  926.             WriteProcessMemory(csgo_h, (LPVOID)(wEntity + sc::fallbackpaintkit), &value_3, sizeof(value_3), 0);
  927.         }
  928.  
  929.         if (getWeapon(i) == weapon_tec9)
  930.         {
  931.             int value_1 = 0;
  932.             int value_2 = 2048;
  933.             int value_3 = 614;
  934.  
  935.             WriteProcessMemory(csgo_h, (LPVOID)(wEntity + sc::itemidhigh), &value_1, sizeof(value_1), 0);
  936.             WriteProcessMemory(csgo_h, (LPVOID)(wEntity + sc::itemidlow), &value_2, sizeof(value_2), 0);
  937.             WriteProcessMemory(csgo_h, (LPVOID)(wEntity + sc::originalownerxuidlow), &value_1, sizeof(value_1), 0);
  938.             WriteProcessMemory(csgo_h, (LPVOID)(wEntity + sc::ownerhigh), &value_1, sizeof(value_1), 0);
  939.             WriteProcessMemory(csgo_h, (LPVOID)(wEntity + sc::fallbackpaintkit), &value_3, sizeof(value_3), 0);
  940.         }
  941.     }
  942.  
  943.     if (GetAsyncKeyState(VK_LMENU) & 1)
  944.         forceUpdate();
  945. }
  946.  
  947. const int NotUsed = system("color 10"); //Задаем цвет для фона всей консоли
  948.  
  949.  
  950. enum ConsoleColor
  951. {
  952.     Black = 0,
  953.     Blue = 1,
  954.     Green = 2,
  955.     Cyan = 3,
  956.     Red = 4,
  957.     Magenta = 5,
  958.     Brown = 6,
  959.     LightGray = 7,
  960.     DarkGray = 8,
  961.     LightBlue = 9,
  962.     LightGreen = 10,
  963.     LightCyan = 11,
  964.     LightRed = 12,
  965.     LightMagenta = 13,
  966.     Yellow = 14,
  967.     White = 15
  968. } Color;
  969.  
  970. void SetColor(ConsoleColor text, ConsoleColor background)
  971. {
  972.     HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE);
  973.     SetConsoleTextAttribute(hStdOut, (WORD)((background << 4) | text));
  974. }
  975. void beepclick()
  976. {
  977.     Beep(650.20, 200);
  978. }
  979. void beep()
  980. {
  981.     Beep(659.26, 200);
  982.     Beep(659.26, 200);
  983.     Sleep(200);
  984.     Beep(659.26, 200);
  985.     Sleep(100);
  986.     Beep(523.26, 200);
  987.     Beep(659.26, 200);
  988.     Sleep(200);
  989.     Beep(783.98, 200);
  990.     Sleep(400);
  991.     Beep(391.99, 200);
  992. }
  993.  
  994. int main()
  995. {
  996.     SetConsoleTitle("XYUHACK | Counter-Strike: Global Offensive");
  997.     SetColor(White, Blue);
  998.     getProcess("csgo.exe");
  999.     clientdll = getModule("client.dll");
  1000.     enginedll = getModule("engine.dll");
  1001.     printLoading();
  1002.     system("cls");
  1003.     UpdateMenu();
  1004.     SetColor(White, Blue);
  1005.     for (;;)
  1006.     {
  1007.         Navigation();
  1008.         if (updated == true)
  1009.         {
  1010.             updated = false;
  1011.             UpdateMenu();
  1012.         }
  1013.         Sleep(50);
  1014.     }
  1015.     /*printMenu();*/
  1016.     CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)beep, NULL, NULL, NULL);
  1017.     system("PAUSE");
  1018.     return 0;
  1019. }
RAW Paste Data
Top