PipUnprotectDevice

NTSTATUS __stdcall PipUnprotectDevice(INT64 a1){
  _DEVICE_OBJECT *v1; 
  __int64 v2; 
  NTSTATUS v3; 
  __int128 v5; 
  __int128 v6; 
  __int64(__fastcall *v7)(_QWORD); 
  INT64 v8[14]; 

  v1 = *(_DEVICE_OBJECT **)(a1 + 32);
  v2 = 0i64;
  v7 = 0i64;
  v5 = 0i64;
  v6 = 0i64;
  v3 = PnpQueryInterface(v1, (_IO_SECURITY_CONTEXT *)&GUID_SDEV_IDENTIFIER_INTERFACE, 1, 0x28u, 0i64, &v5);
  if( v3 >= 0 )
  {
    v2 = v7(*((_QWORD *)&v5 + 1));
    (*((void(__fastcall **)(_QWORD))&v6 + 1))(*((_QWORD *)&v5 + 1));
  }
  if( v3 >= 0 )
  {
    memset(v8, 0i64, 0x68u);
    v8[1] = v2;
    return VslpEnterIumSecureMode(2u, 66, 0i64, (INT64)v8);
  }
  return v3;
}

Referenced by:

PiProcessDriversLoadedOnSecureDevice