def rule(event):
    if all(
        [
            any(
                [
                    event.deep_get("Image", default="").endswith("\\InstallUtil.exe"),
                    event.deep_get("Image", default="").endswith("\\RegAsm.exe"),
                    event.deep_get("Image", default="").endswith("\\RegSvcs.exe"),
                    event.deep_get("Image", default="").endswith("\\regsvr32.exe"),
                    event.deep_get("Image", default="").endswith("\\rundll32.exe"),
                ]
            ),
            not any(
                [
                    event.deep_get("Signed", default="") == "true",
                    event.deep_get("SignatureStatus", default="")
                    in ["errorChaining", "errorCode_endpoint", "errorExpired", "trusted", "Valid"],
                    event.deep_get("Signed", default="") == "",
                    event.deep_get("Signed", default="") in ["", "-"],
                    event.deep_get("SignatureStatus", default="") == "",
                    event.deep_get("SignatureStatus", default="") in ["", "-"],
                    all(
                        [
                            event.deep_get("Image", default="")
                            in [
                                "C:\\Windows\\SysWOW64\\rundll32.exe",
                                "C:\\Windows\\System32\\rundll32.exe",
                            ],
                            event.deep_get("ImageLoaded", default="").startswith(
                                "C:\\Windows\\Installer\\"
                            ),
                            any(
                                [
                                    event.deep_get("ImageLoaded", default="").endswith(
                                        ".tmp-\\Microsoft.Deployment.WindowsInstaller.dll"
                                    ),
                                    event.deep_get("ImageLoaded", default="").endswith(
                                        ".tmp-\\Avira.OE.Setup.CustomActions.dll"
                                    ),
                                ]
                            ),
                        ]
                    ),
                    all(
                        [
                            any(
                                [
                                    event.deep_get("Image", default="").startswith(
                                        "C:\\Windows\\SysWOW64\\"
                                    ),
                                    event.deep_get("Image", default="").startswith(
                                        "C:\\Windows\\System32\\"
                                    ),
                                    event.deep_get("Image", default="").startswith(
                                        "C:\\Windows\\Microsoft.NET\\Framework64"
                                    ),
                                ]
                            ),
                            event.deep_get("Image", default="").endswith("\\RegAsm.exe"),
                            event.deep_get("ImageLoaded", default="").endswith(".dll"),
                            event.deep_get("ImageLoaded", default="").startswith(
                                "C:\\Windows\\assembly\\NativeImages"
                            ),
                        ]
                    ),
                ]
            ),
            not all(
                [
                    event.deep_get("Image", default="")
                    in [
                        "C:\\Windows\\SysWOW64\\regsvr32.exe",
                        "C:\\Windows\\System32\\regsvr32.exe",
                    ],
                    any(
                        [
                            event.deep_get("ImageLoaded", default="").startswith(
                                "C:\\Program Files (x86)\\K-Lite Codec Pack\\"
                            ),
                            event.deep_get("ImageLoaded", default="").startswith(
                                "C:\\Program Files\\K-Lite Codec Pack\\"
                            ),
                        ]
                    ),
                ]
            ),
        ]
    ):
        return True
    return False
