mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Inline every signature defined in the SDK (previously each translation unit had its own copy of the signature and function prototype). DLL init is near instant now (85% speed improvements).
22 lines
1.1 KiB
C++
22 lines
1.1 KiB
C++
#pragma once
|
|
|
|
/* ==== PRX ============================================================================================================================================================= */
|
|
inline ADDRESS p_exit_or_terminate_process = g_mGameDll.FindPatternSIMD(reinterpret_cast<rsig_t>("\x40\x53\x48\x83\xEC\x20\x8B\xD9\xE8\x00\x00\x00\x00\x84\xC0"), "xxxxxxxxx????xx");
|
|
inline void (*exit_or_terminate_process)(UINT uExitCode) = (void (*)(UINT))p_exit_or_terminate_process.GetPtr(); /*40 53 48 83 EC 20 8B D9 E8 ? ? ? ? 84 C0 */
|
|
|
|
void PRX_Attach();
|
|
void PRX_Detach();
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
class HPRX : public IDetour
|
|
{
|
|
virtual void debugp()
|
|
{
|
|
std::cout << "| FUN: exit_or_terminate_process : 0x" << std::hex << std::uppercase << p_exit_or_terminate_process.GetPtr() << std::setw(npad) << " |" << std::endl;
|
|
std::cout << "+----------------------------------------------------------------+" << std::endl;
|
|
}
|
|
};
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
REGISTER(HPRX);
|