mirror of
https://github.com/djhackersdev/bemanitools.git
synced 2026-08-09 11:47:16 -05:00
feat: Add missing cleanup functions various iidx hook modules
Summary: Test Plan:
This commit is contained in:
parent
f5ed7f5231
commit
51f3b07acf
|
|
@ -64,5 +64,11 @@ static NTSTATUS NTAPI my_RtlMultiByteToUnicodeN(
|
|||
void acp_hook_init(void)
|
||||
{
|
||||
hook_table_apply(NULL, "ntdll.dll", acp_hook_syms, lengthof(acp_hook_syms));
|
||||
log_info("ACP Hook enabled");
|
||||
log_info("Inserted ACP hook");
|
||||
}
|
||||
|
||||
void acp_hook_fini()
|
||||
{
|
||||
hook_table_revert(NULL, "ntdll.dll", acp_hook_syms, lengthof(acp_hook_syms));
|
||||
log_info("Removed ACP hook");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,4 +3,6 @@
|
|||
|
||||
void acp_hook_init(void);
|
||||
|
||||
void acp_hook_fini();
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -117,6 +117,16 @@ void adapter_hook_init(void)
|
|||
{
|
||||
hook_table_apply(
|
||||
NULL, "iphlpapi.dll", adapter_hook_syms, lengthof(adapter_hook_syms));
|
||||
|
||||
log_info("Inserted adapter hooks");
|
||||
}
|
||||
|
||||
void adapter_hook_fini()
|
||||
{
|
||||
hook_table_revert(
|
||||
NULL, "iphlpapi.dll", adapter_hook_syms, lengthof(adapter_hook_syms));
|
||||
|
||||
log_info("Removed adapter hooks");
|
||||
}
|
||||
|
||||
void adapter_hook_override(const char *adapter_address)
|
||||
|
|
|
|||
|
|
@ -7,6 +7,8 @@
|
|||
*/
|
||||
void adapter_hook_init(void);
|
||||
|
||||
void adapter_hook_fini();
|
||||
|
||||
/**
|
||||
* Uses the provided address to try and match a network adapter.
|
||||
* This adapter is then returned as the only adapter.
|
||||
|
|
|
|||
|
|
@ -361,3 +361,14 @@ void hook_setupapi_init(const struct hook_setupapi_data *data)
|
|||
log_info(
|
||||
"Hooked setupapi for %s, %s", data->device_path, data->device_desc);
|
||||
}
|
||||
|
||||
void hook_setupapi_fini()
|
||||
{
|
||||
hook_table_revert(
|
||||
NULL, "setupapi.dll", setupapi_hook_syms, lengthof(setupapi_hook_syms));
|
||||
|
||||
log_info(
|
||||
"Removed hooks setupapi for %s, %s", hook_setupapi_data->device_path, hook_setupapi_data->device_desc);
|
||||
|
||||
hook_setupapi_data = NULL;
|
||||
}
|
||||
|
|
@ -15,4 +15,6 @@ struct hook_setupapi_data {
|
|||
|
||||
void hook_setupapi_init(const struct hook_setupapi_data *data);
|
||||
|
||||
void hook_setupapi_fini();
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -31,3 +31,11 @@ void iidxhook_util_clock_hook_init(void)
|
|||
|
||||
log_info("Inserted clock hooks");
|
||||
}
|
||||
|
||||
void iidxhook_util_clock_hook_fini()
|
||||
{
|
||||
hook_table_revert(
|
||||
NULL, "kernel32.dll", clock_hook_syms, lengthof(clock_hook_syms));
|
||||
|
||||
log_info("Removed clock hooks");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,4 +8,6 @@
|
|||
*/
|
||||
void iidxhook_util_clock_hook_init(void);
|
||||
|
||||
void iidxhook_util_clock_hook_fini();
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -120,6 +120,14 @@ void eamuse_hook_init(void)
|
|||
log_info("Inserted eamuse hooks");
|
||||
}
|
||||
|
||||
void eamuse_hook_fini()
|
||||
{
|
||||
hook_table_revert(
|
||||
NULL, "ws2_32.dll", eamuse_hook_syms, lengthof(eamuse_hook_syms));
|
||||
|
||||
log_info("Removed eamuse hooks");
|
||||
}
|
||||
|
||||
void eamuse_set_addr(const struct net_addr *addr)
|
||||
{
|
||||
char *tmp_str;
|
||||
|
|
|
|||
|
|
@ -9,6 +9,8 @@
|
|||
*/
|
||||
void eamuse_hook_init(void);
|
||||
|
||||
void eamuse_hook_fini();
|
||||
|
||||
/**
|
||||
* Set a net_addr to a eamuse server for the game to connect to.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -81,3 +81,11 @@ void effector_hook_init(void)
|
|||
|
||||
log_info("Inserted rteffect hooks");
|
||||
}
|
||||
|
||||
void effector_hook_fini()
|
||||
{
|
||||
hook_table_revert(
|
||||
NULL, "rteffect.dll", effector_hook_syms, lengthof(effector_hook_syms));
|
||||
|
||||
log_info("Removed rteffect hooks");
|
||||
}
|
||||
|
|
@ -8,4 +8,6 @@
|
|||
*/
|
||||
void effector_hook_init(void);
|
||||
|
||||
void effector_hook_fini();
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -100,6 +100,14 @@ void settings_hook_init(void)
|
|||
log_info("Inserted settings hooks, settings path: %s", settings_path);
|
||||
}
|
||||
|
||||
void settings_hook_fini()
|
||||
{
|
||||
hook_table_revert(
|
||||
NULL, "kernel32.dll", settings_hook_syms, lengthof(settings_hook_syms));
|
||||
|
||||
log_info("Removed settings hooks for settings path: %s", settings_path);
|
||||
}
|
||||
|
||||
void settings_hook_set_path(const char *path)
|
||||
{
|
||||
size_t len;
|
||||
|
|
|
|||
|
|
@ -12,6 +12,8 @@
|
|||
*/
|
||||
void settings_hook_init(void);
|
||||
|
||||
void settings_hook_fini();
|
||||
|
||||
/**
|
||||
* Change the path where settings file are stored.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -232,3 +232,10 @@ void ezusb_mon_hook_init(void)
|
|||
|
||||
log_info("Inserted ezusb mon hooks");
|
||||
}
|
||||
|
||||
void ezusb_mon_hook_fini()
|
||||
{
|
||||
hook_table_revert(NULL, "ezusb.dll", ezusb_mon_hook_syms, lengthof(ezusb_mon_hook_syms));
|
||||
|
||||
log_info("Removed ezusb mon hooks");
|
||||
}
|
||||
|
|
@ -9,4 +9,6 @@
|
|||
*/
|
||||
void ezusb_mon_hook_init(void);
|
||||
|
||||
void ezusb_mon_hook_fini();
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -49,3 +49,11 @@ void ezusb_log_hook_init(void)
|
|||
|
||||
log_info("Inserted ezusb log hooks");
|
||||
}
|
||||
|
||||
void ezusb_log_hook_fini()
|
||||
{
|
||||
hook_table_revert(
|
||||
NULL, "user32.dll", ezusb_log_hook_syms, lengthof(ezusb_log_hook_syms));
|
||||
|
||||
log_info("Removed ezusb log hooks");
|
||||
}
|
||||
|
|
@ -7,4 +7,6 @@
|
|||
*/
|
||||
void ezusb_log_hook_init(void);
|
||||
|
||||
void ezusb_log_hook_fini();
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user