VoltMod
C++23 framework for CS2 server plugins
Loading...
Searching...
No Matches
VtableLookup.cpp File Reference
#include "Engine/Memory/VtableLookup.hpp"
#include "Engine/Memory/SigScanner.hpp"
#include <VoltMod/Core/Log.hpp>
#include <cctype>
#include <cstdint>
#include <cstring>
#include <format>
#include <span>
#include <string>
#include <string_view>
#include <vector>

Go to the source code of this file.

Classes

struct  VoltMod::FoundBase
 

Namespaces

namespace  VoltMod
 

Functions

void * VoltMod::FindVirtualTable (std::string_view moduleName, std::string_view className)
 
static uintptr_t VoltMod::ReadWord (uintptr_t address)
 
static uint32_t VoltMod::ReadU32 (uintptr_t address)
 
static std::vector< uintptr_t > VoltMod::FindWords (std::span< const ScanRange > ranges, uintptr_t value)
 
std::string VoltMod::LengthPrefixedName (std::string_view className)
 
void * VoltMod::FindVirtualTableByTypeName (std::span< const ScanRange > ranges, std::string_view className)
 
bool VoltMod::IsInstanceOf (const void *object, const void *table)
 
static bool VoltMod::LooksLikeTypeInfo (uintptr_t address)
 
static bool VoltMod::NameIs (uintptr_t address, std::string_view wanted)
 
static bool VoltMod::HasSingleBase (uintptr_t typeInfo, const TypeInfoKinds &kinds)
 
static uint32_t VoltMod::BaseCount (uintptr_t typeInfo, const TypeInfoKinds &kinds)
 
static void VoltMod::CollectBases (uintptr_t typeInfo, std::string_view wanted, FoundBase at, const TypeInfoKinds &kinds, int depth, std::vector< FoundBase > &found)
 
Result< int > VoltMod::FindBaseOffsetByTypeInfo (const void *typeInfo, std::string_view baseName, const TypeInfoKinds &kinds)
 
void * VoltMod::FindVirtualTableByTypeInfo (std::span< const ScanRange > ranges, const void *typeInfo, intptr_t offsetToTop)
 

Variables

static constexpr size_t VoltMod::TypeInfoBase = 2 * sizeof(void*)
 
static constexpr size_t VoltMod::TypeInfoFlags = 2 * sizeof(void*)
 
static constexpr size_t VoltMod::TypeInfoCount = TypeInfoFlags + sizeof(uint32_t)
 
static constexpr size_t VoltMod::TypeInfoBaseList = 3 * sizeof(void*)
 
static constexpr size_t VoltMod::BaseEntrySize = 2 * sizeof(void*)
 
static constexpr uintptr_t VoltMod::VirtualBaseFlag = 1
 
static constexpr uint32_t VoltMod::MaxBases = 64
 
static constexpr int VoltMod::MaxDepth = 32