refactor: Soundbank runtime hooking improvement
> change default behaviour to pattern based patch for hooks::soundbank, see #13 > fix broken check for hooks::soundbank unsupported game version
This commit is contained in:
+51
-1
@@ -89,4 +89,54 @@ intptr_t replace_pattern_from(
|
||||
intptr_t usage,
|
||||
intptr_t start_from);
|
||||
|
||||
bool get_pe_identifier(const std::filesystem::path& dll_path, uint32_t* time_date_stamp, uint32_t* address_of_entry_point);
|
||||
bool get_pe_identifier(const std::filesystem::path& dll_path, uint32_t* time_date_stamp, uint32_t* address_of_entry_point);
|
||||
|
||||
union reg_t{
|
||||
struct{
|
||||
unsigned char t;
|
||||
unsigned char v;
|
||||
};
|
||||
unsigned short s;
|
||||
constexpr reg_t(unsigned char t, unsigned char v) : s(v << 8 | t) {}
|
||||
constexpr reg_t(unsigned short s) : s(s) {}
|
||||
};
|
||||
|
||||
enum REGTYPE : unsigned char
|
||||
{
|
||||
GPR_32,
|
||||
GPR_64,
|
||||
GPR_EXT
|
||||
};
|
||||
|
||||
enum REG : unsigned short
|
||||
{
|
||||
EAX = reg_t(GPR_32, 0x05).s,
|
||||
ECX = reg_t(GPR_32, 0x0D).s,
|
||||
EDX = reg_t(GPR_32, 0x15).s,
|
||||
EBX = reg_t(GPR_32, 0x1D).s,
|
||||
ESP = reg_t(GPR_32, 0x25).s,
|
||||
EBP = reg_t(GPR_32, 0x2D).s,
|
||||
ESI = reg_t(GPR_32, 0x35).s,
|
||||
EDI = reg_t(GPR_32, 0x3D).s,
|
||||
RAX = reg_t(GPR_64, 0x05).s,
|
||||
RCX = reg_t(GPR_64, 0x0D).s,
|
||||
RDX = reg_t(GPR_64, 0x15).s,
|
||||
RBX = reg_t(GPR_64, 0x1D).s,
|
||||
RSP = reg_t(GPR_64, 0x25).s,
|
||||
RBP = reg_t(GPR_64, 0x2D).s,
|
||||
RSI = reg_t(GPR_64, 0x35).s,
|
||||
RDI = reg_t(GPR_64, 0x3D).s,
|
||||
R8 = reg_t(GPR_EXT, 0x05).s,
|
||||
R9 = reg_t(GPR_EXT, 0x0D).s,
|
||||
R10 = reg_t(GPR_EXT, 0x15).s,
|
||||
R11 = reg_t(GPR_EXT, 0x1D).s,
|
||||
R12 = reg_t(GPR_EXT, 0x25).s,
|
||||
R13 = reg_t(GPR_EXT, 0x2D).s,
|
||||
R14 = reg_t(GPR_EXT, 0x35).s,
|
||||
R15 = reg_t(GPR_EXT, 0x3D).s
|
||||
};
|
||||
|
||||
intptr_t find_asm_leacstr_from(
|
||||
HMODULE module,
|
||||
reg_t reg,
|
||||
const char *cstr);
|
||||
Reference in New Issue
Block a user