private static unsafe bool FilterCustomAttributeRecord(CustomAttributeRecord caRecord, MetadataImport scope, ref Assembly lastAptcaOkAssembly, RuntimeModule decoratedModule, MetadataToken decoratedToken, RuntimeType attributeFilterType, bool mustBeInheritable, object[] attributes, IList derivedAttributes, out RuntimeType attributeType, out IRuntimeMethodInfo ctor, out bool ctorHasParameters, out bool isVarArg)
{
ctor = (IRuntimeMethodInfo)null;
attributeType = (RuntimeType)null;
ctorHasParameters = false;
isVarArg = false;
IntPtr num = (IntPtr)((void *)((IntPtr)(void *)caRecord.blob.Signature + caRecord.blob.Length));
attributeType = decoratedModule.ResolveType(scope.GetParentToken((int)caRecord.tkCtor), (Type[])null, (Type[])null) as RuntimeType;
if (!attributeFilterType.IsAssignableFrom((TypeInfo)attributeType) || !CustomAttribute.AttributeUsageCheck(attributeType, mustBeInheritable, attributes, derivedAttributes) || (attributeType.Attributes & TypeAttributes.WindowsRuntime) == TypeAttributes.WindowsRuntime)
{
return(false);
}
RuntimeAssembly targetAssembly = (RuntimeAssembly)attributeType.Assembly;
RuntimeAssembly sourceAssembly = (RuntimeAssembly)decoratedModule.Assembly;
if ((Assembly)targetAssembly != lastAptcaOkAssembly && !RuntimeAssembly.AptcaCheck(targetAssembly, sourceAssembly))
{
return(false);
}
lastAptcaOkAssembly = (Assembly)sourceAssembly;
ConstArray methodSignature = scope.GetMethodSignature(caRecord.tkCtor);
isVarArg = ((uint)methodSignature[0] & 5U) > 0U;
ctorHasParameters = (uint)methodSignature[1] > 0U;
RuntimeTypeHandle runtimeTypeHandle1;
if (ctorHasParameters)
{
ctor = ModuleHandle.ResolveMethodHandleInternal(decoratedModule.GetNativeHandle(), (int)caRecord.tkCtor);
}
else
{
// ISSUE: explicit reference operation
// ISSUE: variable of a reference type
IRuntimeMethodInfo& local = @ctor;
runtimeTypeHandle1 = attributeType.GetTypeHandleInternal();
IRuntimeMethodInfo defaultConstructor = runtimeTypeHandle1.GetDefaultConstructor();