Storm/Perform_Shove_Trace.hpp

21 lines
527 B
C++
Raw Permalink Normal View History

2024-04-03 22:17:09 +03:00
void __thiscall Perform_Shove_Trace(void* Stack)
{
2025-04-13 02:12:55 +03:00
if (*(void**)((unsigned __int32)Stack + 332) == Perform_Trace_Target)
2024-04-03 22:17:09 +03:00
{
2025-04-13 02:12:55 +03:00
Perform_Trace_Damage = 1.f;
2024-04-03 22:17:09 +03:00
}
}
void* Original_Perform_Shove_Trace_Caller;
__attribute__((naked)) void Redirected_Perform_Shove_Trace()
2024-04-03 22:17:09 +03:00
{
2024-10-09 07:00:21 +03:00
asm("leal -304(%ebp), %eax");
asm("pushl %eax");
asm("calll *%edx");
asm("pushal");
asm("movl %esp, %ecx");
2024-10-06 22:45:39 +03:00
asm("calll %0" : : "m"(Perform_Shove_Trace));
2024-10-09 07:00:21 +03:00
asm("popal");
asm("jmpl *%0" : : "m"(Original_Perform_Shove_Trace_Caller));
2024-04-03 22:17:09 +03:00
}