Advertisement
animeisgay

css v34 lag exploit source

Aug 20th, 2018
1,713
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.27 KB | None | 0 0
  1. // first: hook WriteUsercmdDeltaToBuffer from IBaseClientDLL (index 20)
  2. bool __fastcall hkdWriteUsercmdDeltaToBuffer(void* ecx, void*, bf_write* buf, int from, int to, bool isnewcommand)
  3. {
  4. auto GetUserCmd = [](int sequence_number)
  5. {
  6. return &(*(CUserCmd**)((DWORD)input + 0xC4))[sequence_number % MULTIPLAYER_BACKUP];
  7. };
  8. static auto WriteUsercmd = (void(__cdecl*)(bf_write*, CUserCmd*, CUserCmd*))(utils->PatternSearch("client.dll", "51 8B 44 24 10 8B 48 04"));
  9.  
  10. CUserCmd nullcmd, *f, *t;
  11.  
  12. if (from == -1)
  13. f = &nullcmd;
  14. else
  15. {
  16. f = GetUserCmd(from);
  17.  
  18. if (!f)
  19. f = &nullcmd;
  20. }
  21.  
  22. t = GetUserCmd(to);
  23. if (!t)
  24. t = &nullcmd;
  25.  
  26. WriteUsercmd(buf, t, f);
  27.  
  28. return (!(*(BYTE*)((DWORD)buf + 0x10)));
  29. }
  30.  
  31. // second: do this in CreateMove hook
  32. auto netchannel = engine->GetNetChannelInfo();
  33. static auto module_engine = (DWORD)GetModuleHandleA("engine.dll");
  34. if (vars->misc_lagexploit && module_engine)
  35. {
  36. bSendPacket = (sequence_number % 10) == 0;
  37. cmd->command_number += vars->misc_lagexploit_amount * MULTIPLAYER_BACKUP;
  38. *(int*)((DWORD)module_engine + 0x39539C) += vars->misc_lagexploit_amount * MULTIPLAYER_BACKUP; // lastoutgoingcommand
  39. *(int*)((DWORD)netchannel + 0x8) += vars->misc_lagexploit_amount * MULTIPLAYER_BACKUP; // m_nOutSequenceNr
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement