Skip to main content

Overview

The Osiris source code is organized into a modular structure with clear separation of concerns. All source files are located in the Source/ 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

Counter-Strike 2 specific implementations and interfaces. Contains game-specific logic, structures, and integrations.
Common utilities and shared code used throughout the project.
Configuration management system. Handles loading, saving, and managing user settings.
Platform-specific entry points for DLL/shared library initialization.
Implementation of all game enhancement features such as:
  • Visual enhancements
  • Player information displays
  • Aim assistance
  • Bomb alerts
  • And other gameplay features
Game client interfaces and interactions. Provides abstractions for communicating with the CS2 client.
Global state management and context sharing across different modules.
Context management for function hooks and interception points.
Function hooking implementations for intercepting and modifying game behavior.
Custom memory allocation system. Implements static memory allocation without heap usage.
Memory pattern scanning and signature detection for locating game functions and data.
Memory searching utilities and helpers for pattern matching.
Implementation of outline glow effects for entities (players, bombs, hostages, etc.).
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 (Simple DirectMedia Layer) integration for window management and input handling.
User interface implementation using the game’s Panorama UI system.
Utility functions and helper classes used across the codebase.
Code verification and integrity checking.
Virtual Method Table (VMT) hooking utilities for C++ class method interception.

Build System

CMake Configuration

The project uses a two-level CMake structure:
  1. Root CMakeLists.txt: Defines project-wide settings
    • C++20 standard requirement
    • Platform-specific assembly language setup
    • Test configuration
    • Subdirectory inclusion
  2. Source/CMakeLists.txt: Defines the Osiris library target
    • Compiler-specific flags
    • Release/Debug configurations
    • Platform-specific source files
    • Linking options

Platform-Specific Files

  • Platform/Windows/Syscalls/WindowsSyscall.asm - Direct system call implementations
  • Platform/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 in MemoryAllocation/ that avoids heap allocations entirely. All memory is allocated statically at compile time or from a pre-allocated pool.

Pattern Scanning

The MemoryPatterns/ 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

The UI/ directory integrates with Counter-Strike 2’s built-in Panorama UI framework, providing a native-looking interface without external rendering dependencies.

Build docs developers (and LLMs) love