MaxtorCoder

UnkFunction2

Nov 27th, 2018
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.51 KB | None | 0 0
  1. signed int __thiscall sub_69AD00(_DWORD *this, int a2, int a3)
  2. {
  3.   _DWORD *v3; // esi
  4.   int v4; // eax
  5.   int v6; // eax
  6.   int v7; // ecx
  7.   int v8; // ebx
  8.   int v9; // edx
  9.   int v10; // eax
  10.   unsigned int v11; // edi
  11.   int v12; // eax
  12.   int v13; // ecx
  13.   int v14; // esi
  14.   int v15; // [esp+10h] [ebp-8h]
  15.   int v16; // [esp+14h] [ebp-4h]
  16.   int v17; // [esp+24h] [ebp+Ch]
  17.  
  18.   v3 = this;
  19.   if ( this[2] )
  20.   {
  21.     v4 = this[1];
  22.     this[2] = 0;
  23.     ++*(_DWORD *)(v4 + 16);
  24.   }
  25.   if ( !this[1] )
  26.   {
  27.     if ( !this[4] )
  28.       return -2147467259;
  29.     v6 = sub_69C850(this[3]);
  30.     if ( !v6 )
  31.       return -2147467259;
  32.     v7 = v3[4];
  33.     sub_69C350(v6);
  34.     v3[1] = *(_DWORD *)(v3[4] + 4);
  35.   }
  36.   v8 = a2;
  37.   v9 = a3;
  38.   if ( a2 != a3 )
  39.   {
  40.     while ( 1 )
  41.     {
  42.       v10 = v3[1];
  43.       v11 = *(_DWORD *)(v10 + 12) - *(_DWORD *)(v10 + 16);
  44.       v16 = v9 - v8;
  45.       v15 = v3[1];
  46.       if ( v9 - v8 <= v11 )
  47.         break;
  48.       sub_A6DB00(*(_DWORD *)(v10 + 16), v8, v11);
  49.       *(_DWORD *)(v15 + 16) += v11;
  50.       v8 += v11;
  51.       if ( v16 && !v3[4] )
  52.         return -2147467259;
  53.       if ( !v3[4] )
  54.         return -2147467259;
  55.       v12 = sub_69C850(v3[3]);
  56.       if ( !v12 )
  57.         return -2147467259;
  58.       v13 = v3[4];
  59.       sub_69C350(v12);
  60.       v9 = a3;
  61.       v3[1] = *(_DWORD *)(v3[4] + 4);
  62.       if ( v8 == a3 )
  63.         return 0;
  64.     }
  65.     v14 = v3[1];
  66.     v17 = v9 - v8;
  67.     sub_A6DB00(*(_DWORD *)(v10 + 16), v8, v9 - v8);
  68.     *(_DWORD *)(v14 + 16) += v17;
  69.   }
  70.   return 0;
  71. }
Advertisement
Add Comment
Please, Sign In to add comment