Advertisement
keybode

css v34 bf_write

Aug 14th, 2016
454
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.98 KB | None | 0 0
  1. class bf_write
  2. {
  3. public:
  4.     void WriteShort( int val )
  5.     {
  6.         typedef void ( __thiscall* WriteShortFn )( void*, int );
  7.  
  8.         static WriteShortFn pFunction = nullptr;
  9.  
  10.         if( !pFunction )
  11.         {
  12.             pFunction = ( WriteShortFn )Framework::Scan( "engine.dll", "8B 44 24 04 6A 10 50 E8 ?? ?? ?? ?? C2 04 00" ); // 0x202268E0
  13.  
  14.             if( !pFunction )
  15.                 return;
  16.         }
  17.  
  18.         pFunction( this, val );
  19.     }
  20.  
  21.     bool WriteBytes( const void* pBuf, int nBytes )
  22.     {
  23.         typedef void ( __thiscall* WriteBytesFn )( void*, const void*, int );
  24.  
  25.         static WriteBytesFn pFunction = nullptr;
  26.  
  27.         if( !pFunction )
  28.         {
  29.             pFunction = ( WriteBytesFn )Framework::Scan( "engine.dll", "8B 44 24 08 8D 14 C5 ?? ?? ?? ?? 89 54 24 08 E9" ); // 0x20225670
  30.  
  31.             if( !pFunction )
  32.                 return false;
  33.         }
  34.  
  35.         pFunction( this, pBuf, nBytes );
  36.     }
  37.  
  38. public:
  39.     unsigned char*  m_pData;
  40.     int             m_nDataBytes;
  41.     int             m_nDataBits;
  42.     int             m_iCurBit;
  43.     bool            m_bOverflow;
  44.     bool            m_bAssertOnOverflow;
  45.     const char*     m_pDebugName;
  46. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement