#include <iostream>
#include <Windows.h>
#include <TlHelp32.h>
#include <thread>
const DWORD dwLocalPlayer = 0xCBD6B4;
const DWORD m_fFlags = 0x104;
const DWORD dwForceJump = 0x5170DB0;
const DWORD dwEntityList = 0x4CCDBFC;
const DWORD m_iTeamNum = 0xF4;
const DWORD m_bSpotted = 0x93D;
const DWORD m_iGlowIndex = 0xA3F8;
const DWORD dwGlowObjectManager = 0x520DA28;
const DWORD m_flFlashDuration = 0xA3E0;
const DWORD m_iCrosshairId = 0xB390;
const DWORD dwbSendPackets = 0xD20EA;
HANDLE process;
DWORD clientBase;
DWORD engineBase;
bool toggleGlow = true;
DWORD getModuleBaseAddress(DWORD pid, const char* name)
{
HANDLE snapshot = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, pid);
MODULEENTRY32 mEntry;
mEntry.dwSize = sizeof(MODULEENTRY32);
do
{
if (!strcmp(mEntry.szModule, name))
{
CloseHandle(snapshot);
return (DWORD)mEntry.modBaseAddr;
}
} while (Module32Next(snapshot, &mEntry));
}
template <typename T>
T readMem(DWORD address)
{
T buffer;
ReadProcessMemory(process, (LPVOID)address, &buffer, sizeof(buffer), 0);
return buffer;
}
template <typename T>
void writeMem(DWORD address, T value)
{
WriteProcessMemory(process, (LPVOID)address, &value, sizeof(value), 0);
}
void glow()
{
while (true)
{
Sleep(10);
if (!toggleGlow && !readMem<DWORD>(readMem<DWORD>(clientBase + dwLocalPlayer) + 0xED))
continue;
DWORD glowObj = readMem<DWORD>(clientBase + dwGlowObjectManager);
DWORD myTeam = readMem<DWORD>(readMem<DWORD>(clientBase + dwLocalPlayer) + m_iTeamNum);
for (int x = 0; x < 32; x++)
{
DWORD player = readMem<DWORD>(clientBase + dwEntityList + x * 0x10);
if (player == 0)
continue;
bool dormant = readMem<bool>(player + 0xED);
if (dormant)
continue;
DWORD team = readMem<DWORD>(player + m_iTeamNum);
if (team != 2 && team != 3)
continue;
DWORD currentGlowIndex = readMem<DWORD>(player + m_iGlowIndex);
if (team != myTeam)
{
writeMem<float>(glowObj + currentGlowIndex * 0x38 + 0x4, 255);
writeMem<float>(glowObj + currentGlowIndex * 0x38 + 0x8, 0);
writeMem<float>(glowObj + currentGlowIndex * 0x38 + 0xC, 0);
writeMem<float>(glowObj + currentGlowIndex * 0x38 + 0x10, 255);
writeMem<bool>(glowObj + currentGlowIndex * 0x38 + 0x24, true);
writeMem<bool>(glowObj + currentGlowIndex * 0x38 + 0x25, false);
}
else
{
writeMem<float>(glowObj + currentGlowIndex * 0x38 + 0x4, 0);
writeMem<float>(glowObj + currentGlowIndex * 0x38 + 0x8, 0);
writeMem<float>(glowObj + currentGlowIndex * 0x38 + 0xC, 255);
writeMem<float>(glowObj + currentGlowIndex * 0x38 + 0x10, 255);
writeMem<bool>(glowObj + currentGlowIndex * 0x38 + 0x24, true);
writeMem<bool>(glowObj + currentGlowIndex * 0x38 + 0x25, false);
}
}
}
}
int main()
{
SetConsoleTitle("nn shit wh");
int x;
std::cout << "Enter ACTIVATION code or go nahuy:" << std::endl;
std::cin >> x;
std::cout << "Open CS:GO\n";
if (x == 1337) {
HWND hwnd;
do {
hwnd = FindWindowA(0, "Counter-Strike: Global Offensive");
Sleep(50);
} while (!hwnd);
DWORD pid;
GetWindowThreadProcessId(hwnd, &pid);
process = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pid);
std::cout << "Csgo started, pid " << pid << ".\n";
do {
clientBase = getModuleBaseAddress(pid, "client_panorama.dll");
Sleep(50);
} while (!clientBase);
do {
engineBase = getModuleBaseAddress(pid, "engine.dll");
Sleep(50);
} while (!engineBase);
std::thread glowThread(glow);
std::cout << "Let's fuck everyone\n";
std::cout << "\n";
std::cout << "Keys:\n";
std::cout << " Toggle wallhack: F9\n";
std::cout << "\n";
while (true)
{
if (GetAsyncKeyState(VK_F9))
{
toggleGlow = !toggleGlow;
if (toggleGlow)
std::cout << "Wallhack: on\n";
else
std::cout << "Wallhack: off\n";
}
Sleep(100);
}
}
else
{
std::cout << "Wrong!!! Do u wanna steal my freaking cheat?" << std::endl;
}
}