def rule(event):
    if all(
        [
            "\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion"
            in event.deep_get("TargetObject", default=""),
            any(
                [
                    "\\Winlogon\\VmApplet" in event.deep_get("TargetObject", default=""),
                    "\\Winlogon\\Userinit" in event.deep_get("TargetObject", default=""),
                    "\\Winlogon\\Taskman" in event.deep_get("TargetObject", default=""),
                    "\\Winlogon\\Shell" in event.deep_get("TargetObject", default=""),
                    "\\Winlogon\\GpExtensions" in event.deep_get("TargetObject", default=""),
                    "\\Winlogon\\AppSetup" in event.deep_get("TargetObject", default=""),
                    "\\Winlogon\\AlternateShells\\AvailableShells"
                    in event.deep_get("TargetObject", default=""),
                    "\\Windows\\IconServiceLib" in event.deep_get("TargetObject", default=""),
                    "\\Windows\\Appinit_Dlls" in event.deep_get("TargetObject", default=""),
                    "\\Image File Execution Options" in event.deep_get("TargetObject", default=""),
                    "\\Font Drivers" in event.deep_get("TargetObject", default=""),
                    "\\Drivers32" in event.deep_get("TargetObject", default=""),
                    "\\Windows\\Run" in event.deep_get("TargetObject", default=""),
                    "\\Windows\\Load" in event.deep_get("TargetObject", default=""),
                ]
            ),
            not any(
                [
                    event.deep_get("Details", default="") == "(Empty)",
                    event.deep_get("Details", default="") == "",
                    event.deep_get("Image", default="") == "C:\\Windows\\System32\\poqexec.exe",
                    all(
                        [
                            "\\Image File Execution Options\\"
                            in event.deep_get("TargetObject", default=""),
                            any(
                                [
                                    event.deep_get("TargetObject", default="").endswith(
                                        "\\DisableExceptionChainValidation"
                                    ),
                                    event.deep_get("TargetObject", default="").endswith(
                                        "\\MitigationOptions"
                                    ),
                                ]
                            ),
                        ]
                    ),
                    all(
                        [
                            event.deep_get("Image", default="")
                            == "C:\\Windows\\system32\\svchost.exe",
                            any(
                                [
                                    "\\Winlogon\\GPExtensions\\{827D319E-6EAC-11D2-A4EA-00C04F79F83A}\\PreviousPolicyAreas"
                                    in event.deep_get("TargetObject", default=""),
                                    "\\Winlogon\\GPExtensions\\{827D319E-6EAC-11D2-A4EA-00C04F79F83A}\\MaxNoGPOListChangesInterval"
                                    in event.deep_get("TargetObject", default=""),
                                ]
                            ),
                            event.deep_get("Details", default="")
                            in ["DWORD (0x00000001)", "DWORD (0x00000009)", "DWORD (0x000003c0)"],
                        ]
                    ),
                    all(
                        [
                            event.deep_get("Image", default="")
                            == "C:\\Windows\\System32\\RuntimeBroker.exe",
                            "\\runtimebroker.exe\\Microsoft.Windows.ShellExperienceHost"
                            in event.deep_get("TargetObject", default=""),
                        ]
                    ),
                ]
            ),
            not any(
                [
                    all(
                        [
                            event.deep_get("Image", default="").startswith(
                                "C:\\Program Files (x86)\\Microsoft\\Temp\\"
                            ),
                            event.deep_get("Image", default="").endswith(
                                "\\MicrosoftEdgeUpdate.exe"
                            ),
                        ]
                    ),
                    all(
                        [
                            any(
                                [
                                    event.deep_get("Image", default="").startswith(
                                        "C:\\Program Files (x86)\\Avira\\Antivirus\\avguard.exe"
                                    ),
                                    event.deep_get("Image", default="").startswith(
                                        "C:\\Program Files\\Avira\\Antivirus\\avguard.exe"
                                    ),
                                ]
                            ),
                            "SOFTWARE\\WOW6432Node\\Avira\\Antivirus\\Overwrite_Keys\\HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\\"
                            in event.deep_get("TargetObject", default=""),
                            any(
                                [
                                    event.deep_get("TargetObject", default="").endswith(
                                        "\\userinit\\UseAsDefault"
                                    ),
                                    event.deep_get("TargetObject", default="").endswith(
                                        "\\shell\\UseAsDefault"
                                    ),
                                ]
                            ),
                            event.deep_get("Details", default="")
                            in ["explorer.exe", "C:\\Windows\\system32\\userinit.exe,"],
                        ]
                    ),
                    any(
                        [
                            any(
                                [
                                    "\\ClickToRunStore\\HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\"
                                    in event.deep_get("TargetObject", default=""),
                                    "\\ClickToRun\\REGISTRY\\MACHINE\\Software\\Microsoft\\Windows NT\\CurrentVersion\\"
                                    in event.deep_get("TargetObject", default=""),
                                ]
                            ),
                            event.deep_get("Image", default="")
                            in [
                                "C:\\Program Files\\Microsoft Office\\root\\integration\\integrator.exe",
                                "C:\\Program Files (x86)\\Microsoft Office\\root\\integration\\integrator.exe",
                            ],
                        ]
                    ),
                    all(
                        [
                            any(
                                [
                                    event.deep_get("Image", default="").startswith(
                                        "C:\\Program Files\\Common Files\\Microsoft Shared\\ClickToRun\\"
                                    ),
                                    event.deep_get("Image", default="").startswith(
                                        "C:\\Program Files\\Common Files\\Microsoft Shared\\ClickToRun\\Updates\\"
                                    ),
                                ]
                            ),
                            event.deep_get("Image", default="").endswith("\\OfficeClickToRun.exe"),
                        ]
                    ),
                    all(
                        [
                            event.deep_get("Image", default="").startswith(
                                "C:\\Windows\\Microsoft.NET\\Framework"
                            ),
                            event.deep_get("Image", default="").endswith("\\ngen.exe"),
                        ]
                    ),
                    all(
                        [
                            event.deep_get("Image", default="").endswith(
                                "\\AppData\\Local\\Microsoft\\OneDrive\\StandaloneUpdater\\OneDriveSetup.exe"
                            ),
                            event.deep_get("TargetObject", default="").endswith(
                                "\\Microsoft\\Windows\\CurrentVersion\\RunOnce\\Delete Cached Update Binary"
                            ),
                            event.deep_get("Details", default="").startswith(
                                'C:\\Windows\\system32\\cmd.exe /q /c del /q "C:\\Users\\'
                            ),
                            event.deep_get("Details", default="").endswith(
                                '\\AppData\\Local\\Microsoft\\OneDrive\\Update\\OneDriveSetup.exe"'
                            ),
                        ]
                    ),
                ]
            ),
        ]
    ):
        return True
    return False
