Legacy: FindPattern routine - AurieFramework/YYToolkit GitHub Wiki
Homepage.
You are reading the documentation of YYToolkit Legacy (v2.x.x) - for documentation on current-gen YYTK, see theFinds an array of bytes in memory, and returns the base address.
Syntax
uintptr_t FindPattern(
const char* Pattern,
const char* Mask,
uintptr_t Base,
uintptr_t Size
);
Parameters
Pattern
The byte pattern to find in memory - can be expressed by an array literal or a string literal (ex. "\x90"
).
Mask
The mask to apply to the pattern. The mask's length shouldn't exceed the length of Pattern
.
A typical mask looks like this: xxxx?xxx???x
.
The '?' character can be used as a wildcard for "anything", while the 'x' character means "search for this exact byte".
Base
Optional parameter that dictates the start location of the scan.
To scan the whole base module (the runner exe), set both Base
and Size
to 0.
Size
Optional parameter that dictates the end offset for the scan.
The actual end location, provided Base and Size aren't 0, is as follows: Base + Size
.
To scan the whole base module (the runner exe), set both Base
and Size
to 0.
Return Value
The function returns a non-zero value on success.
Otherwise, the function returns 0.