Rename to more appropriate name

This commit is contained in:
Kawe Mazidjatari 2022-05-20 01:12:05 +02:00
parent 93b7a21849
commit ad90ef6813
2 changed files with 9 additions and 9 deletions

View File

@ -19,21 +19,21 @@ SQInteger sqstd_aux_printerror(HSQUIRRELVM v)
return results;
}
SQInteger sqstd_aux_badindex(HSQUIRRELVM v, __m128i* a2, __m128i* a3)
SQInteger sqstd_aux_badlogic(HSQUIRRELVM v, __m128i* a2, __m128i* a3)
{
g_bSQAuxBadIndex = true;
SQInteger results = v_sqstd_aux_badindex(v, a2, a3);
SQInteger results = v_sqstd_aux_badlogic(v, a2, a3);
return results;
}
void SQAUX_Attach()
{
DetourAttach((LPVOID*)&v_sqstd_aux_printerror, &sqstd_aux_printerror);
DetourAttach((LPVOID*)&v_sqstd_aux_badindex, &sqstd_aux_badindex);
DetourAttach((LPVOID*)&v_sqstd_aux_badlogic, &sqstd_aux_badlogic);
}
void SQAUX_Detach()
{
DetourDetach((LPVOID*)&v_sqstd_aux_printerror, &sqstd_aux_printerror);
DetourDetach((LPVOID*)&v_sqstd_aux_badindex, &sqstd_aux_badindex);
DetourDetach((LPVOID*)&v_sqstd_aux_badlogic, &sqstd_aux_badlogic);
}

View File

@ -5,8 +5,8 @@ extern bool g_bSQAuxBadIndex;
inline CMemory p_sqstd_aux_printerror;
inline auto v_sqstd_aux_printerror = p_sqstd_aux_printerror.RCast<SQInteger(*)(HSQUIRRELVM v)>();
inline CMemory p_sqstd_aux_badindex;
inline auto v_sqstd_aux_badindex = p_sqstd_aux_badindex.RCast<SQInteger(*)(HSQUIRRELVM v, __m128i* a2, __m128i* a3)>();
inline CMemory p_sqstd_aux_badlogic;
inline auto v_sqstd_aux_badlogic = p_sqstd_aux_badlogic.RCast<SQInteger(*)(HSQUIRRELVM v, __m128i* a2, __m128i* a3)>();
void SQAUX_Attach();
void SQAUX_Detach();
@ -16,7 +16,7 @@ class VSqStdAux : public IDetour
virtual void GetAdr(void) const
{
spdlog::debug("| FUN: sqstd_aux_printerror : {:#18x} |\n", p_sqstd_aux_printerror.GetPtr());
spdlog::debug("| FUN: sqstd_aux_badindex : {:#18x} |\n", p_sqstd_aux_badindex.GetPtr());
spdlog::debug("| FUN: sqstd_aux_badlogic : {:#18x} |\n", p_sqstd_aux_badlogic.GetPtr());
spdlog::debug("+----------------------------------------------------------------+\n");
}
virtual void GetFun(void) const
@ -28,8 +28,8 @@ class VSqStdAux : public IDetour
p_sqstd_aux_printerror = g_mGameDll.FindPatternSIMD(reinterpret_cast<rsig_t>("\x40\x53\x56\x57\x41\x54\x41\x55\x41\x56\x41\x57\x48\x81\xEC\x00\x00\x00\x00\xFF\x05\x00\x00\x00\x00"), "xxxxxxxxxxxxxxx????xx????");
v_sqstd_aux_printerror = p_sqstd_aux_printerror.RCast<SQInteger(*)(HSQUIRRELVM)>(); /*40 53 56 57 41 54 41 55 41 56 41 57 48 81 EC ?? ?? ?? ?? FF 05 ?? ?? ?? ??*/
#endif
p_sqstd_aux_badindex = g_mGameDll.FindPatternSIMD(reinterpret_cast<rsig_t>("\x48\x8B\xC4\x55\x48\x8B\xEC\x48\x83\xEC\x70\x41\x0F\x10\x00"), "xxxxxxxxxxxxxxx");
v_sqstd_aux_badindex = p_sqstd_aux_badindex.RCast<SQInteger(*)(HSQUIRRELVM, __m128i*, __m128i*)>(); /*48 8B C4 55 48 8B EC 48 83 EC 70 41 0F 10 00*/
p_sqstd_aux_badlogic = g_mGameDll.FindPatternSIMD(reinterpret_cast<rsig_t>("\x48\x8B\xC4\x55\x48\x8B\xEC\x48\x83\xEC\x70\x41\x0F\x10\x00"), "xxxxxxxxxxxxxxx");
v_sqstd_aux_badlogic = p_sqstd_aux_badlogic.RCast<SQInteger(*)(HSQUIRRELVM, __m128i*, __m128i*)>(); /*48 8B C4 55 48 8B EC 48 83 EC 70 41 0F 10 00*/
}
virtual void GetVar(void) const { }
virtual void GetCon(void) const { }