mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2025-01-07 18:03:34 +08:00
parent
532cf59b4f
commit
75424bfb1d
@ -60,6 +60,8 @@ namespace big
|
|||||||
|
|
||||||
detour_hook_helper::add<hooks::format_metric_for_sending>("FMFS", g_pointers->m_format_metric_for_sending);
|
detour_hook_helper::add<hooks::format_metric_for_sending>("FMFS", g_pointers->m_format_metric_for_sending);
|
||||||
|
|
||||||
|
detour_hook_helper::add<hooks::invalid_mods_crash_detour>("IMCD", g_pointers->m_invalid_mods_crash_detour);
|
||||||
|
|
||||||
g_hooking = this;
|
g_hooking = this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -65,6 +65,8 @@ namespace big
|
|||||||
|
|
||||||
static void write_player_gamer_data_node(rage::netObject* player, CPlayerGamerDataNode* node);
|
static void write_player_gamer_data_node(rage::netObject* player, CPlayerGamerDataNode* node);
|
||||||
static bool write_player_game_state_data_node(rage::netObject* player, CPlayerGameStateDataNode* node);
|
static bool write_player_game_state_data_node(rage::netObject* player, CPlayerGameStateDataNode* node);
|
||||||
|
|
||||||
|
static void invalid_mods_crash_detour(int64_t a1, int64_t a2, int a3, char a4);
|
||||||
};
|
};
|
||||||
|
|
||||||
class minhook_keepalive
|
class minhook_keepalive
|
||||||
|
11
src/hooks/protections/invalid_mods_crash_detour.cpp
Normal file
11
src/hooks/protections/invalid_mods_crash_detour.cpp
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#include "hooking.hpp"
|
||||||
|
|
||||||
|
namespace big
|
||||||
|
{
|
||||||
|
void hooks::invalid_mods_crash_detour(int64_t a1, int64_t a2, int a3, char a4)
|
||||||
|
{
|
||||||
|
if(!*(int64_t*)(a1 + 0xD8))
|
||||||
|
return;
|
||||||
|
g_hooking->get_original<hooks::invalid_mods_crash_detour>()(a1, a2, a3, a4);
|
||||||
|
}
|
||||||
|
}
|
@ -398,12 +398,6 @@ namespace big
|
|||||||
m_fipackfile_unmount = ptr.add(1).rip().as<functions::fipackfile_unmount>();
|
m_fipackfile_unmount = ptr.add(1).rip().as<functions::fipackfile_unmount>();
|
||||||
});
|
});
|
||||||
|
|
||||||
// fidevice unmount
|
|
||||||
main_batch.add("FPFUM", "E8 ? ? ? ? 84 C0 74 37 80 3D", [this](memory::handle ptr)
|
|
||||||
{
|
|
||||||
m_fipackfile_unmount = ptr.add(1).rip().as<functions::fipackfile_unmount>();
|
|
||||||
});
|
|
||||||
|
|
||||||
// game version + online version
|
// game version + online version
|
||||||
main_batch.add("GVOV", "8B C3 33 D2 C6 44 24 20", [this](memory::handle ptr)
|
main_batch.add("GVOV", "8B C3 33 D2 C6 44 24 20", [this](memory::handle ptr)
|
||||||
{
|
{
|
||||||
@ -411,6 +405,12 @@ namespace big
|
|||||||
m_online_version = ptr.add(0x24).rip().add(0x20).as<const char*>();
|
m_online_version = ptr.add(0x24).rip().add(0x20).as<const char*>();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Invalid Mods Crash Detour
|
||||||
|
main_batch.add("IMCD", "E8 ? ? ? ? 40 88 7C 24 ? 49 89 9C 24", [this](memory::handle ptr)
|
||||||
|
{
|
||||||
|
m_invalid_mods_crash_detour = ptr.add(1).rip().as<PVOID>();
|
||||||
|
});
|
||||||
|
|
||||||
// Format Metric For Sending
|
// Format Metric For Sending
|
||||||
main_batch.add("FMFS", "48 8B C4 48 89 58 ? 48 89 70 ? 48 89 78 ? 4C 89 70 ? 55 48 8D A8 ? ? ? ? 48 81 EC ? ? ? ? 48 83 3D", [this](memory::handle ptr)
|
main_batch.add("FMFS", "48 8B C4 48 89 58 ? 48 89 70 ? 48 89 78 ? 4C 89 70 ? 55 48 8D A8 ? ? ? ? 48 81 EC ? ? ? ? 48 83 3D", [this](memory::handle ptr)
|
||||||
{
|
{
|
||||||
|
@ -132,6 +132,8 @@ namespace big
|
|||||||
|
|
||||||
const char* m_game_version;
|
const char* m_game_version;
|
||||||
const char* m_online_version;
|
const char* m_online_version;
|
||||||
|
|
||||||
|
PVOID m_invalid_mods_crash_detour{};
|
||||||
};
|
};
|
||||||
|
|
||||||
inline pointers* g_pointers{};
|
inline pointers* g_pointers{};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user