Advertisement
Guest User

PopDefaultProcessorPolicy WRK Reversed

a guest
Sep 14th, 2017
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.30 KB | None | 0 0
  1. __int64 __fastcall PopDefaultProcessorPolicy(_DWORD *a1)
  2. {
  3.   _DWORD *v1; // rbx@1
  4.   unsigned int v2; // ecx@1
  5.   signed __int64 v3; // rdx@1
  6.   char v4; // al@2
  7.   __int64 result; // rax@4
  8.   int v6; // eax@7
  9.  
  10.   v1 = a1;
  11.   memset(a1, 0, 0x4Cui64);
  12.   *v1 = 1;
  13.   v1[3] = 3;
  14.   v2 = 0;
  15.   v3 = (v1 + 6);
  16.   do
  17.   {
  18.     *(v3 - 8) = PopIdleTimeCheck;
  19.     *v3 = PopIdleDefaultPromoteTime;
  20.     *(v3 - 4) = PopIdleDefaultDemoteTime;
  21.     *(v3 + 5) = PopIdleDefaultPromotePercent;
  22.     v4 = PopIdleDefaultDemotePercent;
  23.     *(v3 + 8) |= 3u;
  24.     *(v3 + 4) = v4;
  25.     if ( v2 )
  26.     {
  27.       if ( v2 == 1 )
  28.       {
  29.         v1[10] = PopIdleDefaultDemoteToC1Time;
  30.         result = PopIdleDefaultDemoteToC1Percent;
  31.         *(v1 + 48) = PopIdleDefaultDemoteToC1Percent;
  32.       }
  33.       else
  34.       {
  35.         result = v2 - 2;
  36.         if ( v2 == 2 )
  37.         {
  38.           v1[18] &= 0xFFFFFFFD;
  39.           v1[16] = -1;
  40.           *(v1 + 69) = 0;
  41.         }
  42.       }
  43.     }
  44.     else
  45.     {
  46.       v1[6] = PopIdleDefaultPromoteFromC1Time;
  47.       *(v1 + 29) = PopIdleDefaultPromoteFromC1Percent;
  48.       v6 = PopIdle0TimeCheck;
  49.       v1[8] &= 0xFFFFFFFE;
  50.       v1[4] = v6;
  51.       result = PopIdleTo0Percent;
  52.       *(v1 + 28) = PopIdleTo0Percent;
  53.     }
  54.     ++v2;
  55.     v3 += 20i64;
  56.   }
  57.   while ( v2 < 3 );
  58.   return result;
  59. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement