Red faceFull Source Internal Skin Changer CS:GO by CoderDuc

Posts 112 of 12 · Page 1 of 1
Full Source Internal Skin Changer CS:GO by CoderDuc
main.cpp

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

Code:
#include "MemMan.h"
#include "Windows.h"
#include <TlHelp32.h>

MemMan::MemMan()
{
	handle = NULL;
}

MemMan::~MemMan()
{
	CloseHandle(handle);
}

DWORD MemMan::getProcess(const char* proc)
{
	HANDLE hProcessId = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
	DWORD process;
	PROCESSENTRY32 pEntry;
	pEntry.dwSize = sizeof(pEntry);

	do
	{
		if (!strcmp(pEntry.szExeFile, proc))
		{
			process = pEntry.th32ProcessID;
			CloseHandle(hProcessId);
			handle = OpenProcess(PROCESS_ALL_ACCESS, false, process);
		}

	} while (Process32Next(hProcessId, &pEntry));
	return process;
}

uintptr_t MemMan::getModule(DWORD procId, const char* modName)
{
	HANDLE hModule = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE | TH32CS_SNAPMODULE32, procId);
	MODULEENTRY32 mEntry;
	mEntry.dwSize = sizeof(mEntry);

	do
	{
		if (!strcmp(mEntry.szModule, modName))
		{
			CloseHandle(hModule);
			return (DWORD)mEntry.hModule;
		}
	} while (Module32Next(hModule, &mEntry));
	return 0;
}

DWORD MemMan::getAddress(DWORD addr, std::vector<DWORD> vect)
{
	for (unsigned int i = 0; i < vect.size(); i++)
	{
		ReadProcessMemory(handle, (BYTE*)addr, &addr, sizeof(addr), 0);
		addr += vect[i];
	}
	return addr;
}
MemMan.h

Code:
#pragma once
#include <Windows.h>
#include <vector>

class MemMan
{
public:
	MemMan();
	~MemMan();
	template <class val>
	val readMem(DWORD addr)
	{
		val x;
		ReadProcessMemory(handle, (LPBYTE*)addr, &x, sizeof(x), NULL);
		return x;
	}
	template <class val>
	val writeMem(DWORD addr, val x)
	{
		WriteProcessMemory(handle, (LPBYTE*)addr, &x, sizeof(x), NULL);
		return 0;
	}
	DWORD getProcess(const char*);
	uintptr_t getModule(DWORD, const char*);
	DWORD getAddress(DWORD, std::vector<DWORD>);
	HANDLE handle;
};
Go here to check All CS:GO Item ID Listings: https://tf2b.com/itemlist.php?gid=730

And go here to check what skins you want to apply ( Source by SPHO ): https://www.mpgh.net/forum/showthread.php?t=1031822
Thanks for sharing the skinchanger, i might try it out sometime, maybe even recode it a bit and optimize it
Nice paste. Internal but still opens a handle and writes to memory...
Quote Originally Posted by Sandwich View Post
Nice paste. Internal but still opens a handle and writes to memory...
Paste ?? Are u kidding me ?? I spent 1 day to make this ?? i copied and pasted from what

- - - Updated - - -

Quote Originally Posted by Sandwich View Post
Nice paste. Internal but still opens a handle and writes to memory...
I know what u mean. But it is my favorite. OKAY I just add the dll main in my own skin changer source to change it from external to internal like a boss hahaha )
Maybe you think I'm stupid. This is OKAY :33333. By the way thanks for reply
Quote Originally Posted by membertest1985 View Post
Paste ?? Are u kidding me ?? I spent 1 day to make this ?? i copied and pasted from what
The MemMan memory class is from GH and you're opening a handle to write to memory when you're already injected into the process. It's not necessary and all it does is increase your risk of being banned. You basically have an internal that acts as an external.
Quote Originally Posted by Sandwich View Post

The MemMan memory class is from GH and you're opening a handle to write to memory when you're already injected into the process. It's not necessary and all it does is increase your risk of being banned. You basically have an internal that acts as an external.
OK Thanks for ur recommend. I'll improve and fix this code
Thank you for your sharing. I successfully read the weapon ID, but there is no change in the game after writing memory. Is there anything wrong with me?
Quote Originally Posted by qq214620428 View Post
Thank you for your sharing. I successfully read the weapon ID, but there is no change in the game after writing memory. Is there anything wrong with me?
U need to update those address. Maybe Those address have been changed by game
Quote Originally Posted by qq214620428 View Post
Thank you for your sharing. I successfully read the weapon ID, but there is no change in the game after writing memory. Is there anything wrong with me?
Possibly autism?
Hello can i use this in my main? Can i get any VAC ban ??
How do I apply this? I'm very new to this stuff
Posts 112 of 12 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?