3
0
mirror of https://github.com/CrazyRedMachine/popnhax.git synced 2024-12-18 07:55:52 +01:00
popnhax/util/patch.h

20 lines
687 B
C
Raw Normal View History

2023-02-10 20:29:11 +01:00
#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);
2023-06-30 00:56:02 +02:00
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);
2023-02-10 20:29:11 +01:00
#endif