def rule(event):
    if all(
        [
            "\\Software\\Microsoft\\Windows\\CurrentVersion\\CapabilityAccessManager\\ConsentStore\\"
            in event.deep_get("TargetObject", default=""),
            "\\NonPackaged" in event.deep_get("TargetObject", default=""),
            any(
                [
                    "microphone" in event.deep_get("TargetObject", default=""),
                    "webcam" in event.deep_get("TargetObject", default=""),
                ]
            ),
            any(
                [
                    ":#Windows#Temp#" in event.deep_get("TargetObject", default=""),
                    ":#$Recycle.bin#" in event.deep_get("TargetObject", default=""),
                    ":#Temp#" in event.deep_get("TargetObject", default=""),
                    ":#Users#Public#" in event.deep_get("TargetObject", default=""),
                    ":#Users#Default#" in event.deep_get("TargetObject", default=""),
                    ":#Users#Desktop#" in event.deep_get("TargetObject", default=""),
                ]
            ),
        ]
    ):
        return True
    return False
