Advertisement
Guest User

PopDefaultProcessorPolicy WRK Original

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