Guest User

drivenote C

a guest
Aug 22nd, 2019
305
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. int __fastcall NoteTaker::userInitiatedNote(NoteTaker *this, const QString *a2, int a3)
  2. {
  3.   NoteTaker *v3; // r6
  4.   NoteTaker *v4; // r7
  5.   int v5; // r8
  6.   int v6; // r10
  7.   int result; // r0
  8.   const QString *v8; // r1
  9.   int v9; // r2
  10.   int v10; // r2
  11.   int v11; // r2
  12.   unsigned int *v12; // r3
  13.   unsigned int v13; // r2
  14.   unsigned int *v14; // r0
  15.   unsigned int v15; // r3
  16.   unsigned int v16; // r3
  17.   unsigned int *v17; // r3
  18.   unsigned int v18; // r2
  19.   unsigned int v19; // r2
  20.   unsigned int *v20; // r3
  21.   unsigned int v21; // r2
  22.   unsigned int v22; // r2
  23.   int v23; // r2
  24.   int v24; // r3
  25.   int v25; // r0
  26.   unsigned int *v26; // r3
  27.   unsigned int v27; // r2
  28.   unsigned int v28; // r2
  29.   unsigned int *v29; // r3
  30.   unsigned int v30; // r2
  31.   unsigned int *v31; // r0
  32.   unsigned int v32; // r3
  33.   unsigned int v33; // r3
  34.   unsigned int *v34; // r3
  35.   unsigned int v35; // r2
  36.   unsigned int v36; // r2
  37.   unsigned int *v37; // r3
  38.   unsigned int v38; // r2
  39.   unsigned int v39; // r2
  40.   unsigned int *v40; // r3
  41.   unsigned int v41; // r2
  42.   unsigned int v42; // r2
  43.   unsigned int *v43; // r3
  44.   unsigned int v44; // r2
  45.   unsigned int v45; // r2
  46.   unsigned int *v46; // r3
  47.   unsigned int v47; // r2
  48.   unsigned int v48; // r2
  49.   unsigned int *v49; // r3
  50.   unsigned int v50; // r2
  51.   unsigned int v51; // r2
  52.   int v52; // [sp+0h] [bp-58h]
  53.   __int16 v53; // [sp+8h] [bp-50h]
  54.   __int16 v54; // [sp+Ch] [bp-4Ch]
  55.   unsigned int *v55; // [sp+10h] [bp-48h]
  56.   unsigned int *v56; // [sp+14h] [bp-44h]
  57.   unsigned int *v57; // [sp+18h] [bp-40h]
  58.   unsigned int *v58; // [sp+1Ch] [bp-3Ch]
  59.   unsigned int *v59; // [sp+20h] [bp-38h]
  60.   unsigned int *v60; // [sp+24h] [bp-34h]
  61.  
  62.   v3 = this;
  63.   v4 = a2;
  64.   if ( !QCoreApplication::self || (v5 = QThread::currentThread(this), v5 != QObject::thread(QCoreApplication::self)) )
  65.   {
  66.     v60 = (unsigned int *)QString::fromAscii_helper((QString *)&unk_9F0ADC, (const char *)0xFFFFFFFF, a3);
  67.     Logger::logAssert(
  68.       (Logger *)"QCoreApplication::instance() && QThread::currentThread() == QCoreApplication::instance()->thread()",
  69.       (const char *)&v60,
  70.       (const QString *)"../../../gui/NoteTaker.cpp",
  71.       (const char *)&word_2E,
  72.       v52);
  73.     v26 = v60;
  74.     do
  75.     {
  76.       v27 = __ldrex(v26);
  77.       v28 = v27 - 1;
  78.     }
  79.     while ( __strex(v28, v26) );
  80.     if ( !v28 )
  81.       QString::free(v60);
  82.   }
  83.   DataValue::ConditionalLocker::ConditionalLocker(
  84.     (DataValue::ConditionalLocker *)&v60,
  85.     (const DataValue *)GUI_showroomMode);
  86.   v6 = GUI_showroomMode[41];
  87.   result = DataValue::LockerBase::~LockerBase((DataValue::LockerBase *)&v60);
  88.   if ( !v6 )
  89.   {
  90.     NoteTaker::runNoteProcess(v4, v8, v9);
  91.     v55 = (unsigned int *)QString::fromAscii_helper((QString *)"Report %1", (const char *)0xFFFFFFFF, v10);
  92.     v53 = 32;
  93.     QString::arg((QString *)&v56, (const QString *)&v55, (int)v4, 0);
  94.     DataValue::EventLocker::EventLocker((DataValue::EventLocker *)&v60, (DataValue *)GUI_lastDriveNote);
  95.     if ( !(GUI_lastDriveNote[8] & 0x10) && GUI_lastDriveNote[2] & 0x20 )
  96.     {
  97.       v58 = (unsigned int *)QString::fromAscii_helper(
  98.                               (QString *)"Protected data value %1 not set with setProtectedValue",
  99.                               (const char *)0xFFFFFFFF,
  100.                               v11);
  101.       QObject::objectName((QObject *)&v57);
  102.       v54 = 32;
  103.       QString::arg((QString *)&v59, (const QString *)&v58, (int)&v57, 0);
  104.       Logger::logAssert(
  105.         (Logger *)"setByListenerNoLock() || !isProtected()",
  106.         (const char *)&v59,
  107.         (const QString *)"../../../utils/DataValue.h",
  108.         (const char *)&elf_hash_bucket[113],
  109.         (int)&v54);
  110.       v43 = v59;
  111.       do
  112.       {
  113.         v44 = __ldrex(v43);
  114.         v45 = v44 - 1;
  115.       }
  116.       while ( __strex(v45, v43) );
  117.       if ( !v45 )
  118.         QString::free(v59);
  119.       v46 = v57;
  120.       do
  121.       {
  122.         v47 = __ldrex(v46);
  123.         v48 = v47 - 1;
  124.       }
  125.       while ( __strex(v48, v46) );
  126.       if ( !v48 )
  127.         QString::free(v57);
  128.       v49 = v58;
  129.       do
  130.       {
  131.         v50 = __ldrex(v49);
  132.         v51 = v50 - 1;
  133.       }
  134.       while ( __strex(v51, v49) );
  135.       if ( !v51 )
  136.         QString::free(v58);
  137.     }
  138.     if ( GUI_lastDriveNote[7] & 1 && QString::operator==(&GUI_lastDriveNote[11], &v56) )
  139.     {
  140.       if ( GUI_lastDriveNote[8] & 2 )
  141.       {
  142.         v29 = v56;
  143.         do
  144.           v30 = __ldrex(v29);
  145.         while ( __strex(v30 + 1, v29) );
  146.         v31 = (unsigned int *)GUI_lastDriveNote[13];
  147.         GUI_lastDriveNote[13] = v29;
  148.         do
  149.         {
  150.           v32 = __ldrex(v31);
  151.           v33 = v32 - 1;
  152.         }
  153.         while ( __strex(v33, v31) );
  154.         if ( !v33 )
  155.           QString::free(v31);
  156.         DataValue::revertPendingNoLock((DataValue *)GUI_lastDriveNote);
  157.       }
  158.     }
  159.     else
  160.     {
  161.       v12 = v56;
  162.       do
  163.         v13 = __ldrex(v12);
  164.       while ( __strex(v13 + 1, v12) );
  165.       v14 = (unsigned int *)GUI_lastDriveNote[13];
  166.       GUI_lastDriveNote[13] = v12;
  167.       do
  168.       {
  169.         v15 = __ldrex(v14);
  170.         v16 = v15 - 1;
  171.       }
  172.       while ( __strex(v16, v14) );
  173.       if ( !v16 )
  174.         QString::free(v14);
  175.       DataValue::setPendingValidNoLock((DataValue *)GUI_lastDriveNote, 1);
  176.     }
  177.     DataValue::EventLocker::~EventLocker((DataValue::EventLocker *)&v60);
  178.     v17 = v56;
  179.     do
  180.     {
  181.       v18 = __ldrex(v17);
  182.       v19 = v18 - 1;
  183.     }
  184.     while ( __strex(v19, v17) );
  185.     if ( !v19 )
  186.       QString::free(v56);
  187.     v20 = v55;
  188.     do
  189.     {
  190.       v21 = __ldrex(v20);
  191.       v22 = v21 - 1;
  192.     }
  193.     while ( __strex(v22, v20) );
  194.     if ( !v22 )
  195.       QString::free(v55);
  196.     DataValue::EventLocker::EventLocker((DataValue::EventLocker *)&v60, (DataValue *)&GUI_driveNoteNotification);
  197.     if ( !(*((_DWORD *)&GUI_driveNoteNotification + 8) & 0x10) && *((_DWORD *)&GUI_driveNoteNotification + 2) & 0x20 )
  198.     {
  199.       v58 = (unsigned int *)QString::fromAscii_helper(
  200.                               (QString *)"Protected data value %1 not set with setProtectedValue",
  201.                               (const char *)0xFFFFFFFF,
  202.                               v23);
  203.       QObject::objectName((QObject *)&v57);
  204.       LOWORD(v56) = 32;
  205.       QString::arg((QString *)&v59, (const QString *)&v58, (int)&v57, 0);
  206.       Logger::logAssert(
  207.         (Logger *)"setByListenerNoLock() || !isProtected()",
  208.         (const char *)&v59,
  209.         (const QString *)"../../../utils/DataValue.h",
  210.         (const char *)&elf_hash_bucket[113],
  211.         (int)&v56);
  212.       v34 = v59;
  213.       do
  214.       {
  215.         v35 = __ldrex(v34);
  216.         v36 = v35 - 1;
  217.       }
  218.       while ( __strex(v36, v34) );
  219.       if ( !v36 )
  220.         QString::free(v59);
  221.       v37 = v57;
  222.       do
  223.       {
  224.         v38 = __ldrex(v37);
  225.         v39 = v38 - 1;
  226.       }
  227.       while ( __strex(v39, v37) );
  228.       if ( !v39 )
  229.         QString::free(v57);
  230.       v40 = v58;
  231.       do
  232.       {
  233.         v41 = __ldrex(v40);
  234.         v42 = v41 - 1;
  235.       }
  236.       while ( __strex(v42, v40) );
  237.       if ( !v42 )
  238.         QString::free(v58);
  239.     }
  240.     v24 = *((_DWORD *)&GUI_driveNoteNotification + 7) & 1;
  241.     if ( v24 && *((_BYTE *)&GUI_driveNoteNotification + 41) )
  242.     {
  243.       if ( *((_DWORD *)&GUI_driveNoteNotification + 8) & 2 )
  244.       {
  245.         *((_BYTE *)&GUI_driveNoteNotification + 43) = v24;
  246.         DataValue::revertPendingNoLock((DataValue *)&GUI_driveNoteNotification);
  247.       }
  248.     }
  249.     else
  250.     {
  251.       *((_BYTE *)&GUI_driveNoteNotification + 43) = 1;
  252.       DataValue::setPendingValidNoLock((DataValue *)&GUI_driveNoteNotification, 1);
  253.     }
  254.     DataValue::EventLocker::~EventLocker((DataValue::EventLocker *)&v60);
  255.     v25 = ConfigIntValue::value((ConfigIntValue *)&DriveNoteTimeout);
  256.     result = SingleShotTimer::singleShot((char *)v3 + 12, v25, v3, "1driveNoteTimeout()", 0);
  257.   }
  258.   return result;
  259. }
RAW Paste Data