Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement way of checking stored patterns #17

Open
monkeyman192 opened this issue Sep 5, 2024 · 0 comments
Open

Implement way of checking stored patterns #17

monkeyman192 opened this issue Sep 5, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@monkeyman192
Copy link
Owner

For games which receive regular or semi-regular updates, it's recommended that the implementing libraries provide patterns to find functions within the binary, instead of offsets.
One thing that may not be obvious when a game updates is whether or not these stored patterns are still valid.
It would be very helpful to have some way to check the integrity of the stored patterns to ensure that they satisfy two conditions:

  • the pattern is unique within the binary (to get this, we'd need to search the entire binary for all copies of the pattern and make sure that there is only one location)
  • Ensure that the pattern does indeed exist within the binary.

Currently this above process would take a decent amount of time for a large number of patterns. There are two things that would need to be done to improve this.

  1. Use multiprocessing to split the pattern list into multiple chunks to try and parallelize the work.
  2. Look into improvements with pymem such that the process of getting all the offsets for multiple patterns is more efficient
  3. (?) see if there are other libraries or software which can be used which do this process faster than pymem.

Technically, the analysis should be able to be done on the binary without running it, so we don't have to use pymem to read the memory, so we could theoretically take what is done in it and roll our own searching algorithm which is similar but has certain optimizations (eg. if there is a .pdata section, we could get the offsets from that so that we could only search at bytes which are potentially the start of a function, etc)

@monkeyman192 monkeyman192 added the enhancement New feature or request label Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant