SmcCacheReference

_SMC_CACHE *__stdcall SmcCacheReference(_SMC_CACHE_MANAGER *CacheMgr, UINT64 CacheId){
  unsigned int v2; 
  _SMC_CACHE *v3; 
  _SMC_CACHE_MANAGER *v4; 
  UINT8 v5; 

  v2 = CacheId;
  v3 = 0i64;
  v4 = &CacheMgr[8 * (CacheId & 0xF)];
  v5 = ExAcquireRundownProtection((_EX_RUNDOWN_REF *)v4 + 1);
  if( v5 )
  {
    if( (v4[6] & 0xFFF) == v2 >> 4 )
    {
      v3 = *(_SMC_CACHE **)v4;
      v5 = 0;
    }
    if( v5 )
      ExReleaseRundownProtection((_EX_RUNDOWN_REF *)v4 + 1);
  }
  return v3;
}

Referenced by:

SmcGetCacheStats
SmcStoreCreate
SmcStoreDelete
SmcStoreResize
SmcVolumePnpNotification