Advertisement
Guest User

TraitCore

a guest
Apr 21st, 2019
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.91 KB | None | 0 0
  1. #pragma once
  2.  
  3. struct Structure_User_Command
  4. {
  5. __int8 Add_Bytes_1[12];
  6.  
  7. float View_Angles[3];
  8.  
  9. __int8 Add_Bytes_2[40];
  10. };
  11.  
  12. struct Structure_Verified_User_Command : Structure_User_Command
  13. {
  14. unsigned int Checksum;
  15. };
  16.  
  17. void __fastcall Redirected_Create_Move(void* ECX, void* EDX, int Sequence_Number, float Last_Frame_Time, __int8 Is_Fully_Connected)
  18. {
  19. unsigned long int Previous_Access_Rights;
  20.  
  21. Remove_Redirection(Original_Create_Move, Previous_Access_Rights, Original_Create_Move_Bytes, 1);
  22.  
  23. using Create_Move_Type = void(__thiscall**)(void* ECX, int Sequence_Number, float Last_Frame_Time, __int8 Is_Fully_Connected);
  24.  
  25. (*Create_Move_Type(*(unsigned long int*)ECX + 84))(ECX, Sequence_Number, Last_Frame_Time, Is_Fully_Connected);
  26.  
  27. void* Local_Player = *(void**)((unsigned long int)Client_Module + 12817536);
  28.  
  29. if (Local_Player != nullptr)
  30. {
  31. if (*(__int8*)((unsigned long int)Local_Player + 165) == 0)
  32. {
  33. Structure_User_Command* User_Command = (Structure_User_Command*)(*(unsigned long int*)((unsigned long int)Input + 252) + (Sequence_Number % 90 << 6));
  34.  
  35. Structure_Verified_User_Command* Verified_User_Command = (Structure_Verified_User_Command*)(*(unsigned long int*)((unsigned long int)Input + 256) + sizeof Structure_Verified_User_Command * (Sequence_Number % 90));
  36.  
  37. User_Command->View_Angles[0] = 89;
  38.  
  39. using Set_Verified_User_Command_To_User_Command = void(__thiscall*)(Structure_Verified_User_Command* ECX, Structure_User_Command* User_Command);
  40.  
  41. Set_Verified_User_Command_To_User_Command((unsigned long int)Client_Module + 1268416)(Verified_User_Command, User_Command);
  42.  
  43. using Get_Checksum_Type = unsigned int(__thiscall*)(Structure_User_Command* ECX);
  44.  
  45. Verified_User_Command->Checksum = Get_Checksum_Type((unsigned long int)Client_Module + 2437824)(User_Command);
  46. }
  47. }
  48.  
  49. Restore_Redirection(Original_Create_Move, Redirected_Create_Move, Previous_Access_Rights, 1);
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement