while(!GetModuleHandle("client.dll") || !GetModuleHandle("engine.dll"))
{
Sleep(1000);
}
IBaseClientDLL *pBaseClientDLL;
IVEngineClient *pEngineClient;
CreateInterfaceFn pBCDLL = (CreateInterfaceFn)GetProcAddress(GetModuleHandle("client.dll"), "CreateInterface");
CreateInterfaceFn pIVEDLL = (CreateInterfaceFn)GetProcAddress(GetModuleHandle("engine.dll"), "CreateInterface");
pBaseClientDLL = (IBaseClientDLL *)pBCDLL(CLIENT_DLL_INTERFACE_VERSION, 0);
pEngineClient = (IVEngineClient *)pIVEDLL(VENGINE_CLIENT_INTERFACE_VERSION, 0);
add_log("---\npBaseClientDLL: 0x%x\npEngineClient: 0x%x\n---\nClient Classes:\n", pBaseClientDLL, pEngineClient);
ClientClass *pClasses = pBaseClientDLL->GetAllClasses();
do
{
add_log("%s", pClasses->GetName());
} while((pClasses = pClasses->m_pNext) != NULL);
--- pBaseClientDLL: 0xe981d70 pEngineClient: 0x93f2e3c --- Client Classes: CASW_Weapon_Welder CASW_Weapon_Tesla_Trap CASW_Weapon_Tesla_Gun CASW_Weapon_T75 CASW_Weapon_Stim CASW_Weapon_Sniper_Rifle CASW_Weapon_Smart_Bomb CASW_Weapon_Shotgun CASW_Weapon_Sentry_Freeze CASW_Weapon_Sentry_Cannon CASW_Weapon_Sentry_Flamer CASW_Weapon_Sentry CASW_Weapon_Ricochet CASW_Weapon_Railgun CASW_Weapon_PRifle CASW_Weapon_Pistol CASW_Weapon_PDW CASW_Weapon_Normal_Armor CASW_Weapon_Night_Vision CASW_Weapon_Mining_Laser CASW_Weapon_Minigun CASW_Weapon_Mines CASW_Weapon_Medkit CASW_Weapon_Medical_Satchel CASW_Weapon_Laser_Mines CASW_Weapon_Jump_Jet CASW_Weapon_Hornet_Barrage CASW_Weapon_HealGrenade CASW_HealGrenade_Projectile CASW_Weapon_Heal_Gun CASW_Weapon_Grenades CASW_Weapon_Grenade_Launcher CASW_Weapon_Freeze_Grenades CASW_Weapon_Flechette CASW_Weapon_Flashlight CASW_Weapon_Flares CASW_Weapon_Flamer CASW_Weapon_Fist CASW_Weapon_FireExtinguisher CASW_Weapon_Electrified_Armor CASW_Weapon_Chainsaw CASW_Weapon_Buff_Grenade CASW_Weapon_Blink CASW_Weapon_Bait CASW_Weapon_Autogun CASW_Weapon_Assault_Shotgun CASW_Weapon_Ammo_Satchel CASW_Weapon_Ammo_Bag CASW_Target_Dummy CASW_Shotgun_Pellet_Predicted CASW_Remote_Turret CASW_Queen_Grabber CASW_Queen_Divers CASW_Prop_Laserable CASW_Powerup_Increased_Speed CASW_Powerup_Explosive_Bullets CASW_Powerup_Chemical_Bullets CASW_Powerup_Electric_Bullets CASW_Powerup_Fire_Bullets CASW_Powerup_Freeze_Bullets CASW_Powerup_Bullets CASW_Powerup CASW_Mortarbug_Shell CASW_Missile_Round CASW_Info_Message CASW_Holo_Sentry CASW_Holdout_Mode CASWHealthBar CAlienSwarmProxy CASW_Equip_Req CASWEnvSpark CASW_Bouncing_Pellet CASW_Grub_Sac CASW_Alien_Goo CASW_Weapon_Rifle CASW_Weapon CASW_VPhysics_NPC CASW_Voting_Missions CASW_Use_Area CASW_TeslaTrap CASW_T75 CASW_Simple_Drone CASW_Simple_Alien CASW_Shieldbug CASW_Shaman CASW_Sentry_Top_Icer CASW_Sentry_Top_Flamer CASW_Sentry_Top CASW_Sentry_Base CASW_Scanner_Info CASW_Rocket CASW_Ranger CASW_Queen_Spit CASW_Queen CASW_Prop_Physics CASW_PointCamera CASW_Player CTEMarineAnimEvent CTEPlayerAnimEvent CASW_Pickup_Weapon_Grenades CASW_Pickup_Weapon_PDW CASW_Pickup_Weapon_Chainsaw CASW_Pickup_Weapon_Mining_Laser CASW_Pickup_Weapon_Pistol CASW_Pickup_Weapon_FireExtinguisher CASW_Pickup_Weapon_Flechette CASW_Pickup_Weapon_Ricochet CASW_Pickup_Weapon_Railgun CASW_Pickup_Weapon_Flamer CASW_Pickup_Weapon_Assault_Shotgun CASW_Pickup_Weapon_Shotgun CASW_Pickup_Weapon_Autogun CASW_Pickup_Weapon_PRifle CASW_Pickup_Weapon_Rifle CASW_Pickup_Weapon CASW_Pickup_Money CASW_Pickup_Weapon_Welder CASW_Pickup_Weapon_Flashlight CASW_Pickup_Hornet_Barrage CASW_Pickup_Weapon_Buff_Grenade CASW_Pickup_Weapon_Heal_Grenade CASW_Pickup_Weapon_T75 CASW_Pickup_Weapon_Mines CASW_Pickup_Weapon_Flares CASW_Pickup_Weapon_Stim CASW_Pickup_Weapon_Medical_Satchel CASW_Pickup_Weapon_Ammo_Satchel CASW_Pickup_Weapon_Ammo_Bag CASW_Pickup_Weapon_Tesla_Trap CASW_Pickup_Weapon_Sentry_Freeze CASW_Pickup_Weapon_Sentry_Cannon CASW_Pickup_Weapon_Sentry_Flamer CASW_Pickup_Weapon_Sentry CASW_Pickup_Weapon_Medkit CASW_Pickup CASWStatueProp CASW_Parasite CASW_Objective_Kill_Queen CASW_Objective_Kill_Goo CASW_Objective_Kill_Eggs CASW_Objective_Kill_Aliens CASW_Objective_Countdown CASW_Objective CASW_Mine CASW_Marker CASW_Marine_Resource CASW_Marine CASW_Laser_Mine CASW_PropJeep CASW_Hack_Wire_Tile CASW_Hack_Computer CASW_Hack CASW_Grub CASW_Emitter CASW_Game_Resource CASW_Flare_Projectile CASW_Flamer_Projectile CASW_Firewall_Piece CFire CASW_Extinguisher_Projectile CASW_Entity_Dissolve CASW_Egg CASW_Dynamic_Light CASW_Dummy_Vehicle CASW_Drone_Advanced CASW_Door_Area CASW_Door CASW_Debrief_Stats CASW_Computer_Area CASW_Client_Corpse CASW_Campaign_Save CASW_Buzzer CASW_Button_Area CASW_BuffGrenade_Projectile CASW_Boomer CASW_AOEGrenade_Projectile CASW_Ammo_Drop CASW_Ammo_PDW CASW_Ammo_Chainsaw CASW_Ammo_Railgun CASW_Ammo_Mining_Laser CASW_Ammo_Pistol CASW_Ammo_Flamer CASW_Ammo_Assault_Shotgun CASW_Ammo_Shotgun CASW_Ammo_Autogun CASW_Ammo_Rifle CASW_Alien CRotorWashEmitter CNPC_CombineGunship CBaseHelicopter AR2Explosion CTEAntlionDust CTestTraceline CTEWorldDecal CTESpriteSpray CTESprite CTESparks CTESmoke CTEShowLine CTEProjectedDecal CTEPlayerDecal CTEPhysicsProp CTEParticleSystem CTEMuzzleFlash CTELargeFunnel CTEKillPlayerAttachments CTEImpact CTEGlowSprite CTEShatterSurface CTEFootprintDecal CTEFizz CTEExplosion CTEEnergySplash CTEEffectDispatch CTEDynamicLight CTEDecal CTEClientProjectile CTEBubbleTrail CTEBubbles CTEBSPDecal CTEBreakModel CTEBloodStream CTEBloodSprite CTEBeamSpline CTEBeamRingPoint CTEBeamRing CTEBeamPoints CTEBeamLaser CTEBeamFollow CTEBeamEnts CTEBeamEntPoint CTEBaseBeam CTEArmorRicochet CTEMetalSparks CSteamJet CSmokeStack DustTrail CFireTrail SporeTrail SporeExplosion RocketTrail SmokeTrail CPropVehicleDriveable ParticleSmokeGrenade CParticleFire MovieExplosion CTEGaussExplosion CEnvQuadraticBeam CEmbers CEnvWind CPrecipitation CPrecipitationBlocker CBaseTempEntity CHandleTest CTeamplayRoundBasedRulesProxy CSpriteTrail CSpriteOriented CSprite CRagdollPropAttached CRagdollProp CPoseController CGameRulesProxy CInfoLadderDismount CFuncLadder CTEFoundryHelpers CEnvDetailController CWorld CWaterLODControl CWaterBullet CVGuiScreen CPropJeep CPropVehicleChoreoGeneric CTriggerPlayerMovement CBaseTrigger CTest_ProxyToggle_Networkable CTesla CTeam CSunlightShadowControl CSun CParticlePerformanceMonitor CSpotlightEnd CSpatialEntity CSlideshowDisplay CShadowControl CSceneEntity CRopeKeyframe CRagdollManager CPhysicsPropMultiplayer CPhysBoxMultiplayer CPropDoorRotating CBasePropDoor CDynamicProp CProp_Hallucination CPostProcessController CPointCommentaryNode CPointCamera CPlayerResource CPlasma CPhysMagnet CPhysicsProp CStatueProp CPhysBox CParticleSystem CMovieDisplay CMaterialModifyControl CLightGlow CInfoOverlayAccessor CFuncTrackTrain CFuncSmokeVolume CFuncRotating CFuncReflectiveGlass CFuncOccluder CFuncMoveLinear CFuncMonitor CFunc_LOD CTEDust CFunc_Dust CFuncConveyor CFuncBrush CBreakableSurface CFuncAreaPortalWindow CFish CFireSmoke CEnvTonemapController CEnvScreenEffect CEnvScreenOverlay CEnvProjectedTexture CEnvParticleScript CGlobalLight CFogController CEnvDOFController CEnvAmbientLight CEntityParticleTrail CEntityFreezing CEntityFlame CEntityDissolve CDynamicLight CColorCorrectionVolume CColorCorrection CBreakableProp CBeamSpotlight CBaseButton CBaseToggle CBasePlayer CBaseFlex CBaseEntity CBaseDoor CBaseCombatCharacter CBaseAnimatingOverlay CBoneFollower CBaseAnimating CAI_BaseNPC CBeam CBaseViewModel CBaseParticleEntity CBaseGrenade CBaseCombatWeapon

#include <windows.h>
#include <cstdio>
#include <iostream>
#include <fstream>
//engine includes
#include "cdll_int.h"
#include "interfaces/interfaces.h"
#include "client_class.h"
#include "icliententitylist.h"
#include "icliententity.h"
using namespace std; //lazy
//prototypes
void __cdecl add_log (char *fmt, ...);
void HackThread(void);
BOOL APIENTRY DllMain(HMODULE hDll, DWORD dwReason, LPVOID lpReserved)
{
switch(dwReason)
{
case DLL_PROCESS_ATTACH:
DisableThreadLibraryCalls(hDll);
CreateThread(0, 0, (LPTHREAD_START_ROUTINE)HackThread, 0, 0, 0);
break;
}
return TRUE;
}
void HackThread(void)
{
while(!GetModuleHandle("client.dll") || !GetModuleHandle("engine.dll"))
{
Sleep(1000);
}
IBaseClientDLL *pBaseClientDLL;
IVEngineClient *pEngineClient;
IClientEntityList *pClientEntityList;
CreateInterfaceFn pBCDLL = (CreateInterfaceFn)GetProcAddress(GetModuleHandle("client.dll"), "CreateInterface");
CreateInterfaceFn pIVEDLL = (CreateInterfaceFn)GetProcAddress(GetModuleHandle("engine.dll"), "CreateInterface");
pBaseClientDLL = (IBaseClientDLL *)pBCDLL(CLIENT_DLL_INTERFACE_VERSION, 0);
pEngineClient = (IVEngineClient *)pIVEDLL(VENGINE_CLIENT_INTERFACE_VERSION, 0);
pClientEntityList = (IClientEntityList*)pBCDLL(VCLIENTENTITYLIST_INTERFACE_VERSION, 0);
add_log("---\npBaseClientDLL: 0x%x\npEngineClient: 0x%x\npClientEntityList: 0x%x\n---\n", pBaseClientDLL, pEngineClient, pClientEntityList);
while(1)
{
if(GetAsyncKeyState(VK_RBUTTON)&1)
{
for(int i=0; i<pClientEntityList->GetHighestEntityIndex(); i++)
{
IClientEntity *pEnt = pClientEntityList->GetClientEntity(i);
Vector pEntPos = pEnt->GetAbsOrigin();
add_log("EntID: %d - Pos: [%f, %f, %f]", i, pEntPos.x, pEntPos.y, pEntPos.z);
}
}
Sleep(50);
}
}
void __cdecl add_log (char *fmt, ...)
{
ofstream ofile;
ofile.open("mylog.txt", ios::app);
if(ofile != NULL)
{
if(!fmt) { return; }
va_list va_alist;
char logbuf[256] = {0};
va_start (va_alist, fmt);
_vsnprintf (logbuf+strlen(logbuf), sizeof(logbuf) - strlen(logbuf), fmt, va_alist);
va_end (va_alist);
ofile << logbuf << endl;
}
ofile.close();
}
