Code:
#pragma warning(disable : 4996)
/*
||==========================||
|| Author: CoderDuc ||
|| Language: C++ ||
|| Type: Internal ||
||==========================||
*/
#include <stdint.h>
#include <iostream>
#include <Windows.h>
#include "MemMan.h"
#include "Enum.h"
using namespace std;
MemMan MemClass;
struct offsets
{
//Signatures
DWORD dwGlowObjectManager = 0x5244FD0;
DWORD dwLocalPlayer = 0xCF2A3C;
DWORD fJump = 0x51A814C;
DWORD dwForceAttack = 0x313618C;
DWORD dwEntityList = 0x4D04A94;
DWORD dwClientState = 0x58BCFC;
DWORD model_ambient_min = 0x58ED1C;
//NetVars
DWORD isSpotted = 0x93D;
DWORD m_iCrosshairId = 0xB3AC;
DWORD flashDuration = 0xA3F4;
DWORD m_iGlowIndex = 0xA40C;
DWORD m_iTeamNum = 0xF4;
DWORD flags = 0x104;
DWORD velocity = 0x114;
DWORD iHealth = 0x100;
DWORD iScoped = 0x3910;
DWORD m_iItemDefinitionIndex = 0x2FAA;
DWORD m_OriginalOwnerXuidLow = 0x31B0;
DWORD m_nFallbackPaintKit = 0x31B8;
DWORD m_iAccountID = 0x2FC8;
DWORD m_hActiveWeapon = 0x2EF8;
DWORD m_iItemIDHigh = 0x2FC0;
DWORD m_OriginalOwnerXuidHigh = 0x31B4;
DWORD m_nFallbackSeed = 0x31BC;
DWORD m_nFallbackStatTrak = 0x31C4;
DWORD m_flFallbackWear = 0x31C0;
DWORD m_szCustomName = 0x303C;
DWORD m_iEntityQuality = 0x2FAC;
DWORD EntLoopDist = 0x10;
DWORD m_iAccount = 0xA8D8;
DWORD m_iWeaponID = 0x32DC;
DWORD m_iItemIDLow = 0x2FC4;
DWORD m_hMyWeapons = 0x2DF8;
DWORD m_bIsDefusing = 0x3918;
DWORD m_iHealth = 0x100;
DWORD m_clrRender = 0x70;
DWORD m_aimPunchAngle = 0x302C;
DWORD m_hViewModel = 0x3224;
DWORD m_iViewModelIndex = 0x3220;
DWORD m_nModelIndex = 0x258;
} offset;
#pragma endregion
#pragma region variable
struct variables
{
DWORD localPlayer;
DWORD process;
DWORD gameModule;
DWORD gameClient;
} val;
void Engine()
{
int procID = MemClass.getProcess("csgo.exe");
val.gameModule = MemClass.getModule(procID, "client_panorama.dll");
val.gameClient = MemClass.getModule(procID, "engine.dll");
while (true)
{
#pragma region GetSkinData
//Skin Changer
int WeaponID = NULL;
DWORD Player = MemClass.readMem<DWORD>(val.gameModule + offset.dwLocalPlayer);
DWORD WeaponIndex = MemClass.readMem<DWORD>(Player + offset.m_hActiveWeapon) & 0xFFF;
DWORD WeapInt = MemClass.readMem<DWORD>((val.gameModule + offset.dwEntityList + WeaponIndex * offset.EntLoopDist) - offset.EntLoopDist);
WeaponID = MemClass.readMem<int>(WeapInt + offset.m_iItemDefinitionIndex);
int WeaponAccountID = MemClass.readMem<int>(WeapInt + offset.m_iAccountID);
int MyWeaponID = MemClass.readMem<int>(WeapInt + offset.m_OriginalOwnerXuidLow);
#pragma endregion
#pragma region NameTag
DWORD pid;
HWND hWnd = FindWindowA(0, ("Counter-Strike: Global Offensive"));
GetWindowThreadProcessId(hWnd, &pid);
HANDLE pHandle = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pid);
WriteProcessMemory(pHandle, (LPVOID)(WeapInt + offset.m_szCustomName), "CoderDuc", sizeof(char[161]), NULL);
#pragma endregion
#pragma region ChangeSkin
//AK47
if (WeaponID == AK47)
{
MemClass.writeMem<int>(WeapInt + offset.m_iItemIDLow, 1);
MemClass.writeMem<int>(WeapInt + offset.m_nFallbackPaintKit, 675);
MemClass.writeMem<int>(WeapInt + offset.m_nFallbackStatTrak, 1337);
MemClass.writeMem<int>(WeapInt + offset.m_nFallbackSeed, 12);
MemClass.writeMem<int>(WeapInt + offset.m_flFallbackWear, 0.01f);
}
//Deagle Eagle
else if (WeaponID == DEAGLE)
{
MemClass.writeMem<int>(WeapInt + offset.m_iItemIDLow, 1);
MemClass.writeMem<int>(WeapInt + offset.m_nFallbackPaintKit, 527);
MemClass.writeMem<int>(WeapInt + offset.m_nFallbackStatTrak, 1337);
MemClass.writeMem<int>(WeapInt + offset.m_nFallbackSeed, 12);
MemClass.writeMem<int>(WeapInt + offset.m_flFallbackWear, 0.01f);
}
//AWP
else if (WeaponID == AWP)
{
MemClass.writeMem<int>(WeapInt + offset.m_iItemIDLow, 1);
MemClass.writeMem<int>(WeapInt + offset.m_nFallbackPaintKit, 344);
MemClass.writeMem<int>(WeapInt + offset.m_nFallbackStatTrak, 1337);
MemClass.writeMem<int>(WeapInt + offset.m_nFallbackSeed, 12);
MemClass.writeMem<int>(WeapInt + offset.m_flFallbackWear, 0.01f);
}
//Dual Barrettas
else if (WeaponID == DUAL_BARRETTAS)
{
MemClass.writeMem<int>(WeapInt + offset.m_iItemIDLow, 1);
MemClass.writeMem<int>(WeapInt + offset.m_nFallbackPaintKit, 307);
MemClass.writeMem<int>(WeapInt + offset.m_nFallbackStatTrak, 1337);
MemClass.writeMem<int>(WeapInt + offset.m_nFallbackSeed, 12);
MemClass.writeMem<int>(WeapInt + offset.m_flFallbackWear, 0.01f);
}
//Five-SeVEN
else if (WeaponID == FIVE_SEVEN)
{
MemClass.writeMem<int>(WeapInt + offset.m_iItemIDLow, 1);
MemClass.writeMem<int>(WeapInt + offset.m_nFallbackPaintKit, 464);
MemClass.writeMem<int>(WeapInt + offset.m_nFallbackStatTrak, 1337);
MemClass.writeMem<int>(WeapInt + offset.m_nFallbackSeed, 12);
MemClass.writeMem<int>(WeapInt + offset.m_flFallbackWear, 0.01f);
}
//Glock-18
else if (WeaponID == GLOCK)
{
MemClass.writeMem<int>(WeapInt + offset.m_iItemIDLow, 1);
MemClass.writeMem<int>(WeapInt + offset.m_nFallbackPaintKit, 607);
MemClass.writeMem<int>(WeapInt + offset.m_nFallbackStatTrak, 1337);
MemClass.writeMem<int>(WeapInt + offset.m_nFallbackSeed, 12);
MemClass.writeMem<int>(WeapInt + offset.m_flFallbackWear, 0.01f);
}
//AUG
else if (WeaponID == AUG)
{
MemClass.writeMem<int>(WeapInt + offset.m_iItemIDLow, 1);
MemClass.writeMem<int>(WeapInt + offset.m_nFallbackPaintKit, 167);
MemClass.writeMem<int>(WeapInt + offset.m_nFallbackStatTrak, 1337);
MemClass.writeMem<int>(WeapInt + offset.m_nFallbackSeed, 12);
MemClass.writeMem<int>(WeapInt + offset.m_flFallbackWear, 0.01f);
}
//FAMAS
else if (WeaponID == FAMAS)
{
MemClass.writeMem<int>(WeapInt + offset.m_iItemIDLow, 1);
MemClass.writeMem<int>(WeapInt + offset.m_nFallbackPaintKit, 154);
MemClass.writeMem<int>(WeapInt + offset.m_nFallbackStatTrak, 1337);
MemClass.writeMem<int>(WeapInt + offset.m_nFallbackSeed, 12);
MemClass.writeMem<int>(WeapInt + offset.m_flFallbackWear, 0.01f);
}
//Galil AR
else if (WeaponID == GALIL_AR)
{
MemClass.writeMem<int>(WeapInt + offset.m_iItemIDLow, 1);
MemClass.writeMem<int>(WeapInt + offset.m_nFallbackPaintKit, 428);
MemClass.writeMem<int>(WeapInt + offset.m_nFallbackStatTrak, 1337);
MemClass.writeMem<int>(WeapInt + offset.m_nFallbackSeed, 12);
MemClass.writeMem<int>(WeapInt + offset.m_flFallbackWear, 0.01f);
}
//M4A4
else if (WeaponID == M4A4)
{
MemClass.writeMem<int>(WeapInt + offset.m_iItemIDLow, 1);
MemClass.writeMem<int>(WeapInt + offset.m_nFallbackPaintKit, 255);
MemClass.writeMem<int>(WeapInt + offset.m_nFallbackStatTrak, 1337);
MemClass.writeMem<int>(WeapInt + offset.m_nFallbackSeed, 12);
MemClass.writeMem<int>(WeapInt + offset.m_flFallbackWear, 0.01f);
}
//MAC-10
else if (WeaponID == MAC_10)
{
MemClass.writeMem<int>(WeapInt + offset.m_iItemIDLow, 1);
MemClass.writeMem<int>(WeapInt + offset.m_nFallbackPaintKit, 433);
MemClass.writeMem<int>(WeapInt + offset.m_nFallbackStatTrak, 1337);
MemClass.writeMem<int>(WeapInt + offset.m_nFallbackSeed, 12);
MemClass.writeMem<int>(WeapInt + offset.m_flFallbackWear, 0.01f);
}
//P90
else if (WeaponID == P90)
{
MemClass.writeMem<int>(WeapInt + offset.m_iItemIDLow, 1);
MemClass.writeMem<int>(WeapInt + offset.m_nFallbackPaintKit, 156);
MemClass.writeMem<int>(WeapInt + offset.m_nFallbackStatTrak, 1337);
MemClass.writeMem<int>(WeapInt + offset.m_nFallbackSeed, 12);
MemClass.writeMem<int>(WeapInt + offset.m_flFallbackWear, 0.01f);
}
//MAG-7
else if (WeaponID == MAG_7)
{
MemClass.writeMem<int>(WeapInt + offset.m_iItemIDLow, 1);
MemClass.writeMem<int>(WeapInt + offset.m_nFallbackPaintKit, 431);
MemClass.writeMem<int>(WeapInt + offset.m_nFallbackStatTrak, 1337);
MemClass.writeMem<int>(WeapInt + offset.m_nFallbackSeed, 12);
MemClass.writeMem<int>(WeapInt + offset.m_flFallbackWear, 0.01f);
}
//TEC-9
else if (WeaponID == TEC_9)
{
MemClass.writeMem<int>(WeapInt + offset.m_iItemIDLow, 1);
MemClass.writeMem<int>(WeapInt + offset.m_nFallbackPaintKit, 614);
MemClass.writeMem<int>(WeapInt + offset.m_nFallbackStatTrak, 1337);
MemClass.writeMem<int>(WeapInt + offset.m_nFallbackSeed, 12);
MemClass.writeMem<int>(WeapInt + offset.m_flFallbackWear, 0.01f);
}
//Nova
else if (WeaponID == NOVA)
{
MemClass.writeMem<int>(WeapInt + offset.m_iItemIDLow, 1);
MemClass.writeMem<int>(WeapInt + offset.m_nFallbackPaintKit, 358);
MemClass.writeMem<int>(WeapInt + offset.m_nFallbackStatTrak, 1337);
MemClass.writeMem<int>(WeapInt + offset.m_nFallbackSeed, 12);
MemClass.writeMem<int>(WeapInt + offset.m_flFallbackWear, 0.01f);
}
//P250
else if (WeaponID == P250)
{
MemClass.writeMem<int>(WeapInt + offset.m_iItemIDLow, 1);
MemClass.writeMem<int>(WeapInt + offset.m_nFallbackPaintKit, 464);
MemClass.writeMem<int>(WeapInt + offset.m_nFallbackStatTrak, 1337);
MemClass.writeMem<int>(WeapInt + offset.m_nFallbackSeed, 12);
MemClass.writeMem<int>(WeapInt + offset.m_flFallbackWear, 0.01f);
}
//SSG 08
else if (WeaponID == SSG_08)
{
MemClass.writeMem<int>(WeapInt + offset.m_iItemIDLow, 1);
MemClass.writeMem<int>(WeapInt + offset.m_nFallbackPaintKit, 487);
MemClass.writeMem<int>(WeapInt + offset.m_nFallbackStatTrak, 1337);
MemClass.writeMem<int>(WeapInt + offset.m_nFallbackSeed, 12);
MemClass.writeMem<int>(WeapInt + offset.m_flFallbackWear, 0.01f);
}
//USP-S
else if (WeaponID == USP_S)
{
MemClass.writeMem<int>(WeapInt + offset.m_iItemIDLow, 1);
MemClass.writeMem<int>(WeapInt + offset.m_nFallbackPaintKit, 653);
MemClass.writeMem<int>(WeapInt + offset.m_nFallbackStatTrak, 1337);
MemClass.writeMem<int>(WeapInt + offset.m_nFallbackSeed, 12);
MemClass.writeMem<int>(WeapInt + offset.m_flFallbackWear, 0.01f);
}
//M4A1-S
else if (WeaponID == M4A1_S)
{
MemClass.writeMem<int>(WeapInt + offset.m_iItemIDLow, 1);
MemClass.writeMem<int>(WeapInt + offset.m_nFallbackPaintKit, 430);
MemClass.writeMem<int>(WeapInt + offset.m_nFallbackStatTrak, 1337);
MemClass.writeMem<int>(WeapInt + offset.m_nFallbackSeed, 12);
MemClass.writeMem<int>(WeapInt + offset.m_flFallbackWear, 0.01f);
}
//CZ75
else if (WeaponID == CZ75)
{
MemClass.writeMem<int>(WeapInt + offset.m_iItemIDLow, 1);
MemClass.writeMem<int>(WeapInt + offset.m_nFallbackPaintKit, 270);
MemClass.writeMem<int>(WeapInt + offset.m_nFallbackStatTrak, 1337);
MemClass.writeMem<int>(WeapInt + offset.m_nFallbackSeed, 12);
MemClass.writeMem<int>(WeapInt + offset.m_flFallbackWear, 0.01f);
}
//R8
else if (WeaponID == R8)
{
MemClass.writeMem<int>(WeapInt + offset.m_iItemIDLow, 1);
MemClass.writeMem<int>(WeapInt + offset.m_nFallbackPaintKit, 523);
MemClass.writeMem<int>(WeapInt + offset.m_nFallbackStatTrak, 1337);
MemClass.writeMem<int>(WeapInt + offset.m_nFallbackSeed, 12);
MemClass.writeMem<int>(WeapInt + offset.m_flFallbackWear, 0.01f);
}
//P2000
else if (WeaponID == P2000)
{
MemClass.writeMem<int>(WeapInt + offset.m_iItemIDLow, 1);
MemClass.writeMem<int>(WeapInt + offset.m_nFallbackPaintKit, 275);
MemClass.writeMem<int>(WeapInt + offset.m_nFallbackStatTrak, 1337);
MemClass.writeMem<int>(WeapInt + offset.m_nFallbackSeed, 12);
MemClass.writeMem<int>(WeapInt + offset.m_flFallbackWear, 0.01f);
}
//SCAR_20
else if (WeaponID == SCAR_20)
{
MemClass.writeMem<int>(WeapInt + offset.m_iItemIDLow, 1);
MemClass.writeMem<int>(WeapInt + offset.m_nFallbackPaintKit, 597);
MemClass.writeMem<int>(WeapInt + offset.m_nFallbackStatTrak, 1337);
MemClass.writeMem<int>(WeapInt + offset.m_nFallbackSeed, 12);
MemClass.writeMem<int>(WeapInt + offset.m_flFallbackWear, 0.01f);
}
//G3SG1
else if (WeaponID == G3SG1)
{
MemClass.writeMem<int>(WeapInt + offset.m_iItemIDLow, 1);
MemClass.writeMem<int>(WeapInt + offset.m_nFallbackPaintKit, 465);
MemClass.writeMem<int>(WeapInt + offset.m_nFallbackStatTrak, 1337);
MemClass.writeMem<int>(WeapInt + offset.m_nFallbackSeed, 12);
MemClass.writeMem<int>(WeapInt + offset.m_flFallbackWear, 0.01f);
}
if (GetAsyncKeyState(VK_F2) & 1)
{
DWORD _dwClientState = MemClass.readMem<DWORD>(val.gameClient + offset.dwClientState);
MemClass.writeMem<int>(_dwClientState + 0x174, -1);
}
}
}
extern "C" __declspec(dllexport) BOOL WINAPI DllMain(HMODULE hDLL, DWORD dwReason, LPVOID lpvRe)
{
switch (dwReason)
{
case DLL_PROCESS_ATTACH:
DisableThreadLibraryCalls(hDLL);
CreateThread(0, 0, (LPTHREAD_START_ROUTINE)Engine, 0, 0, 0);
break;
case DLL_PROCESS_DETACH:
break;
}
return true;
}
Enum.h
Code:
enum WEAPON
{
AK47 = 7,
DEAGLE = 1,
AWP = 9,
DUAL_BARRETTAS = 2,
FIVE_SEVEN = 3,
GLOCK = 4,
AUG = 8,
FAMAS = 10,
GALIL_AR = 13,
M4A4 = 16,
MAC_10 = 17,
P90 = 19,
MAG_7 = 27,
TEC_9 = 30,
NOVA = 35,
P250 = 36,
SSG_08 = 39,
USP_S = 61,
M4A1_S = 60,
CZ75 = 63,
R8 = 64,
P2000 = 32,
SCAR_20 = 38,
G3SG1 = 11,
};
MemMan.cpp