Advertisement
Guest User

Untitled

a guest
Jun 12th, 2015
436
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 7.38 KB | None | 0 0
  1. int __fastcall ReadNormalField(__int64 a1, __int64 a2, __int64 a3, __int64 a4, char a5)
  2. {
  3.   __int64 v5; // rsi@1
  4.   int v6; // edi@1
  5.   unsigned int v7; // er11@1
  6.   signed __int64 v8; // r8@1
  7.   struct_v9 *v9; // r9@1
  8.   struct_v10_3 *v10; // r10@1
  9.   __int64 v11; // rdx@3
  10.   unsigned int v12; // ebx@3
  11.   __int64 v13; // rax@3
  12.   FieldDescriptor *Field; // rax@3
  13.   struct_v15_2 *v15; // rbp@4
  14.   struct_v16_2 *v16; // rdi@5
  15.   __int64 v17; // rsi@6
  16.   ComplexField *CField; // rcx@9
  17.   __int64 v19; // r8@10
  18.   __int64 v20; // r8@11
  19.   char v21; // r9@12
  20.   __int64 v22; // rbx@14
  21.   FieldDescriptor *v23; // rax@20
  22.   ComplexField *v24; // rax@23
  23.   unsigned int v25; // edx@24
  24.   unsigned int v26; // ecx@24
  25.   __int64 v27; // r9@41
  26.   int v29; // [sp+30h] [bp-148h]@3
  27.   unsigned int v30; // [sp+34h] [bp-144h]@2
  28.   signed __int64 v31; // [sp+38h] [bp-140h]@3
  29.   __int64 v32; // [sp+40h] [bp-138h]@3
  30.   struct_v9 *v33; // [sp+48h] [bp-130h]@3
  31.   __int64 v34[37]; // [sp+50h] [bp-128h]@41
  32.   __int64 v35; // [sp+180h] [bp+8h]@1
  33.   unsigned int v36; // [sp+188h] [bp+10h]@3
  34.   __int64 v37; // [sp+190h] [bp+18h]@1
  35.   __int64 v38; // [sp+198h] [bp+20h]@1
  36.  
  37.   v38 = a4;
  38.   v37 = a3;
  39.   v35 = a1;
  40.   v5 = a3;
  41.   v6 = 0;
  42.   v7 = 0;
  43.   v8 = 0i64;
  44.   v9 = (struct_v9 *)a2;
  45.   v10 = (struct_v10_3 *)a1;
  46.   while ( 1 )
  47.   {
  48.     v30 = v7;
  49. LABEL_3:
  50.     v11 = v9->byte8;
  51.     v12 = v7;
  52.     v13 = v9->dword4;
  53.     v33 = v9;
  54.     v29 = v6;
  55.     Field = &v10->struct_streamreader30.EBXEntry.FieldDescStart[v13];
  56.     v31 = v8;
  57.     v36 = v11;
  58.     LODWORD(v32) = v7;
  59.     if ( v7 < (unsigned int)v11 )
  60.     {
  61.       v15 = (struct_v15_2 *)&Field[v7].reference;
  62.       do
  63.       {
  64.         LODWORD(Field) = v15->dword6;
  65.         v16 = (struct_v16_2 *)(v5 + v15->dword2);
  66.         if ( (_DWORD)Field != -1 )
  67.         {
  68.           v17 = v38 + (unsigned int)Field;
  69.           LODWORD(Field) = ((unsigned int)HIWORD(v15[-1].dword6) >> 4) & 0x1F;
  70.           switch ( (_DWORD)Field )
  71.           {
  72.             case 4:
  73.               Field = (FieldDescriptor *)v10->qword370;
  74.               *(_QWORD *)v17 = v10->qword4C0 + *(&Field->hash + LODWORD(v16->data));
  75.               goto LABEL_35;
  76.             case 3:
  77.               LODWORD(Field) = ReadField_0(&v10->struct_streamreader30, (unsigned int *)&v16->data, (_QWORD *)v17);
  78.               goto LABEL_35;
  79.             case 2:
  80.               CField = &v10->struct_streamreader30.EBXEntry.ComplexDescOffset[v15->word0];
  81.               if ( (CField->type >> 15) & 1 )
  82.               {
  83.                 v19 = CField->offset;
  84.                 LODWORD(Field) = sub_1441D0E8C();
  85.                 goto LABEL_35;
  86.               }
  87.               Field = (FieldDescriptor *)v10->qword418;
  88.               v20 = *((_QWORD *)&Field->hash + v15->word0);
  89.               if ( !v20 )
  90.               {
  91.                 goto LABEL_36;
  92.               }
  93.               v21 = a5;
  94.               if ( !a5 && !((*(_WORD *)(*(_QWORD *)v20 + 8i64) >> 14) & 1) )
  95.               {
  96.                 v22 = CField->secondarySize;
  97.                 sub_142FD04E4(v20);
  98.                 sub_1441D0E8C();
  99.                 v12 = v32;
  100.                 v10 = (struct_v10_3 *)v35;
  101.                 v21 = 1;
  102.               }
  103.               LODWORD(Field) = ReadNormalField(
  104.                                  (__int64)v10,
  105.                                  (__int64)&v10->struct_streamreader30.EBXEntry.ComplexDescOffset[v15->word0],
  106.                                  (__int64)v16,
  107.                                  v17,
  108.                                  v21);
  109.               goto LABEL_35;
  110.             case 0xA:
  111.             case 0xB:
  112.             case 0xC:
  113.               LODWORD(Field) = LOBYTE(v16->data);
  114.               *(_BYTE *)v17 = (_BYTE)Field;
  115.               goto LABEL_36;
  116.             case 0xD:
  117.             case 0xE:
  118.               LODWORD(Field) = LOWORD(v16->data);
  119.               *(_WORD *)v17 = (_WORD)Field;
  120.               goto LABEL_36;
  121.             case 0xF:
  122.             case 0x10:
  123.             case 0x13:
  124.               goto LABEL_18;
  125.             case 0x11:
  126.             case 0x12:
  127.             case 0x14:
  128.               Field = (FieldDescriptor *)v16->data;
  129.               *(_QWORD *)v17 = v16->data;
  130.               goto LABEL_36;
  131.             case 7:
  132.               v23 = (FieldDescriptor *)LODWORD(v16->data);
  133.               if ( (_DWORD)v23 == -1 )
  134.               {
  135.                 v32 = (__int64)&unk_14289EA50;
  136.                 sub_142FCFFAF((__int64)&v32, v11);
  137.                 v11 = v36;
  138.                 Field = (FieldDescriptor *)&unk_14289EA50;
  139.                 *(_QWORD *)v17 = &unk_14289EA50;
  140.               }
  141.               else
  142.               {
  143.                 Field = (FieldDescriptor *)((char *)v23 + v10->qword4D0);
  144.                 *(_QWORD *)v17 = Field;
  145.               }
  146.               goto LABEL_36;
  147.             case 8:
  148.               v24 = &v10->struct_streamreader30.EBXEntry.ComplexDescOffset[v15->word0];
  149.               if ( !(v24->secondarySize & 0x8000) )
  150.               {
  151. LABEL_18:
  152.                 LODWORD(Field) = LODWORD(v16->data);
  153.                 *(_DWORD *)v17 = LODWORD(v16->data);
  154.                 goto LABEL_36;
  155.               }
  156.               v25 = v24->numField;
  157.               v26 = 0;
  158.               Field = &v10->struct_streamreader30.EBXEntry.FieldDescStart[v24->fieldStartIndex];
  159.               if ( !v25 )
  160.               {
  161.                 goto LABEL_35;
  162.               }
  163.               break;
  164.             case 0x15:
  165.               *(_DWORD *)v17 = LODWORD(v16->data);
  166.               *(_DWORD *)(v17 + 4) = HIDWORD(v16->data);
  167.               *(_DWORD *)(v17 + 8) = v16->dword8;
  168.               LODWORD(Field) = v16->dwordC;
  169.               *(_DWORD *)(v17 + 12) = (_DWORD)Field;
  170.               goto LABEL_36;
  171.             case 0x16:
  172.               *(_QWORD *)v17 = v16->data;
  173.               *(_QWORD *)(v17 + 8) = *(_QWORD *)&v16->dword8;
  174.               LODWORD(Field) = v16->dword10;
  175.               *(_DWORD *)(v17 + 16) = (_DWORD)Field;
  176.               goto LABEL_36;
  177.             case 0x17:
  178.               if ( v17 )
  179.               {
  180.                 Field = (FieldDescriptor *)v16->data;
  181.                 *(_QWORD *)v17 = v16->data;
  182.               }
  183.               if ( !*(_QWORD *)v17 )
  184.               {
  185.                 goto LABEL_36;
  186.               }
  187.               LODWORD(Field) = sub_14302DC07(*(_QWORD *)&v10->struct_streamreader30.EBXEntry.gap0[0], v17);
  188.               goto LABEL_35;
  189.             default:
  190.               goto LABEL_36;
  191.             case 0:
  192.               v7 = v30;
  193.               v5 = v37;
  194.               v27 = v15->word0;
  195.               v34[v31] = (__int64)v33;
  196.               v8 = v31 + 1;
  197.               v6 = v29 + 1;
  198.               v9 = (struct_v9 *)&v10->struct_streamreader30.EBXEntry.ComplexDescOffset[v27];
  199.               goto LABEL_3;
  200.           }
  201.           while ( Field->offset != LODWORD(v16->data) )
  202.           {
  203.             ++v26;
  204.             ++Field;
  205.             if ( v26 >= v25 )
  206.             {
  207.               goto LABEL_35;
  208.             }
  209.           }
  210.           *(_DWORD *)v17 = Field->secondaryOffset;
  211. LABEL_35:
  212.           v11 = v36;
  213. LABEL_36:
  214.           v5 = v37;
  215.         }
  216.         v10 = (struct_v10_3 *)v35;
  217.         ++v12;
  218.         v15 = (struct_v15_2 *)((char *)v15 + 16);
  219.         LODWORD(v32) = v12;
  220.       }
  221.       while ( v12 < (unsigned int)v11 );
  222.       v8 = v31;
  223.       v6 = v29;
  224.     }
  225.     if ( !v8 )
  226.     {
  227.       return (signed int)Field;
  228.     }
  229.     v9 = *(&v33 + v8);
  230.     --v6;
  231.     --v8;
  232.     v7 = 1;
  233.   }
  234. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement