Advertisement
Guest User

Untitled

a guest
Feb 27th, 2015
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 3.80 KB | None | 0 0
  1. int __cdecl qsReadMFT(int hPtree, int pPTNode)
  2. {
  3.   int v2; // eax@2
  4.   int v3; // eax@5
  5.   int rc; // eax@7
  6.   int v5; // ebx@8
  7.   int v6; // ecx@8
  8.   char v7; // al@9
  9.   int v8; // edi@11
  10.   const void *v9; // esi@11
  11.   int v10; // ecx@11
  12.   int v11; // esi@11
  13.   char *v12; // ebx@11
  14.   __int16 v13; // ax@11
  15.   signed int v14; // eax@11
  16.   int v15; // ecx@11
  17.   signed int v16; // ebx@11
  18.   int v17; // edi@11
  19.   int v18; // edx@12
  20.   int v19; // esi@15
  21.   int v20; // edx@15
  22.   int v21; // eax@15
  23.   int v22; // ebx@16
  24.   signed int v23; // eax@16
  25.   char *v24; // ebx@19
  26.   char v25; // zf@19
  27.   int v26; // [sp+Ch] [bp-38h]@13
  28.   int v27; // [sp+Ch] [bp-38h]@15
  29.   int v28; // [sp+10h] [bp-34h]@13
  30.   int v29; // [sp+10h] [bp-34h]@15
  31.   unsigned int v30; // [sp+18h] [bp-2Ch]@10
  32.   int v31; // [sp+1Ch] [bp-28h]@10
  33.   const void *v32; // [sp+20h] [bp-24h]@8
  34.   char v33[16]; // [sp+24h] [bp-20h]@4
  35.   unsigned int pResFSRec; // [sp+34h] [bp-10h]@7
  36.   int v35; // [sp+38h] [bp-Ch]@4
  37.   char *pFSRec; // [sp+3Ch] [bp-8h]@4
  38.   int v37; // [sp+40h] [bp-4h]@7
  39.  
  40.   if ( PGEnabled )
  41.     v2 = TKSSBase;
  42.   else
  43.     v2 = TKSSBase1;
  44.   v35 = 0;
  45.   pFSRec = &v33[v2];
  46.   if ( PGEnabled )
  47.     v3 = TKSSBase;
  48.   else
  49.     v3 = TKSSBase1;
  50.   rc = qsReserveCache((char **)((char *)&pResFSRec + v3), 0x10u);
  51.   v37 = rc;
  52.   if ( !rc )
  53.   {
  54.     v5 = pPTNode + 42;
  55.     *(_DWORD *)pFSRec = 8;
  56.     v32 = (const void *)(pPTNode + 42);
  57.     v6 = pPTNode + 42;
  58.     do
  59.       v7 = *(_BYTE *)v6++;
  60.     while ( v7 );
  61.     v31 = v6 - v5;
  62.     v30 = (v6 - v5 + 3) & 0xFFFFFFFC;
  63.     rc = qsCheckCache(v30);
  64.     v37 = rc;
  65.     if ( !rc )
  66.     {
  67.       v8 = pCurCache;
  68.       qmemcpy((void *)pCurCache, v32, 4 * ((unsigned int)v31 >> 2));
  69.       v9 = (char *)v32 + 4 * ((unsigned int)v31 >> 2);
  70.       v10 = v31 & 3;
  71.       qmemcpy((void *)(v8 + 4 * ((unsigned int)v31 >> 2)), v9, v10);
  72.       v11 = (int)((char *)v9 + v10);
  73.       pCurCache += v30;
  74.       v12 = &pRecStart[v30];
  75.       v13 = (signed __int16)pFSRec;
  76.       pRecStart = v12;
  77.       *((_DWORD *)pFSRec + 3) = v12;
  78.       LOWORD(v11) = *(_WORD *)(pPTNode + 16);
  79.       v14 = SELConvertToLaddr(v13, v31, (int)v12, 0, v11);
  80.       v15 = v11;
  81.       v16 = v14;
  82.       v17 = v14 + *(_WORD *)(pPTNode + 14);
  83.       if ( v17 == -1 )
  84.       {
  85. LABEL_19:
  86.         v24 = pFSRec;
  87.         v25 = v37 == 0;
  88.         *((_DWORD *)pFSRec + 2) = v35;
  89.         *((_DWORD *)v24 + 1) = pRecStart;
  90.         if ( v25 )
  91.           v37 = qsFlushResCache(pResFSRec, v24, 0x10u);
  92.         rc = v37;
  93.       }
  94.       else
  95.       {
  96.         v18 = v35;
  97.         while ( 1 )
  98.         {
  99.           v26 = v18;
  100.           v28 = v15;
  101.           rc = qsCheckCache(0x16u);
  102.           v37 = rc;
  103.           if ( rc )
  104.             break;
  105.           v19 = pCurCache;
  106.           v20 = v26 + 1;
  107.           v27 = v28;
  108.           *(_WORD *)pCurCache = *(_WORD *)(v17 + 111);
  109.           v29 = v20;
  110.           *(_WORD *)(v19 + 2) = *(_WORD *)v17;
  111.           *(_WORD *)(v19 + 4) = *(_WORD *)(v17 + 5);
  112.           *(_WORD *)(v19 + 6) = *(_WORD *)(v17 + 7);
  113.           *(_WORD *)(v19 + 8) = *(_WORD *)(v17 + 79);
  114.           *(_WORD *)(v19 + 10) = *(_WORD *)(v17 + 81);
  115.           *(_DWORD *)(v19 + 12) = *(_DWORD *)(v17 + 97);
  116.           *(_WORD *)(v19 + 16) = *(_WORD *)(v17 + 83);
  117.           *(_WORD *)(v19 + 18) = *(_BYTE *)(v17 + 120);
  118.           qsUpdatePtrs(v19 + 22);
  119.           v15 = v27;
  120.           LOWORD(v21) = *(_WORD *)(v17 + 23);
  121.           v18 = v29;
  122.           if ( (_WORD)v27 != (_WORD)v21 )
  123.           {
  124.             v22 = v21;
  125.             v23 = SELConvertToLaddr(v21, v29, v21, v27, v21);
  126.             v15 = v22;
  127.             v18 = v29;
  128.             v16 = v23;
  129.           }
  130.           v17 = v16 + *(_WORD *)(v17 + 21);
  131.           if ( v17 == -1 )
  132.           {
  133.             v35 = v18;
  134.             goto LABEL_19;
  135.           }
  136.         }
  137.       }
  138.     }
  139.   }
  140.   return rc;
  141. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement