mirror of
https://github.com/CrazyRedMachine/popnhax.git
synced 2024-12-18 07:55:52 +01:00
20 lines
687 B
C
20 lines
687 B
C
#ifndef __PATCH_H__
|
|
#define __PATCH_H__
|
|
|
|
#include <stdbool.h>
|
|
#include <stddef.h>
|
|
#include <stdint.h>
|
|
|
|
typedef unsigned long DWORD;
|
|
|
|
char *getDllData(const char *dllFilename, DWORD *dllSize);
|
|
|
|
bool rva_to_offset(const char *dllFilename, uint32_t rva, uint32_t *offset);
|
|
bool offset_to_rva(const char *dllFilename, uint32_t offset, uint32_t *rva);
|
|
|
|
void patch_memory(uint64_t patch_addr, char *data, size_t len);
|
|
|
|
bool find_and_patch_hex(const char *dllFilename, const char *find, uint8_t find_size, int64_t shift, const char *replace, uint8_t replace_size);
|
|
void find_and_patch_string(const char *dllFilename, const char *input_string, const char *new_string);
|
|
|
|
#endif |