CS2-Kit
C++23 library for CS2 Metamod:Source plugin development
Loading...
Searching...
No Matches
SigScanner.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <cstdint>
4
#include <string>
5
6
#ifdef _WIN32
7
#include <windows.h>
8
#endif
9
10
namespace
CS2Kit::Sdk
11
{
12
13
/**
14
* Scan a loaded module's memory for a byte pattern (hex string with '?' wildcards).
15
* Returns the first match address, or nullptr if not found.
16
*/
17
void
*
FindPattern
(
const
char
* moduleName,
const
std::string& pattern);
18
19
/**
20
* Resolve a RIP-relative address: reads the 32-bit displacement at addr+ripOffset
21
* and computes the absolute target as addr + ripOffset + ripSize + displacement.
22
*/
23
uintptr_t
ResolveRelativeAddress
(uintptr_t addr,
int
ripOffset,
int
ripSize);
24
25
}
// namespace CS2Kit::Sdk
CS2Kit::Sdk
Definition
ChatInputCapture.cpp:7
CS2Kit::Sdk::FindPattern
void * FindPattern(const char *moduleName, const std::string &pattern)
Definition
SigScanner.cpp:168
CS2Kit::Sdk::ResolveRelativeAddress
uintptr_t ResolveRelativeAddress(uintptr_t addr, int ripOffset, int ripSize)
Definition
SigScanner.cpp:201
src
Sdk
SigScanner.hpp
Generated by
1.9.8