SHARE
TWEET

Untitled

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