HalpInterruptBlockSmtSiblings

UINT64 __stdcall HalpInterruptBlockSmtSiblings(){
  int v0; 
  int v1; 
  UINT64 result; 
  int v3; 
  ULONG_PTR v4; 
  unsigned int v5; 
  unsigned int v6; 
  int v7; 
  ULONG_PTR v8; 
  __int128 v9; 
  __int128 v10; 
  __int128 v11; 
  __int128 v12; 
  v0 = HalpInterruptProcessorCount;
  v1 = 0;
  result = (UINT64)KeGetCurrentPrcb();
  v3 = -1;
  v4 = HalpInterruptProcessorState;
  v5 = 0;
  v6 = HalpInterruptProcessorCount;
  v7 = -*(_DWORD *)(result + 156);
  if( (_DWORD)HalpInterruptProcessorCount )
  {
    do
    {
      v8 = v4 + ((unsigned __int64)v5 << 6);
      result = *(_DWORD *)(v8 + 8) & (unsigned int)v7;
      if( (_DWORD)result == v3 )
      {
        *(_BYTE *)(v8 + 56) = 1;
        *(_DWORD *)(v8 + 60) = v1;
        if( v5 != v0 - 1 )
        {
          v9 = *(_OWORD *)v8;
          v10 = *(_OWORD *)(v8 + 16);
          v11 = *(_OWORD *)(v8 + 32);
          v12 = *(_OWORD *)(v8 + 48);
          memmove((UINT8 *)v8, (UINT8 *)(v4 + ((unsigned __int64)(v5 + 1) << 6)), (unsigned __int64)(v0 - v5 - 1) << 6);
          result = (unsigned __int64)(unsigned int)(v0 - 1) << 6;
          *(_OWORD *)(result + v4) = v9;
          *(_OWORD *)(result + v4 + 16) = v10;
          *(_OWORD *)(result + v4 + 32) = v11;
          *(_OWORD *)(result + v4 + 48) = v12;
        }
        --v6;
      }
      else
      {
        v1 = *(_DWORD *)(v8 + 8);
        v3 = v1 & v7;
        ++v5;
      }
    }
    while( v5 < v6 );
    if( v6 != v0 )
    {
      HalpInterruptHyperThreading = 0;
      HalpInterruptBlockedProcessors = v0 - v6;
      HalpInterruptFirstBlockedProcessorIndex = v6;
    }
  }
  return result;
}

Referenced by:

HalpInterruptParseMadt