Advertisement
Guest User

Untitled

a guest
Feb 17th, 2020
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 10.61 KB | None | 0 0
  1. int __stdcall Fog_10253(unsigned __int8 *a1, int a2, int (__fastcall *a3)(_DWORD, int), int a4, int a5, int a6)
  2. {
  3.   int v6; // ecx
  4.   unsigned __int8 *v8; // edx
  5.   int v9; // esi
  6.   unsigned __int8 *v10; // ebp
  7.   int v11; // eax
  8.   int v12; // eax
  9.   int v13; // eax
  10.   int v14; // eax
  11.   int v15; // edi
  12.   int v16; // eax
  13.   int v17; // esi
  14.   _DWORD *v18; // ecx
  15.   _DWORD *v19; // ecx
  16.   int v20; // eax
  17.   int v21; // eax
  18.   _DWORD *v22; // ecx
  19.   int v23; // eax
  20.   int v24; // eax
  21.   int v25; // ecx
  22.   int v26; // eax
  23.   int v27; // ecx
  24.   int v28; // eax
  25.   int v29; // ecx
  26.   int v30; // eax
  27.   int v31; // ecx
  28.   int v32; // eax
  29.   int v33; // eax
  30.   int v34; // ecx
  31.   int v35; // eax
  32.   int v36; // edx
  33.   int v37; // ecx
  34.   int v38; // eax
  35.   int v39; // edx
  36.   int v40; // ecx
  37.   int v41; // eax
  38.   BOOL v42; // edx
  39.   int v43; // ecx
  40.   int v44; // eax
  41.   int v45; // ecx
  42.   int v46; // eax
  43.   int v47; // ecx
  44.   int v48; // eax
  45.   int v49; // ecx
  46.   int v50; // eax
  47.   int v51; // ecx
  48.   int v52; // eax
  49.   int v53[64]; // [esp+8h] [ebp-104h]
  50.   int v54; // [esp+108h] [ebp-4h]
  51.  
  52.   v6 = a2;
  53.   if ( a2 <= 0 )
  54.     return 0;
  55.   v8 = a1;
  56.   v9 = 0;
  57.   v10 = a1;
  58.   v54 = 0;
  59.   if ( a2 > 0 )
  60.   {
  61.     while ( 1 )
  62.     {
  63.       v11 = *v10++;
  64.       switch ( v11 )
  65.       {
  66.         case 1:
  67.           v15 = *v10++;
  68.           if ( v15 >= a5 )
  69.             goto LABEL_33;
  70.           v16 = *(_DWORD *)(a4 + 8 * v15 + 4);
  71.           switch ( v16 )
  72.           {
  73.             case 3:
  74.               v17 = sub_6FF69CB0(v53);
  75.               sub_6FF69CB0(v18);
  76.               v20 = sub_6FF69CB0(v19);
  77.               v21 = (*(int (__thiscall **)(int, int, int))(a4 + 8 * v15))(v20, v17, a6);
  78. LABEL_42:
  79.               v9 = v54;
  80.               if ( v54 >= 64 )
  81.                 goto LABEL_160;
  82.               v53[v54] = v21;
  83.               goto LABEL_159;
  84.             case 2:
  85.               sub_6FF69CB0(v53);
  86.               v23 = sub_6FF69CB0(v22);
  87. LABEL_41:
  88.               v21 = (*(int (__thiscall **)(int, _DWORD, int))(a4 + 8 * v15))(v23, 0, a6);
  89.               goto LABEL_42;
  90.             case 1:
  91.               v23 = sub_6FF69CB0(v53);
  92.               goto LABEL_41;
  93.           }
  94.           if ( v16 )
  95.             goto LABEL_33;
  96.           v24 = (*(int (__fastcall **)(_DWORD, _DWORD, _DWORD, int))(a4 + 8 * v15))(0, 0, 0, a6);
  97.           if ( v9 < 64 )
  98.           {
  99.             v53[v9] = v24;
  100.             goto LABEL_159;
  101.           }
  102. LABEL_160:
  103.           v8 = a1;
  104.           v6 = a2;
  105.           if ( v10 - a1 >= a2 )
  106.             return 0;
  107.           break;
  108.         case 2:
  109.         case 3:
  110.           if ( !v9 || v9 <= 0 )
  111.             return 0;
  112.           return v53[v9 - 1];
  113.         case 4:
  114.           if ( !a3 || v10 - v8 >= v6 )
  115.             return 0;
  116.           v12 = a3(*v10, a6);
  117.           if ( v9 >= 64 )
  118.             goto LABEL_10;
  119.           v53[v9] = v12;
  120.           goto LABEL_9;
  121.         case 5:
  122.           if ( !a3 || v10 - v8 >= v6 )
  123.             return 0;
  124.           v13 = a3(*(signed __int16 *)v10, a6);
  125.           if ( v9 >= 64 )
  126.             goto LABEL_16;
  127.           v53[v9] = v13;
  128.           goto LABEL_15;
  129.         case 6:
  130.           if ( !a3 || v10 - v8 >= v6 )
  131.             return 0;
  132.           v14 = a3(*(_DWORD *)v10, a6);
  133.           if ( v9 >= 64 )
  134.             goto LABEL_22;
  135.           v53[v9] = v14;
  136.           goto LABEL_21;
  137.         case 7:
  138.           if ( v10 - v8 >= v6 )
  139.             return 0;
  140.           if ( v9 < 64 )
  141.           {
  142.             v53[v9] = (char)*v10;
  143. LABEL_9:
  144.             v9 = v54++ + 1;
  145.           }
  146. LABEL_10:
  147.           ++v10;
  148.           goto LABEL_160;
  149.         case 8:
  150.           if ( v10 - v8 >= v6 )
  151.             return 0;
  152.           if ( v9 < 64 )
  153.           {
  154.             v53[v9] = *(signed __int16 *)v10;
  155. LABEL_15:
  156.             v9 = v54++ + 1;
  157.           }
  158. LABEL_16:
  159.           v10 += 2;
  160.           goto LABEL_160;
  161.         case 9:
  162.           if ( v10 - v8 >= v6 )
  163.             return 0;
  164.           if ( v9 < 64 )
  165.           {
  166.             v53[v9] = *(_DWORD *)v10;
  167. LABEL_21:
  168.             v9 = v54++ + 1;
  169.           }
  170. LABEL_22:
  171.           v10 += 4;
  172.           goto LABEL_160;
  173.         case 10:
  174.           if ( v9 > 0 )
  175.           {
  176.             v54 = --v9;
  177.             v40 = v53[v9];
  178.           }
  179.           else
  180.           {
  181.             v40 = 0;
  182.           }
  183.           if ( v9 > 0 )
  184.           {
  185.             v54 = --v9;
  186.             v41 = v53[v9];
  187.           }
  188.           else
  189.           {
  190.             v41 = 0;
  191.           }
  192.           if ( v9 >= 64 )
  193.             goto LABEL_160;
  194.           v42 = v41 < v40;
  195.           goto LABEL_158;
  196.         case 11:
  197.           if ( v9 > 0 )
  198.           {
  199.             v54 = --v9;
  200.             v45 = v53[v9];
  201.           }
  202.           else
  203.           {
  204.             v45 = 0;
  205.           }
  206.           if ( v9 > 0 )
  207.           {
  208.             v54 = --v9;
  209.             v46 = v53[v9];
  210.           }
  211.           else
  212.           {
  213.             v46 = 0;
  214.           }
  215.           if ( v9 >= 64 )
  216.             goto LABEL_160;
  217.           v42 = v46 < v45;
  218.           LOBYTE(v42) = v46 > v45;
  219.           goto LABEL_158;
  220.         case 12:
  221.           if ( v9 > 0 )
  222.           {
  223.             v54 = --v9;
  224.             v43 = v53[v9];
  225.           }
  226.           else
  227.           {
  228.             v43 = 0;
  229.           }
  230.           if ( v9 > 0 )
  231.           {
  232.             v54 = --v9;
  233.             v44 = v53[v9];
  234.           }
  235.           else
  236.           {
  237.             v44 = 0;
  238.           }
  239.           if ( v9 >= 64 )
  240.             goto LABEL_160;
  241.           v42 = v44 < v43;
  242.           LOBYTE(v42) = v44 <= v43;
  243.           goto LABEL_158;
  244.         case 13:
  245.           if ( v9 > 0 )
  246.           {
  247.             v54 = --v9;
  248.             v47 = v53[v9];
  249.           }
  250.           else
  251.           {
  252.             v47 = 0;
  253.           }
  254.           if ( v9 > 0 )
  255.           {
  256.             v54 = --v9;
  257.             v48 = v53[v9];
  258.           }
  259.           else
  260.           {
  261.             v48 = 0;
  262.           }
  263.           if ( v9 >= 64 )
  264.             goto LABEL_160;
  265.           v42 = v48 < v47;
  266.           LOBYTE(v42) = v48 >= v47;
  267.           goto LABEL_158;
  268.         case 14:
  269.           if ( v9 > 0 )
  270.           {
  271.             v54 = --v9;
  272.             v49 = v53[v9];
  273.           }
  274.           else
  275.           {
  276.             v49 = 0;
  277.           }
  278.           if ( v9 > 0 )
  279.           {
  280.             v54 = --v9;
  281.             v50 = v53[v9];
  282.           }
  283.           else
  284.           {
  285.             v50 = 0;
  286.           }
  287.           if ( v9 >= 64 )
  288.             goto LABEL_160;
  289.           v42 = v50 == v49;
  290.           goto LABEL_158;
  291.         case 15:
  292.           if ( v9 > 0 )
  293.           {
  294.             v54 = --v9;
  295.             v51 = v53[v9];
  296.           }
  297.           else
  298.           {
  299.             v51 = 0;
  300.           }
  301.           if ( v9 > 0 )
  302.           {
  303.             v54 = --v9;
  304.             v52 = v53[v9];
  305.           }
  306.           else
  307.           {
  308.             v52 = 0;
  309.           }
  310.           if ( v9 >= 64 )
  311.             goto LABEL_160;
  312.           v42 = v52 != v51;
  313. LABEL_158:
  314.           v53[v9] = v42;
  315.           goto LABEL_159;
  316.         case 16:
  317.           if ( v9 > 0 )
  318.           {
  319.             v54 = --v9;
  320.             v25 = v53[v9];
  321.           }
  322.           else
  323.           {
  324.             v25 = 0;
  325.           }
  326.           if ( v9 > 0 )
  327.           {
  328.             v54 = --v9;
  329.             v26 = v53[v9];
  330.           }
  331.           else
  332.           {
  333.             v26 = 0;
  334.           }
  335.           if ( v9 >= 64 )
  336.             goto LABEL_160;
  337.           v53[v9] = v25 + v26;
  338.           goto LABEL_159;
  339.         case 17:
  340.           if ( v9 > 0 )
  341.           {
  342.             v54 = --v9;
  343.             v27 = v53[v9];
  344.           }
  345.           else
  346.           {
  347.             v27 = 0;
  348.           }
  349.           if ( v9 > 0 )
  350.           {
  351.             v54 = --v9;
  352.             v28 = v53[v9];
  353.           }
  354.           else
  355.           {
  356.             v28 = 0;
  357.           }
  358.           if ( v9 >= 64 )
  359.             goto LABEL_160;
  360.           v53[v9] = v28 - v27;
  361.           goto LABEL_159;
  362.         case 18:
  363.           if ( v9 > 0 )
  364.           {
  365.             v54 = --v9;
  366.             v29 = v53[v9];
  367.           }
  368.           else
  369.           {
  370.             v29 = 0;
  371.           }
  372.           if ( v9 > 0 )
  373.           {
  374.             v54 = --v9;
  375.             v30 = v53[v9];
  376.           }
  377.           else
  378.           {
  379.             v30 = 0;
  380.           }
  381.           if ( v9 >= 64 )
  382.             goto LABEL_160;
  383.           v53[v9] = v29 * v30;
  384.           goto LABEL_159;
  385.         case 19:
  386.           if ( v9 > 0 )
  387.           {
  388.             v54 = --v9;
  389.             v31 = v53[v9];
  390.           }
  391.           else
  392.           {
  393.             v31 = 0;
  394.           }
  395.           if ( v9 > 0 )
  396.           {
  397.             v54 = --v9;
  398.             v32 = v53[v9];
  399.           }
  400.           else
  401.           {
  402.             v32 = 0;
  403.           }
  404.           if ( v31 )
  405.           {
  406.             if ( v9 >= 64 )
  407.               goto LABEL_160;
  408.             v53[v9] = v32 / v31;
  409.           }
  410.           else
  411.           {
  412. LABEL_33:
  413.             if ( v9 >= 64 )
  414.               goto LABEL_160;
  415.             v53[v9] = 0;
  416.           }
  417. LABEL_159:
  418.           v9 = v54++ + 1;
  419.           goto LABEL_160;
  420.         case 20:
  421.           if ( v9 > 0 )
  422.           {
  423.             v54 = --v9;
  424.             v36 = v53[v9];
  425.           }
  426.           else
  427.           {
  428.             v36 = 0;
  429.           }
  430.           if ( v9 > 0 )
  431.           {
  432.             v54 = --v9;
  433.             v37 = v53[v9];
  434.           }
  435.           else
  436.           {
  437.             v37 = 0;
  438.           }
  439.           v38 = v37;
  440.           if ( v36 <= 0 )
  441.           {
  442.             v38 = 1;
  443.           }
  444.           else if ( v36 > 1 )
  445.           {
  446.             v39 = v36 - 1;
  447.             do
  448.             {
  449.               v38 *= v37;
  450.               --v39;
  451.             }
  452.             while ( v39 );
  453.           }
  454.           if ( v9 >= 64 )
  455.             goto LABEL_160;
  456.           v53[v9] = v38;
  457.           goto LABEL_159;
  458.         case 21:
  459.           if ( v9 > 0 )
  460.           {
  461.             v54 = --v9;
  462.             v33 = v53[v9];
  463.           }
  464.           else
  465.           {
  466.             v33 = 0;
  467.           }
  468.           if ( v9 >= 64 )
  469.             goto LABEL_160;
  470.           v53[v9] = -v33;
  471.           goto LABEL_159;
  472.         case 22:
  473.           if ( v9 > 0 )
  474.           {
  475.             v54 = --v9;
  476.             v34 = v53[v9];
  477.           }
  478.           else
  479.           {
  480.             v34 = 0;
  481.           }
  482.           if ( v9 > 0 )
  483.           {
  484.             v54 = --v9;
  485.             v35 = v53[v9];
  486.           }
  487.           else
  488.           {
  489.             v35 = 0;
  490.           }
  491.           if ( v9 <= 0 || (--v9, v54 = v9, !v53[v9]) )
  492.             v35 = v34;
  493.           if ( v9 >= 64 )
  494.             goto LABEL_160;
  495.           v53[v9] = v35;
  496.           goto LABEL_159;
  497.       }
  498.     }
  499.   }
  500.   return 0;
  501. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement