A professional Steam overlay renderer for Team Fortress 2 with ImGui integration and OBS streaming support.
This is a defensive security research tool for understanding overlay hooking techniques. Use responsibly and only for legitimate purposes.
- 64-bit Steam Overlay Hooking: Direct integration with Steam's overlay system
- Pattern-Based Detection: Robust pattern scanning instead of hardcoded offsets
- OBS Stream-Proof: Invisible to OBS - streams see clean gameplay while player sees overlay
- Professional Architecture: Clean, maintainable codebase with proper documentation
- ImGui Integration: Modern immediate-mode GUI for overlay rendering
- Comprehensive Logging: Detailed logging system for debugging and monitoring
TF2SteamOverlay/
├── src/
│ ├── core/ # Core application logic
│ ├── hooks/ # DirectX function hooking
│ ├── ui/ # User interface rendering
│ └── utils/ # Utility functions
├── include/ # Header files (mirrors src structure)
├── external/ # Third-party dependencies (ImGui)
├── docs/ # Documentation
└── build/ # Build artifacts
- Visual Studio 2022 (v143 toolset)
- Windows SDK 10.0 or later
- C++17 support
- Clone the repository
- Open
TF2SteamOverlay.slnin Visual Studio - Select x64 platform (32-bit not supported)
- Build in Release or Debug configuration
- Debug:
bin/x64/Debug/TF2SteamOverlay_d.dll - Release:
bin/x64/Release/TF2SteamOverlay.dll
The overlay system uses pattern scanning to locate Steam overlay functions. Patterns are defined in include/core/Config.h and updated for Steam's new hooking architecture (2025):
namespace Patterns {
// Updated patterns for Steam's FUN_1800899e0 hooking system
constexpr const char* PRESENT_STORAGE = "48 8B ? 88 00 00 00 E8";
constexpr const char* RESET_STORAGE = "48 8B ? 80 00 00 00 E8";
}- Legacy patterns (pre-2025): Direct function pointer access
- Current patterns (2025+): Hook registration function calls with offset parameters
- Detection method: Pattern scanning + LEA instruction extraction for actual function addresses
- Inject the DLL into Team Fortress 2 process
- The overlay will automatically initialize when Steam overlay is ready
- Press F1 to toggle overlay visibility
- Press Insert to toggle the main menu
The overlay includes stream-proof functionality:
- Automatically detects OBS graphics hooks
- Sends clean frames to OBS before rendering overlay
- Completely invisible to streaming software
- No impact on stream quality or performance
Debug logs are written to:
- Console: Real-time output during development
- File:
C:\temp\tf2_steam_overlay.log - Debug Output: Visual Studio output window
Use Ghidra or similar tools to analyze gameoverlayrenderer64.dll:
- Load the DLL in Ghidra
- Search for offset values
80 00 00 00and88 00 00 00in memory - Locate MOV + CALL instruction sequences that load these offsets
- Extract LEA instructions that load the actual Steam function addresses
- Update patterns in
Config.hfollowing the format:48 8B ? [offset] 00 00 00 E8
- Follow the established namespace structure
- Add header declarations in
include/ - Implement functionality in corresponding
src/directory - Update project file with new source files
- Document all public interfaces
- Read-Only Memory Scanning: Only scans for patterns, no arbitrary memory modification
- Validation: All memory accesses are validated before use
- Exception Handling: Graceful error handling prevents crashes
- Steam Compliance: Works within Steam's overlay architecture
MIT License - see LICENSE file for details.
- Fork the repository
- Create a feature branch
- Follow existing code style and documentation standards
- Test thoroughly with TF2
- Submit a pull request
Overlay not appearing:
- Ensure Steam overlay is enabled in TF2
- Check debug logs for initialization errors
- Verify TF2 is running in 64-bit mode
Pattern not found:
- Steam overlay updated - patterns need updating
- Use Ghidra to find new function locations
- Update patterns in Config.h
OBS not detecting clean frames:
- Ensure OBS is using game capture
- Check that graphics-hook64.dll is loaded
- Verify pattern matching in logs
- v2.1.0 (2025-08-01): Updated for Steam's new hooking architecture
- Fixed compatibility with current Steam builds
- Simplified pattern detection using working patterns only
- Improved ImGui initialization and crash prevention
- MinHook integration for robust function hooking
- v2.0.0: Complete rewrite with professional architecture
- v1.x: Legacy versions (deprecated)