WheapCallInUsePageNotificationCallbacks

NTSTATUS __stdcall WheapCallInUsePageNotificationCallbacks(INT64 a1, CHAR a2, CHAR a3){
  _BYTE *v7; 
  __int64 v8; 
  __int64 v9; 
  _BYTE *v10; 
  __int64 **i; 

  if( *(&WheapErrorSourceTable + 56) != 1 )
    return -1073741823;
  v7 = KeAbPreAcquire((char *)&stru_140CF2E80 + 5304, 0i64, 0i64);
  v10 = v7;
  if( _interlockedbittestandset64((volatile signed __int32 *)&stru_140CF2E80 + 1326, 0i64) )
    ExfAcquirePushLockExclusiveEx((_EX_PUSH_LOCK *)&stru_140CF2E80 + 663, v7, (char *)&stru_140CF2E80 + 5304);
  if( v10 )
    v10[26] |= 1u;
  for( i = (__int64 **)*(&stru_140CF2E80 + 659); i != (__int64 **)((char *)&stru_140CF2E80 + 5272); i = (__int64 **)*i )
  {
    LOBYTE(v9) = a3;
    LOBYTE(v8) = a2;
    ((void(__fastcall *)(INT64, __int64, __int64, __int64 *))i[2])(a1, v8, v9, i[3]);
  }
  if( (_InterlockedExchangeAdd64((_QWORD *)&stru_140CF2E80 + 663, 0xFFFFFFFFFFFFFFFFui64) & 6) == 2 )
    ExfTryToWakePushLock((_EX_PUSH_LOCK *)&stru_140CF2E80 + 663);
  KeAbPostRelease((char *)&stru_140CF2E80 + 5304);
  return 0;
}

Referenced by:

WheapAttemptPhysicalPageOffline