Skip to content
View in the app

A better way to browse. Learn more.

ResHax

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Help us keep the site running.

QQXT (ueni.ueni)

Featured Replies

  • Author
  • Localization

aluigi, posted Sun Oct 19, 2014 3:45 pm (1060)


Maybe they changed the key.
I used a simple encryption aes "\x07\xd4\x55\xc4\x0a\x1c\x31\xd9\xc7\x2b\xfe\x4a\x35\x4d\x5a\x58\xf8\xae\xa7\x73\x22\x5e\x6e\x0d\xaf\x14\x64\xc6\x90\x11\x69\xfe" and it failed.
  • Author
  • Localization

Viserion, posted Mon Nov 03, 2014 9:17 pm (1460)


Sorry to disturb. But someone got any news?

In the client code, this function calls the ueni.ueni

Code:
#define GET_SPLITNAME(STR, LEN)   buf = (byte*)malloc(LEN 1);MEMSET(buf, 0, LEN 1);MEMCPY( buf, decipher.first(), LEN );STR=(char*)buf;decipher.erase(0, LEN   1);free(buf);
void QGameEngine::parseUISource()
{
   GUARD(QGameEngine::parseUISource);
   
   QArray decipher;
   if (!QSystem::loadBinFile("UENI.ueni", decipher))
   {
      WARNF("Failed to load ui pack file \"%s\" !", "UENI.ueni");
      return;
   }

   Rijndael_Imp* encryption = new Rijndael_Imp();
   
   unsigned char key_buff[] = KEY_UI;
   encryption->setkey(key_buff, 32);
   
   encryption->decode(decipher.first(), decipher.size(), 1, 1);
   //QString    packUIContent = (char*)decipher.first();

   // parse file
   byte splitSign = '$';
   byte* buf;
   while (decipher.size())
   {
      QString fname;
      QArray fcontent;
      QString fileLeng;
      
      // find fname
      int id = decipher.find( splitSign );
      if (id == -1)
      {
         break;
      }
      else if( id == 0 )
      {
         decipher.erase(0);
         id = decipher.find( splitSign );
      }
      GET_SPLITNAME(fname, id);
      LOGF(fname);
      // delete fname and split

      //If it is compiled LUA file, change the name
      bool flag = true;
      if( fname.mid(fname.len() - 2, fname.len())==".l" )
      {
         flag = false;
      
         fname = fname.mid(0, fname.len()-2) ".lua";
      }
      //Find the length of the separator
      id = decipher.find(splitSign);
      GET_SPLITNAME(fileLeng, id);
      //Find the length of the contents of the corresponding
      int leng = CStr::atoi(fileLeng);
      fcontent.resize(leng 1);
      fcontent[leng] = 0;
      MEMCPY( fcontent.first(), decipher.first(), leng );

      if( !flag )
         LOGF((char*)fcontent.first());
      decipher.erase(0, leng);

      QGUIFileData fileData;
      fileData.name = fname;
      fileData.content = fcontent;
      fileData.c_size = leng;
      QSystem::saveBinFile( fileData.name, fileData.content ); //GG
      QGUIFrame::uiFiles.push(fileData);

   }

   UNGUARD;
}


loadBinFile
Code:
bool QSystem::loadBinFile( const char* filename, QArray& file )
{
   GUARD(QSystem::loadBinFile);
   QArchive* reader = createReader( filename );
   if( !reader )
      return false;
   int len =  reader->size();
   file.resize(len);
   if( len )
      reader->serialize( (byte*)(&(file[0])), len );
   DELETE reader;
   return true;
   UNGUARD;
}


createReader
Code:
QArchive* QSystem::createReader( const char* filename, bool useCache, bool noFail )
{
   GUARD(QSystem::createReader);
   DWORD  Access    = GENERIC_READ;
   DWORD  WinFlags  = FILE_SHARE_READ;
   DWORD  Create    = OPEN_EXISTING;
   HANDLE Handle    = CreateFile( filename, Access, WinFlags, NULL, Create, FILE_ATTRIBUTE_NORMAL, NULL );
   if( Handle==INVALID_HANDLE_VALUE )
   {
      if( noFail )
         ERRF( "Failed to read file: %s", filename );
      return NULL;
   }
   curLoadFile = filename;
   return NEW QArchiveWinReader( Handle, GetFileSize(Handle,NULL), useCache );
   UNGUARD;
}



Code:
/******************************************************************************
      FILE SYSTEM WRAPPER.
******************************************************************************/
// TODO: Implement cached file archive!!!!!!
/**
 * @class QArchiveWinReader
 *
 * @brief Windows file reader.
 */
#define FILE_BUF_SIZE      65536

//WZ
class QArchiveWinReader : public QArchive
{
public:
    QArchiveWinReader( HANDLE handle, int size, bool buf = 1 )
        :QArchive(true),
        _handle(handle),
        _size(size)
    {
        GUARD(QArchiveWinReader);
        ASSERT( handle );

        //If use buffered file, allocate memory for the buffer.
        if(buf)
        {
            _buf = (byte*)ALLOC(FILE_BUF_SIZE);
            _bufDataPtr =  _buf;
        }
        else
        {
            _buf = _bufDataPtr = NULL;
        }

        _bufFreeSize = 0;

        UNGUARD;
    }
    virtual ~QArchiveWinReader()
    {
        GUARD(~QArchiveWinReader);
        if( _buf ) FREE(_buf);
        if( _handle )
            CloseHandle( _handle );
        _handle = NULL;
        UNGUARD;
    }

    //
    // QArchive interface implementations.
    //
    void serialize( byte* readBuf, int len )
    {
        GUARD(QArchiveWinReader::serialize);
        ASSERT( _pos len <= _size );
        if( len == 0 ) return;

        //Use buffer to optimize read.
        if(_buf)
        {
            if(len < _bufFreeSize)
            {
                MEMCPY(readBuf, _bufDataPtr,len);
                _bufFreeSize -= len;
                _bufDataPtr = len;
                _pos = len;
            }
            else
            {
                MEMCPY(readBuf, _bufDataPtr,_bufFreeSize);
                //Direct read data to readBuf.
                DWORD realRead;
                ReadFile( _handle, readBuf _bufFreeSize, (DWORD)(len - _bufFreeSize), &realRead, NULL );
                if(realRead != len - _bufFreeSize)
            {
               ERRF("Error or invalid operation happened when try to read file %s", QSystem::getCurLoadFile());
                    ERRF("EOS error is : %s", QSystem::getSysError());
                }
                else
                {
                    _pos = _bufFreeSize realRead;
                }
                //Fill the file buffer with data.
                ReadFile( _handle, _buf, FILE_BUF_SIZE, (DWORD*)&_bufFreeSize, NULL );
                _bufDataPtr = _buf;
            }
        }
        else
        {
            //None buffer reading.
            DWORD realRead;
            ReadFile(_handle, readBuf, len, &realRead, NULL);
            if(realRead != len)
         {
            ERRF("Error or invalid operation happened when try to read file %s", QSystem::getCurLoadFile());
            ERRF("EOS error is : %s", QSystem::getSysError());
            }

            _pos = len;
        }

        UNGUARD;
    }
    int size(){   return _size;}
    int tell()   { return _pos; }
    void seek( int newPos )
    {
        GUARD(QArchiveWinReader::seek);
        ASSERT(newPos>=0);
        ASSERT(newPos<=_size);

        //Move file pointer.
        if(SetFilePointer(_handle, newPos, 0, FILE_BEGIN) == 0xffffffff)
        {
            ERRF("Seek failed,OS error is %s", QSystem::getSysError());
        }
        else
        {
            //If succeed to set new file pointer.
            if(_buf)
            {
                //Read data form new position.
                ReadFile( _handle, _buf, FILE_BUF_SIZE, (DWORD*)&_bufFreeSize, NULL );
                if((DWORD)_bufFreeSize != FILE_BUF_SIZE && newPos _bufFreeSize != _size)
            {
               ERRF("Error or invalid operation happened when try to read file %s", QSystem::getCurLoadFile());
               ERRF("EOS error is : %s", QSystem::getSysError());
                    ASSERT((DWORD)_bufFreeSize != FILE_BUF_SIZE);
                }
                _bufDataPtr = _buf;
            }

            _pos = newPos;
        }

        UNGUARD;
    }

protected:
    HANDLE      _handle;   // Handle of the file.

    byte*      _buf;      // precache buffer.
    byte*      _bufDataPtr;
    int         _bufFreeSize;

    int         _size;      // File size.
};
Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.