mortalbotec

valorant_debuff_panel_cpp

Jun 16th, 2021
822
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // get interface panels
  2. void __stdcall DebuffPanel( uint32_t eax, uint32_t edx, uint16_t esp, double char panel, short interface_level ) {
  3.     constexpr short hud_panel_xor = memory::xor_ntda_method( panel, ui.register_callback(17, interface_level) );
  4.     constexpr auto hud_panel = CT_HASH32( hud_panel_xor );
  5.    
  6.     // writing to memory
  7.     __asm {
  8.         mov eax, hud_panel_xor
  9.         mov edx, interface_level
  10.         call hud_panel
  11.         add esp, 7
  12.     };
  13.  
  14.     if (hud_panel == panel) {
  15.         // checking level warning
  16.         for (auto & level : ui::InterfaceLevelType( hud_panel_xor )) {
  17.             if (level != interface_level)
  18.                 return NULL;
  19.         }
  20.  
  21.         // register panel onces
  22.         static bool panel_register = true;
  23.         static bool panel_debuff = true ? panel_register : false;
  24.  
  25.         // register panel opts
  26.         const char panel_register_data = hud_panel[3]->NetNtVtbl_PanelLevel;
  27.         unsigned char panel_debuff_data = panel_register_data->NtFnIns_PanelLevel;
  28.  
  29.         // register panel func
  30.         if (panel_register && panel_register_data != memory::xor_ntda_read(panel_debuff_data, {esp, edx, edx + 2})) {
  31.             if (panel_debuff_data == nullptr)
  32.                 return;
  33.  
  34.             panel_register_data[0][5]->SetDataTable(( void* ){ int, int, int + 3 }, { const char, const char, const int, int, int, short });
  35.             panel_debuff_data[3][5]->SetDataTable(( void* ){ double char, short }, { const char, short, short, int });
  36.  
  37.             panel_register = false;
  38.         }
  39.  
  40.  
  41.         // register values to table
  42.         *reinterpret_cast< int* >( *hud_panel_xor + 0x1C ) = ( *int ) panel_register_data.table; // UI_References->m_PanelDataVtblValue(0, 4)
  43.         *reinterpret_cast< char* >( *hud_panel_xor + 0x0B ) = ( *double char ) panel_register_data.table; // UI_References->m_PanelDataVtblValue(0, 2)
  44.         *reinterpret_cast< char* >( *hud_panel_xor + 0x5C ) = ( *short ) panel_register_data.table; // UI_References->m_PanelDataVtblValue(-5, 8)
  45.     }
  46.  
  47.     return panel_register_data.table;
  48. }
RAW Paste Data