daily pastebin goal
34%
SHARE
TWEET

Untitled

a guest Nov 12th, 2017 157 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. signed int __fastcall Aska::TriListComp::DecodeBySimpleLossLessCompression(Aska::TriListComp *this, const unsigned __int16 *a2, unsigned __int16 *a3, unsigned int a4, unsigned int a5)
  2. {
  3.   const signed __int8 *v5; // r6
  4.   unsigned int v6; // r8
  5.   unsigned int v7; // r7
  6.   int *v8; // r1
  7.   unsigned int v9; // r6
  8.   signed int v10; // r8
  9.   int v11; // r0
  10.   unsigned int v12; // r9
  11.   __int16 v13; // r1
  12.   unsigned int v14; // r8
  13.   __int16 v15; // r0
  14.   unsigned int *v16; // r0
  15.   unsigned int *v17; // r0
  16.   __int16 v19; // [sp+0h] [bp-88h]
  17.   __int16 v20; // [sp+2h] [bp-86h]
  18.   __int16 v21; // [sp+4h] [bp-84h]
  19.   __int16 v22; // [sp+6h] [bp-82h]
  20.   __int16 v23; // [sp+8h] [bp-80h]
  21.   __int16 v24; // [sp+Ah] [bp-7Eh]
  22.   _DWORD (__fastcall **v25)(Aska::StaticStream *__hidden); // [sp+Ch] [bp-7Ch]
  23.   __int64 v26; // [sp+10h] [bp-78h]
  24.   void *v27[2]; // [sp+18h] [bp-70h]
  25.   int v28; // [sp+20h] [bp-68h]
  26.   int v29; // [sp+30h] [bp-58h]
  27.   int (**v30)(); // [sp+34h] [bp-54h]
  28.   __int64 v31; // [sp+38h] [bp-50h]
  29.   __int64 v32; // [sp+40h] [bp-48h]
  30.   int v33; // [sp+48h] [bp-40h]
  31.   __int16 v34; // [sp+4Ch] [bp-3Ch]
  32.   __int16 v35; // [sp+4Eh] [bp-3Ah]
  33.  
  34.   v5 = (const signed __int8 *)a2;
  35.   v6 = a4;
  36.   v30 = &off_1E27E1C;
  37.   v31 = 0LL;
  38.   v32 = 0LL;
  39.   v33 = 8;
  40.   v34 = 0;
  41.   v35 = 0;
  42.   if ( this )
  43.   {
  44.     LODWORD(v31) = this;
  45.     HIDWORD(v31) = (unsigned int)a3 >> 1;
  46.     LODWORD(v32) = (unsigned int)a3 >> 1;
  47.   }
  48.   else
  49.   {
  50.     Aska::TArray<unsigned short,false>::Resize(&v30, (unsigned int)a3 >> 1, 0);
  51.   }
  52.   v7 = 0;
  53.   v25 = off_1DD55AC;
  54.   v26 = 0LL;
  55.   *(_QWORD *)v27 = 0LL;
  56.   v28 = 0;
  57.   Aska::StaticStream::Open((Aska::StaticStream *)&v25, v5, v6);
  58.   v9 = v32;
  59.   v10 = 1;
  60.   if ( (_DWORD)v32 )
  61.   {
  62.     while ( 1 )
  63.     {
  64.       v11 = v31 + 2 * v7;
  65.       v12 = *(unsigned __int16 *)(v31 + 2 * v7);
  66.       v13 = *(_WORD *)(v11 + 4);
  67.       v14 = *(unsigned __int16 *)(v11 + 2);
  68.       v22 = *(_WORD *)(v31 + 2 * v7);
  69.       v23 = v14;
  70.       v24 = v13;
  71.       if ( Aska::StaticStream::Write((Aska::StaticStream *)&v25, &v22, 2u, 3u) != 3 )
  72.         break;
  73.       if ( v12 >= v14 )
  74.       {
  75.         v7 += 3;
  76.       }
  77.       else
  78.       {
  79.         v15 = *(_WORD *)(v31 + 2 * (v7 + 3));
  80.         v19 = v12;
  81.         v20 = v15;
  82.         v21 = v14;
  83.         if ( Aska::StaticStream::Write((Aska::StaticStream *)&v25, &v19, 2u, 3u) != 3 )
  84.           break;
  85.         v7 += 4;
  86.       }
  87.       if ( v7 >= v9 )
  88.       {
  89.         v10 = 1;
  90.         goto LABEL_13;
  91.       }
  92.     }
  93.     v10 = 0;
  94.     v29 = 0;
  95.   }
  96. LABEL_13:
  97.   v25 = off_1DD55AC;
  98.   v16 = (unsigned int *)v27[1];
  99.   if ( !v27[1] )
  100.     goto LABEL_32;
  101.   __dmb(0xBu);
  102.   do
  103.     v8 = (int *)__ldrex(v16);
  104.   while ( __strex((unsigned int)v8 - 1, v16) );
  105.   __dmb(0xBu);
  106.   if ( v8 == (int *)((char *)&dword_0 + 1) )
  107.   {
  108. LABEL_32:
  109.     if ( v27[0] )
  110.       operator delete[](v27[0]);
  111.     if ( v27[1] )
  112.       Aska::TSharedPointerCode::DeleteCounter((Aska::TSharedPointerCode *)v27[1], v8);
  113.   }
  114.   *(_QWORD *)v27 = 0LL;
  115.   v17 = (unsigned int *)HIDWORD(v26);
  116.   if ( !HIDWORD(v26) )
  117.     goto LABEL_33;
  118.   __dmb(0xBu);
  119.   do
  120.     v8 = (int *)__ldrex(v17);
  121.   while ( __strex((unsigned int)v8 - 1, v17) );
  122.   __dmb(0xBu);
  123.   if ( v8 == (int *)((char *)&dword_0 + 1) )
  124.   {
  125. LABEL_33:
  126.     if ( (_DWORD)v26 )
  127.       operator delete[]((void *)v26);
  128.     if ( HIDWORD(v26) )
  129.       Aska::TSharedPointerCode::DeleteCounter((Aska::TSharedPointerCode *)HIDWORD(v26), v8);
  130.   }
  131.   return v10;
  132. }
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