KeVerifyContextIpForUserCet

INT64 __fastcall KeVerifyContextIpForUserCet(INT64 a1, INT64 a2, INT64 *a3, UINT64 *a4){
  __int64 v6; 
  unsigned int v7; 
  unsigned int v8; 
  unsigned int v9; 
  INT64 v10; 
  INT64 v11; 
  UINT8 v12; 
  if( (*(_DWORD *)(a1 + 116) & 0x100000) == 0 )
    return 0;
  v6 = *(_QWORD *)(a1 + 184);
  v7 = *(_DWORD *)(v6 + 2516);
  if( (v7 & 0x20000) == 0 || (*(_DWORD *)(a2 + 48) & 0x100001) != 1048577 )
    return 0;
  v8 = v7 >> 31;
  v9 = KiVerifyContextIpForUserCet(a1, a2, a3, v8, a4);
  if( v9 == -1073740278 )
  {
    v10 = *(_QWORD *)(a2 + 248);
    v11 = *(unsigned int *)a3;
    v12 = v8 ^ 1;
    if( (*(_DWORD *)(v6 + 2516) & 0x40000) == 0 )
    {
      KiLogUserCetSetContextIpValidationFailure(2i64, v11, v10, v12);
      return v9;
    }
    KiLogUserCetSetContextIpValidationFailure(1i64, v11, v10, v12);
    return 0;
  }
  return v9;
}

Referenced by:

KiVerifyContextRecord
PspGetSetContextInternal