Overview
The Osiris source code is organized into a modular structure with clear separation of concerns. All source files are located in theSource/ directory.
Directory Structure
Core Components
BuildConfig.h
Build configuration and compile-time settings
dllmain.cpp
Main DLL entry point and initialization logic
CMakeLists.txt
CMake build configuration for the project
Osiris.vcxproj
Visual Studio project file for Windows builds
Source Directories
CS2/
CS2/
Counter-Strike 2 specific implementations and interfaces. Contains game-specific logic, structures, and integrations.
Common/
Common/
Common utilities and shared code used throughout the project.
Config/
Config/
Configuration management system. Handles loading, saving, and managing user settings.
EntryPoints/
EntryPoints/
Platform-specific entry points for DLL/shared library initialization.
Features/
Features/
Implementation of all game enhancement features such as:
- Visual enhancements
- Player information displays
- Aim assistance
- Bomb alerts
- And other gameplay features
GameClient/
GameClient/
Game client interfaces and interactions. Provides abstractions for communicating with the CS2 client.
GlobalContext/
GlobalContext/
Global state management and context sharing across different modules.
HookContext/
HookContext/
Context management for function hooks and interception points.
Hooks/
Hooks/
Function hooking implementations for intercepting and modifying game behavior.
MemoryAllocation/
MemoryAllocation/
Custom memory allocation system. Implements static memory allocation without heap usage.
MemoryPatterns/
MemoryPatterns/
Memory pattern scanning and signature detection for locating game functions and data.
MemorySearch/
MemorySearch/
Memory searching utilities and helpers for pattern matching.
OutlineGlow/
OutlineGlow/
Implementation of outline glow effects for entities (players, bombs, hostages, etc.).
Platform/
Platform/
Platform-specific implementations for Windows and Linux:
- Windows system calls (WindowsSyscall.asm)
- Custom CRT for Windows (CRTWindows.cpp)
- Linux-specific system interfaces
- Dynamic library loading abstractions
SDL/
SDL/
SDL (Simple DirectMedia Layer) integration for window management and input handling.
UI/
UI/
User interface implementation using the game’s Panorama UI system.
Utils/
Utils/
Utility functions and helper classes used across the codebase.
Verification/
Verification/
Code verification and integrity checking.
Vmt/
Vmt/
Virtual Method Table (VMT) hooking utilities for C++ class method interception.
Build System
CMake Configuration
The project uses a two-level CMake structure:-
Root CMakeLists.txt: Defines project-wide settings
- C++20 standard requirement
- Platform-specific assembly language setup
- Test configuration
- Subdirectory inclusion
-
Source/CMakeLists.txt: Defines the Osiris library target
- Compiler-specific flags
- Release/Debug configurations
- Platform-specific source files
- Linking options
Platform-Specific Files
- Windows
- Linux
Platform/Windows/Syscalls/WindowsSyscall.asm- Direct system call implementationsPlatform/Windows/CRTWindows.cpp- Custom C Runtime (Release builds only)
Architecture Principles
Modular Design
Each directory contains a focused set of related functionality, making the codebase easy to navigate and maintain.
Platform Abstraction
Platform-specific code is isolated in the
Platform/ directory, with common interfaces used throughout.No External Dependencies
All functionality is self-contained with no third-party libraries required.
Static Allocation
Memory is allocated statically through the custom
MemoryAllocation/ system.Key Subsystems
Memory Management
Custom memory allocation system inMemoryAllocation/ that avoids heap allocations entirely. All memory is allocated statically at compile time or from a pre-allocated pool.
Pattern Scanning
TheMemoryPatterns/ and MemorySearch/ directories implement signature scanning to locate game functions and data structures dynamically, ensuring compatibility across game updates.
Hooking System
Two hooking approaches:- VMT Hooking (
Vmt/): For C++ virtual method tables - Function Hooking (
Hooks/): For intercepting specific game functions
UI System
TheUI/ directory integrates with Counter-Strike 2’s built-in Panorama UI framework, providing a native-looking interface without external rendering dependencies.