| 74 | } |
| 75 | |
| 76 | static void *scan_memory_bytes(void *data, size_t length, const std::vector<int> &find_bytes) |
| 77 | { |
| 78 | auto image_start = (uint8_t *)data; |
| 79 | auto image_end = image_start + length; |
| 80 | |
| 81 | auto occurrence = std::search(image_start, image_end, find_bytes.begin(), find_bytes.end()); |
| 82 | return (occurrence != image_end) ? occurrence : nullptr; |
| 83 | } |
| 84 | |
| 85 | static void *get_base_address(const void *rladdr) |
| 86 | { |