Overview
Osiris implements several advanced technical features that make it unique. These constraints ensure minimal footprint, maximum performance, and enhanced detection avoidance.Core Technical Constraints
No C Runtime Library (CRT)
Osiris implements its own minimal runtime on Windows to avoid dependencies on the standard C/C++ runtime library. Implementation Details:- Windows: Custom CRT implementation in
Platform/Windows/CRTWindows.cpp - Linux: Links only against the C library (
-lc), not the C++ standard library - Entry Point: Custom
DllMainentry point instead of standard CRT initialization
Smaller Binary Size
No CRT bloat results in significantly smaller DLL/SO files
Fewer Dependencies
No runtime library dependencies to worry about
Faster Loading
No CRT initialization overhead
Better Control
Complete control over initialization and shutdown
No Heap Memory Allocations
All memory is allocated statically or from pre-allocated memory pools managed by the custom allocation system inMemoryAllocation/.
Why No Heap?
Predictable Performance
Predictable Performance
Static allocation eliminates allocation/deallocation overhead and prevents memory fragmentation.
No Memory Leaks
No Memory Leaks
Without dynamic allocation, memory leaks are impossible.
Deterministic Behavior
Deterministic Behavior
Memory layout is known at compile time, making debugging easier.
Reduced Attack Surface
Reduced Attack Surface
No heap-based vulnerabilities or corruption issues.
No Static Imports (Windows)
All Windows API functions are loaded dynamically at runtime, making the import table empty. Implementation:- System Calls: Direct syscalls via
Platform/Windows/Syscalls/WindowsSyscall.asm - Dynamic Loading: Functions loaded via custom dynamic resolution
- No Import Table: Empty IAT (Import Address Table)
Stealth
Harder to detect by static analysis tools
Flexibility
Can choose which APIs to use at runtime
Compatibility
Better handling of missing or hooked APIs
Security
Avoid IAT hooking attacks
No Thread Creation
All code executes on existing game threads, typically through hooks and callbacks. Rationale:Simplicity
Simplicity
No thread synchronization complexity (mutexes, locks, etc.)
Stability
Stability
Reduces risk of race conditions and deadlocks
Lower Detection Risk
Lower Detection Risk
New threads can be suspicious to anti-cheat systems
Resource Efficiency
Resource Efficiency
No thread overhead or context switching
- Hooks: Function hooks intercept game code execution
- Callbacks: Register callbacks with game systems
- Frame Processing: Work is done during game frame updates
No Exception Handling
Exception handling is disabled to reduce binary size and improve performance. Compiler Flags:No External Dependencies
The entire codebase is self-contained with no third-party libraries. What This Means:Self-Contained
Everything needed is in the repository
No Package Managers
No vcpkg, Conan, or npm needed
Simple Builds
Just compiler and CMake required
Full Control
Complete control over all code
- Operating system APIs (Win32, POSIX)
- Game engine interfaces (Panorama UI, Source 2 SDK)
- Standard C library (minimal usage)
Additional Technical Details
Symbol Visibility
Position Independent Code
Security Hardening (Release vs Debug)
- Release Build
- Debug Build
- Stack protection: Disabled (
/GS-or-fno-stack-protector) - SDL checks: Disabled (
/sdl-) - Exceptions: Disabled
- RTTI: Minimal
- Optimizations: Maximum
Performance Characteristics
Fast Load Time
No CRT initialization, minimal imports
Low Memory Usage
Static allocation, no heap fragmentation
Minimal Overhead
No exception handling, no thread synchronization
Small Binary
No CRT, hidden symbols, stripped binaries
Fast Execution
Optimized release builds, no runtime checks
Predictable
Deterministic behavior, no allocations
Binary Size Comparison
The technical constraints result in very small binaries:- Without these optimizations: ~2-3 MB typical
- With Osiris optimizations: Significantly smaller due to:
- No CRT bloat
- No exception handling tables
- No unwind tables
- Hidden/stripped symbols
- No external dependencies
Development Implications
Plan memory usage at design time
Use fixed-size containers and buffers
Handle errors via return codes or optional types
Hook into game threads instead of creating new ones
Load Windows APIs dynamically
Test both Debug and Release builds regularly
Compatibility
These technical features are compatible with:- Windows 10/11 (x64)
- Linux (x64) with kernel 4.x+
- Counter-Strike 2 latest version