Advertisement
Guest User

Untitled

a guest
Jan 5th, 2021
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. struct PacketData {
  2.  
  3. LittleEndian();
  4. int peer_id;
  5. byte unk1;
  6. byte unk2;
  7. BigEndian();
  8. int dataLength;
  9. byte unk3;
  10. byte unk4;
  11. byte unk5;
  12. string rpc_name;
  13. LittleEndian();
  14. byte params_count;
  15. struct Param {
  16. int type;
  17. if (type == 1)
  18. int value;
  19. if (type == 2)
  20. // Bool encoded as int, realy?
  21. int value;
  22. if (type == 4) {
  23. // I dont think that we need len for string (which is ending with 0x00 always), but ok)
  24. int length;
  25.  
  26. char value[length];
  27.  
  28. // Why we need pads here, its just waste of memory
  29. if (length % 4 > 0)
  30. char pads[4 - length % 4];
  31. }
  32. } param[pd.params_count] <optimize=false>;
  33.  
  34. // I dont understand why i got this word (Node) in every packet end
  35. char node[5];
  36. } pd[7] <optimize=false>;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement