SHARE
TWEET

Untitled

PatrickLubinsky Mar 22nd, 2019 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <cstdint>
  2. #include <string>
  3. #include <windows.h>
  4. #include <algorithm>
  5. #include "Memory.h"
  6. #include <vector>
  7.  
  8. using std::string;
  9. using std::to_string;
  10. using std::endl;
  11.  
  12. vector::<string> cheats::arma3::pbo::iteratepbo()
  13. {
  14.     bool ran = false;
  15.     vector<string> data;
  16.     const auto pbo_manager = memory::read<uintptr_t>(offsets::baseAddress + offsets::arma3::pboManager);
  17.     const auto pbo_list = memory::read<uintptr_t>(pbo_manager);
  18.     int loaded = 0;
  19.     sj.qRVM(pbo_manager + 0x8, &loaded, sizeof(uintptr_t));
  20.     for (int i = 0; i < loaded; i++) {
  21.         const auto pbo = memory::read<uintptr_t>(pbo_list + (i * 0x8));
  22.         if (pbo != NULL) {
  23.             const auto pbo_name = memory::read<uintptr_t>(pbo + 0x20);
  24.             const auto pbo_name_length = memory::read<int>(pbo_name + 0x8);
  25.             string pbo_name_string;
  26.             pbo_name_string.resize(pbo_name_length - 1);
  27.             sj.qRVM(pbo_name + 0x10, (void*)pbo_name_string.c_str(), pbo_name_length);
  28.             data.push_back(to_string(i + 1) + " | " + pbo_name_string);
  29.         }
  30.         else {
  31.             break;
  32.         }
  33.     }
  34.     return data;
  35. }
  36.  
  37. bool cheats::arma3::pbo::hidepbo(int number)
  38. {
  39.     bool ran = false;
  40.     string data = "";
  41.     const auto pbo_manager = memory::read<uintptr_t>(offsets::baseAddress + offsets::arma3::pboManager);
  42.     const auto pbo_list = memory::read<uintptr_t>(pbo_manager);
  43.     int loaded = 0;
  44.     sj.qRVM(pbo_manager + 0x8, &loaded, sizeof(uintptr_t));
  45.     for (int i = 0; i < loaded; i++) {
  46.         const auto pbo = memory::read<uintptr_t>(pbo_list + (i * 0x8));
  47.         if (pbo != NULL) {
  48.             const auto pbo_name = memory::read<uintptr_t>(pbo + 0x20);
  49.             const auto pbo_name_length = memory::read<int>(pbo_name + 0x8);
  50.             if (i >= number) {
  51.                 if (!ran) {
  52.                     int nece = loaded - 1;
  53.                     sj.qWVM(pbo_manager + 0x8, &nece, sizeof(int));
  54.                     ran = true;
  55.                 }
  56.                 int x = i + 1;
  57.                 const auto nextValue = memory::read<uintptr_t>(pbo_list + (x * 0x8));//read next pbo
  58.                 namespace memory::write {
  59.                     (pbo_list); +(i * 0x8)"", nextValue);//writing next pbo to previous
  60.             }
  61.         }
  62.         else {
  63.             break;
  64.         }
  65.     }
  66.     return true;
  67. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top