Advertisement
Guest User

sdf

a guest
Oct 3rd, 2019
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.84 KB | None | 0 0
  1. auto lobby_stuff::meme_inviter(bool get_collection_size) -> uint16_t {
  2. #pragma pack(push, 1)
  3. struct item_t {
  4. uint16_t idx_next_0, unk_idx_2, idx_prev_4, unk_val_6;
  5. uint64_t steam_id_8;
  6. uint32_t* unk_ptr_16;
  7. }; //Size: 0x0014
  8. #pragma pack(pop)
  9.  
  10. static const auto collection = *(uint32_t**)(Utils::PatternScan(GetModuleHandleA("client_panorama.dll"), "8B 35 ? ? ? ? 66 3B D0 74 07") + 2);
  11.  
  12. if (*collection) {
  13. auto invite_to_lobby = [](uint64_t id) {
  14. class IMatchFramework; // GetMatchSession:13
  15. class ISteamMatchmaking; // InviteUserToLobby:16
  16.  
  17. using GetLobbyId = uint64_t(__thiscall*)(void*);
  18. using GetMatchSession = uintptr_t*(__thiscall*)(IMatchFramework*);
  19. using InviteUserToLobby = bool(__thiscall*)(ISteamMatchmaking*, uint64_t, uint64_t);
  20.  
  21. static const auto match_framework = **reinterpret_cast<IMatchFramework***>(Utils::PatternScan(GetModuleHandleA("client_panorama.dll"), "8B 0D ? ? ? ? 8B 01 FF 50 2C 8D 4B 18") + 0x2);
  22. static const auto steam_matchmaking = **reinterpret_cast<ISteamMatchmaking***>(Utils::PatternScan(GetModuleHandleA("client_panorama.dll"), "8B 3D ? ? ? ? 83 EC 08 8B 4D 08 8B C4") + 0x2);
  23.  
  24. const auto match_session = CallVFunction<GetMatchSession>(match_framework, 13)(match_framework);
  25. if (match_session) {
  26. const uint64_t my_lobby_id = CallVFunction<GetLobbyId>(match_session, 4)(match_session);
  27. CallVFunction<InviteUserToLobby>(steam_matchmaking, 16)(steam_matchmaking, my_lobby_id, id);
  28. }
  29. };
  30.  
  31. auto max_index = ((uint16_t*)collection)[9];
  32.  
  33. if (get_collection_size)
  34. return max_index;
  35.  
  36. for (uint16_t i = 0; i <= max_index; ++i) {
  37. auto item = &((item_t*)*collection)[i];
  38. invite_to_lobby(item->steam_id_8);
  39. }
  40.  
  41. return max_index;
  42. }
  43.  
  44. return 0;
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement