MCPcopy Create free account
hub / github.com/PenguLoader/PenguLoader / find_memory

Method find_memory

core/src/utils/dylib.cc:129–148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

127}
128
129void *dylib::find_memory(const void *rladdr, const char *pattern)
130{
131 bool wildcard;
132 auto patern_bytes = pattern_to_bytes(pattern, &wildcard);
133 if (!patern_bytes.size())
134 return nullptr;
135
136 void *base_address = get_base_address(rladdr);
137 if (!base_address)
138 return nullptr;
139
140 size_t lib_size = get_lib_size(base_address);
141 if (!lib_size)
142 return nullptr;
143
144 if (wildcard)
145 return scan_memory_pattern(base_address, lib_size, patern_bytes);
146 else
147 return scan_memory_bytes(base_address, lib_size, patern_bytes);
148}

Callers

nothing calls this directly

Calls 5

pattern_to_bytesFunction · 0.85
get_base_addressFunction · 0.85
get_lib_sizeFunction · 0.85
scan_memory_patternFunction · 0.85
scan_memory_bytesFunction · 0.85

Tested by

no test coverage detected