HalpMcRecordProcessorInfo

NTSTATUS __stdcall HalpMcRecordProcessorInfo(INT64 a1){
  int v1; 
  __int64 **v3; 
  __int64 *v4; 
  VOID **PoolWithTag; 
  VOID **v7; 
  __int64 v8; 

  v1 = *(_DWORD *)(a1 + 16);
  if( v1 == -2 )
  {
    HalpMcSetUpdateInfoInvalid();
    *(&CmpDummyThreadEvent + 6849) = 0;
    return 0;
  }
  if( !*(&CmpDummyThreadEvent + 6848) || v1 == -1 )
    return 0;
  v3 = (__int64 **)*(&CmpDummyThreadEvent + 848);
  if( (_UNKNOWN *)*(&CmpDummyThreadEvent + 848) != (_UNKNOWN *)((char *)&CmpDummyThreadEvent + 6784) )
  {
    v4 = *(__int64 **)(a1 + 24);
    while( v3[3] != v4 )
    {
      v3 = (__int64 **)*v3;
      if( v3 == (__int64 **)((char *)&CmpDummyThreadEvent + 6784) )
        goto LABEL_8;
    }
    return 0;
  }
LABEL_8:
  PoolWithTag = ExAllocatePoolWithTag(1ui64, 0x30ui64, 543973704i64);
  v7 = PoolWithTag;
  if( PoolWithTag )
  {
    *(_OWORD *)PoolWithTag = 0i64;
    *((_OWORD *)PoolWithTag + 1) = 0i64;
    *((_OWORD *)PoolWithTag + 2) = 0i64;
    PoolWithTag[3] = *(VOID **)(a1 + 24);
    v8 = *(&CmpDummyThreadEvent + 848);
    if( *(_UNKNOWN **)(*(&CmpDummyThreadEvent + 848) + 8i64) != (_UNKNOWN *)((char *)&CmpDummyThreadEvent + 6784) )
      __fastfail(3u);
    *v7 = (VOID *)*(&CmpDummyThreadEvent + 848);
    v7[1] = (char *)&CmpDummyThreadEvent + 6784;
    *(_QWORD *)(v8 + 8) = v7;
    *(&CmpDummyThreadEvent + 848) = v7;
    return 0;
  }
  HalpMcSetUpdateInfoInvalid();
  return -1073741801;
}

Referenced by:

HalpMcInitializeMicrocodeInfo
HalpMcUpdateMicrocode