How vxcall/dainsleif works
Main Components
• DLL Injection & Entry Point: Represent the overall cheat as a DLL injected into the game. The entry point files (dllmain.cpp/h) initialize the cheat when the DLL is loaded.
• Hooking System: Create a module to encapsulate the “Hook” subdirectory. This module is responsible for intercepting game functions (e.g., rendering, input processing) and redirecting calls to custom functions such as DrawGUI and ControlCursor.
• Cheat/Hack Modules: In a separate compartment, list each hack from the “Hacks” directory (Aimbot, AntiAFK, AntiRecoil, Bunnyhop, ESP, Glow, MinimapHack, Triggerbot). These are the individual functional components that implement specific cheats.
• Interfaces & Game Interaction: Include a component for “Interfaces” which wraps game-provided interfaces and client classes (files like CInput.h, IVEngineClient.h, etc.). This part abstracts the game’s internal API usage.
• Pattern Scanning & Offsets: There’s a module (PatternScanner, Offsets, and related files) responsible for dynamic memory scanning and offset management.
• Settings & Persistence: Add a module showing “Save” functionality where settings (via toml11) and offsets are stored/read from disk.
• Third-Party Dependencies: Illustrate the supporting libraries (imgui for the GUI, minhook for hooking, toml11 for configuration) as external components that are integrated within several modules.
Relationships & Interactions
• The DLL entry point (dllmain.cpp) initializes the cheat and sets up the hooking system.
• The Hooking Module intercepts calls from the game engine and redirects them:
– To the rendering functions (e.g., DrawGUI) for displaying the cheat’s UI (using ImGui).
– To game interfaces for data extraction and manipulation.
• The Cheat/Hack Modules are activated through the cheat’s menu (accessible by pressing INSERT) and call into the Interfaces module for game data (player positions, offsets) and use pattern scanning for dynamic address resolution.
• The Settings Module uses toml11 to load and save configuration such as offset values and hack states. This affects how each hack behaves dynamically.
• Third-party libraries are shown as external dependencies feeding into the Hooking subsystem (minhook), GUI handling (imgui), and configuration (toml11).
Architectural Patterns & Design Principles
• Separation of Concerns: The cheat is broken into distinct modules (hooking, hacks, interface abstraction, settings) allowing clear demarcation of responsibilities.
• Modular Design: Each cheat feature is implemented as its own component under the Hacks directory, making it easier to extend, maintain, or enable/disable features.
• Abstraction Over Game Internals: The Interfaces layer abstracts game engine specifics so that hack modules and pattern scanning can work without direct dependency on raw game code.