def rule(event):
    if all(
        [
            any(
                [
                    event.deep_get("ImageLoaded", default="").endswith("\\dbghelp.dll"),
                    event.deep_get("ImageLoaded", default="").endswith("\\dbgcore.dll"),
                ]
            ),
            any(
                [
                    event.deep_get("Image", default="").endswith("\\bash.exe"),
                    event.deep_get("Image", default="").endswith("\\cmd.exe"),
                    event.deep_get("Image", default="").endswith("\\cscript.exe"),
                    event.deep_get("Image", default="").endswith("\\dnx.exe"),
                    event.deep_get("Image", default="").endswith("\\excel.exe"),
                    event.deep_get("Image", default="").endswith("\\monitoringhost.exe"),
                    event.deep_get("Image", default="").endswith("\\msbuild.exe"),
                    event.deep_get("Image", default="").endswith("\\mshta.exe"),
                    event.deep_get("Image", default="").endswith("\\outlook.exe"),
                    event.deep_get("Image", default="").endswith("\\powerpnt.exe"),
                    event.deep_get("Image", default="").endswith("\\regsvcs.exe"),
                    event.deep_get("Image", default="").endswith("\\rundll32.exe"),
                    event.deep_get("Image", default="").endswith("\\sc.exe"),
                    event.deep_get("Image", default="").endswith("\\scriptrunner.exe"),
                    event.deep_get("Image", default="").endswith("\\winword.exe"),
                    event.deep_get("Image", default="").endswith("\\wmic.exe"),
                    event.deep_get("Image", default="").endswith("\\wscript.exe"),
                ]
            ),
            not any(
                [
                    all(
                        [
                            event.deep_get("CommandLine", default="").startswith(
                                "C:\\WINDOWS\\WinSxS\\"
                            ),
                            event.deep_get("CommandLine", default="").endswith(
                                "\\TiWorker.exe -Embedding"
                            ),
                        ]
                    ),
                    all(
                        [
                            event.deep_get("Image", default="").endswith("\\svchost.exe"),
                            any(
                                [
                                    event.deep_get("CommandLine", default="").endswith(
                                        "-k LocalServiceNetworkRestricted"
                                    ),
                                    event.deep_get("CommandLine", default="").endswith(
                                        "-k WerSvcGroup"
                                    ),
                                ]
                            ),
                        ]
                    ),
                    all(
                        [
                            event.deep_get("Image", default="").endswith("\\rundll32.exe"),
                            any(
                                [
                                    "/d srrstr.dll,ExecuteScheduledSPPCreation"
                                    in event.deep_get("CommandLine", default=""),
                                    "aepdu.dll,AePduRunUpdate"
                                    in event.deep_get("CommandLine", default=""),
                                    "shell32.dll,OpenAs_RunDL"
                                    in event.deep_get("CommandLine", default=""),
                                    "Windows.Storage.ApplicationData.dll,CleanupTemporaryState"
                                    in event.deep_get("CommandLine", default=""),
                                ]
                            ),
                        ]
                    ),
                ]
            ),
        ]
    ):
        return True
    return False
