50 bool makeBackup(BYTE *patch_ptr,
size_t patch_size);
83 void add_hook(
const std::string &name, FARPROC function)
85 hooks_map[name] = function;
93 void replace_dll(std::string dll_name,
const std::string &new_dll)
95 dll_replacements_map[dll_name] = new_dll;
104 virtual FARPROC
resolve_func(LPCSTR lib_name, LPCSTR func_name);
107 std::map<std::string, FARPROC> hooks_map;
108 std::map<std::string, std::string> dll_replacements_map;
119 size_t redirect_to_local64(
void *ptr, ULONGLONG new_offset, PatchBackup* backup =
nullptr);
139 size_t redirect_to_local(
void *ptr,
void* new_function_ptr, PatchBackup* backup =
nullptr);
Definitions of the used buffer types. Functions for their allocation and deallocation.
bool makeBackup(BYTE *patch_ptr, size_t patch_size)
void add_hook(const std::string &name, FARPROC function)
virtual FARPROC resolve_func(LPCSTR lib_name, LPCSTR func_name)
void replace_dll(std::string dll_name, const std::string &new_dll)
Definitions of basic Imports Resolver classes. They can be used for filling imports when the PE is lo...
bool replace_target(BYTE *ptr, ULONGLONG dest_addr)
size_t redirect_to_local32(void *ptr, DWORD new_offset, PatchBackup *backup=nullptr)
size_t redirect_to_local64(void *ptr, ULONGLONG new_offset, PatchBackup *backup=nullptr)
size_t redirect_to_local(void *ptr, void *new_function_ptr, PatchBackup *backup=nullptr)