HalpInterruptBlockSmtSiblings

UINT64 __stdcall HalpInterruptBlockSmtSiblings(){
  int v0; 
  int v1; 
  UINT64 result; 
  int v3; 
  char *v4; 
  unsigned int v5; 
  unsigned int v6; 
  int v7; 
  char *v8; 
  __int128 v9; 
  __int128 v10; 
  __int128 v11; 
  __int128 v12; 

  v0 = (int)qword_140C50640;
  v1 = 0;
  result = (UINT64)KeGetCurrentPrcb();
  v3 = -1;
  v4 = (char *)HalpInterruptProcessorState;
  v5 = 0;
  v6 = (unsigned int)qword_140C50640;
  v7 = -*(_DWORD *)(result + 156);
  if( (_DWORD)qword_140C50640 )
  {
    do
    {
      v8 = &v4[64 * (unsigned __int64)v5];
      result = *((_DWORD *)v8 + 2) & (unsigned int)v7;
      if( (_DWORD)result == v3 )
      {
        v8[56] = 1;
        *((_DWORD *)v8 + 15) = v1;
        if( v5 != v0 - 1 )
        {
          v9 = *(_OWORD *)v8;
          v10 = *((_OWORD *)v8 + 1);
          v11 = *((_OWORD *)v8 + 2);
          v12 = *((_OWORD *)v8 + 3);
          memmove(v8, &v4[64 * (unsigned __int64)(v5 + 1)], (v0 - v5 - 1) << 6);
          result = (unsigned __int64)(unsigned int)(v0 - 1) << 6;
          *(_OWORD *)&v4[result] = v9;
          *(_OWORD *)&v4[result + 16] = v10;
          *(_OWORD *)&v4[result + 32] = v11;
          *(_OWORD *)&v4[result + 48] = v12;
        }
        --v6;
      }
      else
      {
        v1 = *((_DWORD *)v8 + 2);
        v3 = v1 & v7;
        ++v5;
      }
    }
    while( v5 < v6 );
    if( v6 != v0 )
    {
      *(&CmpDummyThreadEvent + 7136) = 0;
      *(&CmpDummyThreadEvent + 1780) = v0 - v6;
      *(&CmpDummyThreadEvent + 1765) = v6;
    }
  }
  return result;
}

Referenced by:

HalpInterruptParseMadt