π― My First Aimbot
[REVERSE ENGINEERING PROJECT] β’ [ARCHIVED] β’ [HISTORICAL REFERENCE]
A practical study in reverse engineering, memory mapping, and 3D trigonometry.
This repository was my initial foray into game security and memory forensics. It served as a practical educational exercise to understand how external tools interact with a running process's memory space.
Note: As an early learning project, it utilizes hardcoded offsets, basic Windows APIs, and manual entity counting. It does not reflect my current software engineering standards or architectural practices.
For examples of my current work, please visit my Profile.
I developed this External Aimbot for AssaultCube to bridge the gap between high-level game logic and low-level memory management. The tool monitors the game's memory state and calculates the necessary view-angle adjustments to track targets in real-time.
The development process for locating data structures involved:
- Memory Mapping: Used Cheat Engine to reverse engineer the gameβs internal data structures.
- Pointer Scanning: Identified static base pointers and dynamic offsets for the local player (e.g.,
0x0058AC00) and the entity list (e.g.,0x0058AC04). - Data Extraction: Located specific offsets for critical variables including X/Y/Z coordinates, health values (
0xEC), and view-angle Pitch/Yaw registers (0x34).
- Memory Interfacing: Leveraged
ReadProcessMemoryandWriteProcessMemoryvia the Win32 API to externally read state and modify player view angles without injecting dynamic-link libraries (DLLs). - 3D Vector Math: Implemented custom coordinate-transformation logic, leveraging standard C++ math functions (
atan2andacos) to convert 3D Cartesian coordinates into precise pitch and yaw angles for the targeting system. - Targeting Logic: Iterates through the entity list to identify the optimal target based on their proximity to the player's crosshair (calculating the Angle Delta).
Because this was built strictly as a proof-of-concept for learning, several advanced features were intentionally left out of the architecture:
- Visibility Checks: The bot does not parse BSP (Binary Space Partitioning) trees or use raycasting, meaning it will target enemies behind walls.
- Distance Weighting: The targeting logic relies entirely on crosshair proximity rather than factoring in 3D Euclidean distance.
- Dynamic Entity Allocation: Entity counts are manually inputted rather than dynamically read from the game's internal game-state engine.
Building this project provided foundational experience in:
- Systems Programming: Handling Windows process handles (
HANDLE,HWND) and memory access rights (PROCESS_ALL_ACCESS). - Binary Analysis: Navigating memory-mapped addresses, base pointers, and understanding data alignment.
- Applied Math: Utilizing 3D geometry for real-world coordinate transformations.