#include <windows.h>
#include <iostream>
using namespace std;
void __cdecl PushToConsole(char* szVal ) {
DWORD dwCShell = (DWORD)GetModuleHandleA("CShell.dll");
if( dwCShell != NULL )
{
DWORD *LTClient = ( DWORD* )( (dwCShell + 0x2AAE80) );
void* CONoff = ( void* )*( DWORD* )( *LTClient + 0x1F8 );
_asm
{
push szVal;
call CONoff;
add esp, 4;
}
}
}
DWORD WINAPI hello(LPVOID) {
while(GetModuleHandleA("CShell.dll") == NULL ) {
Sleep(120); //100ms
}
bool PlayerGlow = false;
bool nosky = true;
bool Nosmoke = true;
bool Fullbright = true;
bool WhitePlayers = true;
bool antiflash = true;
bool Whitewalls = true;
bool nogun = false;
bool wireframeworld = false;
for(;; ) {
__asm pushad;
if(GetAsyncKeyState(VK_F2)&1) {
PlayerGlow = !PlayerGlow;
}
if(GetAsyncKeyState(VK_F3)&1) {
nosky = !nosky;
}
if(GetAsyncKeyState(VK_F4)&1) {
Nosmoke = !Nosmoke;
}
if(GetAsyncKeyState(VK_F5)&1) {
Fullbright = !Fullbright;
}
if(GetAsyncKeyState(VK_F6)&1) {
WhitePlayers = !WhitePlayers;
}
if(GetAsyncKeyState(VK_F7)&1) {
antiflash = !antiflash;
}
if(GetAsyncKeyState(VK_F8)&1) {
Whitewalls = !Whitewalls;
}
if(GetAsyncKeyState(VK_F9)&1) {
nogun = !nogun;
}
if(GetAsyncKeyState(VK_F10)&1) {
wireframeworld = !wireframeworld;
}
if (PlayerGlow) {
PushToConsole("ScreenGlowEnable 1");
}
else {
PushToConsole("ScreenGlowEnable 0");
}
if (antiflash) {
PushToConsole("DrawFlat 1");
}
else {
PushToConsole("Drawflash 0");
}
if (nosky) {
PushToConsole("DrawSky 1");
}
else {
PushToConsole("DrawSky 0");
}
if (Nosmoke) {
PushToConsole("DrawParticles 1");
}
else {
PushToConsole("DrawParticles 0");
}
if (Fullbright) {
PushToConsole("FullBright 1");
}
else {
PushToConsole("FullBright 0");
}
if (WhitePlayers) {
PushToConsole("TextureModels 1");
}
else {
PushToConsole("TextureModels 0");
}
if (Whitewalls) {
PushToConsole("DrawTextures 1");
}
else {
PushToConsole("DrawTextures 0");
}
if (nogun) {
PushToConsole("DrawGuns 1");
}
else {
PushToConsole("DrawGuns 0");
}
if (wireframeworld) {
PushToConsole("WireFrame 1");
}
else {
PushToConsole("WireFrame 0");
}
Sleep(120);
__asm popad;
}
}
BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
{
DisableThreadLibraryCalls(hDll);
if ( dwReason == DLL_PROCESS_ATTACH )
{
MessageBoxA(0, "Coded by youname", "Injected", 0);
CreateThread(NULL, NULL,hello, NULL, NULL, NULL);
}
return TRUE;
}