ViGetContextPointer

_VF_CONTEXT_POINTER *__stdcall ViGetContextPointer(VOID *Object, _VF_OBJECT_TYPE ObjectType){
  _VF_CONTEXT_POINTER *v2; 
  __int32 v3; 
  __int32 v4; 
  _IOP_IRP_EXTENSION *IrpExtension; 

  v2 = 0i64;
  if( ObjectType == VfDeviceType )
    return(_VF_CONTEXT_POINTER *)(*((_QWORD *)Object + 39) + 104i64);
  v3 = ObjectType - 1;
  if( !v3 )
    return(_VF_CONTEXT_POINTER *)(*((_QWORD *)Object + 6) + 72i64);
  v4 = v3 - 1;
  if( v4 )
  {
    if( v4 == 1 )
      return(_VF_CONTEXT_POINTER *)((char *)Object + 1456);
  }
  else
  {
    IrpExtension = IopAllocateIrpExtension((_IRP *)Object, IopVerifierType);
    if( IrpExtension )
      return(_VF_CONTEXT_POINTER *)&IrpExtension->VerifierContext;
  }
  return v2;
}

Referenced by:

VfInsertContext
VfRemoveContext
ViQueryObjectContext