mirror of
https://github.com/vxunderground/MalwareSourceCode.git
synced 2024-12-30 06:55:27 +00:00
f2ac1ece55
add
51 lines
2.3 KiB
C#
51 lines
2.3 KiB
C#
// Decompiled with JetBrains decompiler
|
|
// Type: Microsoft.InfoCards.AppliesToBehaviorDecisionTable
|
|
// Assembly: infocard, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
|
|
// MVID: ADE0A079-11DB-4A46-8BDE-D2A592CA8DEA
|
|
// Assembly location: C:\Users\Administrateur\Downloads\Virusshare-00000-msil\Virus.Win32.Expiro.w-67b630ead60119692b9abbdfd8717c96904ef041127c2cae033c86b718eaa61e.exe
|
|
|
|
using System.ServiceModel;
|
|
|
|
namespace Microsoft.InfoCards
|
|
{
|
|
internal static class AppliesToBehaviorDecisionTable
|
|
{
|
|
private static AppliesToBehaviorDecision[,] appliesToDecisionTable = new AppliesToBehaviorDecision[2, 3];
|
|
|
|
static AppliesToBehaviorDecisionTable()
|
|
{
|
|
AppliesToBehaviorDecisionTable.appliesToDecisionTable[0, 0] = AppliesToBehaviorDecision.DoNotSend;
|
|
AppliesToBehaviorDecisionTable.appliesToDecisionTable[1, 0] = AppliesToBehaviorDecision.FailMatch;
|
|
AppliesToBehaviorDecisionTable.appliesToDecisionTable[0, 1] = AppliesToBehaviorDecision.DoNotSend;
|
|
AppliesToBehaviorDecisionTable.appliesToDecisionTable[1, 1] = AppliesToBehaviorDecision.SendRPAppliesTo;
|
|
AppliesToBehaviorDecisionTable.appliesToDecisionTable[0, 2] = AppliesToBehaviorDecision.SendCustomAppliesTo;
|
|
AppliesToBehaviorDecisionTable.appliesToDecisionTable[1, 2] = AppliesToBehaviorDecision.SendRPAppliesTo;
|
|
}
|
|
|
|
private static AppliesToBehaviorDecision GetAppliesToBehaviorDecision(
|
|
InfoCardPolicy policy,
|
|
RequireAppliesToStatus requireAppliesTo,
|
|
bool considerUnrecognizedElements)
|
|
{
|
|
int index = (EndpointAddress) null == policy.PolicyAppliesTo ? 0 : 1;
|
|
if (considerUnrecognizedElements)
|
|
index = policy.NonWhiteListElementsFound ? 1 : index;
|
|
return AppliesToBehaviorDecisionTable.appliesToDecisionTable[index, (int) requireAppliesTo];
|
|
}
|
|
|
|
public static AppliesToBehaviorDecision GetAppliesToBehaviorDecisionForRst(
|
|
InfoCardPolicy policy,
|
|
RequireAppliesToStatus requireAppliesTo)
|
|
{
|
|
return AppliesToBehaviorDecisionTable.GetAppliesToBehaviorDecision(policy, requireAppliesTo, false);
|
|
}
|
|
|
|
public static AppliesToBehaviorDecision GetAppliesToBehaviorDecisionForPolicyMatch(
|
|
InfoCardPolicy policy,
|
|
RequireAppliesToStatus requireAppliesTo)
|
|
{
|
|
return AppliesToBehaviorDecisionTable.GetAppliesToBehaviorDecision(policy, requireAppliesTo, true);
|
|
}
|
|
}
|
|
}
|