-
Notifications
You must be signed in to change notification settings - Fork 13
Legacy: FindPattern routine
You are reading the documentation of YYToolkit Legacy (v2.x.x) - for documentation on current-gen YYTK, see the Homepage.
Finds an array of bytes in memory, and returns the base address.
uintptr_t FindPattern(
const char* Pattern,
const char* Mask,
uintptr_t Base,
uintptr_t Size
);
The byte pattern to find in memory - can be expressed by an array literal or a string literal (ex. "\x90"
).
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".
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.
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.
The function returns a non-zero value on success.
Otherwise, the function returns 0.