def rule(event):
    if all(
        [
            any(
                [
                    any(
                        [
                            ".bat" in event.deep_get("ParentCommandLine", default=""),
                            ".chm" in event.deep_get("ParentCommandLine", default=""),
                            ".cmd" in event.deep_get("ParentCommandLine", default=""),
                            ".hta" in event.deep_get("ParentCommandLine", default=""),
                            ".htm" in event.deep_get("ParentCommandLine", default=""),
                            ".html" in event.deep_get("ParentCommandLine", default=""),
                            ".js" in event.deep_get("ParentCommandLine", default=""),
                            ".lnk" in event.deep_get("ParentCommandLine", default=""),
                            ".ps1" in event.deep_get("ParentCommandLine", default=""),
                            ".vbe" in event.deep_get("ParentCommandLine", default=""),
                            ".vbs" in event.deep_get("ParentCommandLine", default=""),
                            ".wsf" in event.deep_get("ParentCommandLine", default=""),
                        ]
                    ),
                    any(
                        [
                            ":\\Perflogs\\" in event.deep_get("ParentCommandLine", default=""),
                            ":\\Temp\\" in event.deep_get("ParentCommandLine", default=""),
                            ":\\Users\\Public\\" in event.deep_get("ParentCommandLine", default=""),
                            ":\\Windows\\Temp\\" in event.deep_get("ParentCommandLine", default=""),
                            "\\AppData\\Local\\Temp"
                            in event.deep_get("ParentCommandLine", default=""),
                            "\\AppData\\Roaming\\"
                            in event.deep_get("ParentCommandLine", default=""),
                            "\\Temporary Internet"
                            in event.deep_get("ParentCommandLine", default=""),
                        ]
                    ),
                    any(
                        [
                            all(
                                [
                                    ":\\Users\\" in event.deep_get("ParentCommandLine", default=""),
                                    "\\Favorites\\"
                                    in event.deep_get("ParentCommandLine", default=""),
                                ]
                            ),
                            all(
                                [
                                    ":\\Users\\" in event.deep_get("ParentCommandLine", default=""),
                                    "\\Favourites\\"
                                    in event.deep_get("ParentCommandLine", default=""),
                                ]
                            ),
                            all(
                                [
                                    ":\\Users\\" in event.deep_get("ParentCommandLine", default=""),
                                    "\\Contacts\\"
                                    in event.deep_get("ParentCommandLine", default=""),
                                ]
                            ),
                        ]
                    ),
                ]
            ),
            any(
                [
                    ".bat" in event.deep_get("ParentCommandLine", default=""),
                    ".chm" in event.deep_get("ParentCommandLine", default=""),
                    ".cmd" in event.deep_get("ParentCommandLine", default=""),
                    ".hta" in event.deep_get("ParentCommandLine", default=""),
                    ".htm" in event.deep_get("ParentCommandLine", default=""),
                    ".html" in event.deep_get("ParentCommandLine", default=""),
                    ".js" in event.deep_get("ParentCommandLine", default=""),
                    ".lnk" in event.deep_get("ParentCommandLine", default=""),
                    ".ps1" in event.deep_get("ParentCommandLine", default=""),
                    ".vbe" in event.deep_get("ParentCommandLine", default=""),
                    ".vbs" in event.deep_get("ParentCommandLine", default=""),
                    ".wsf" in event.deep_get("ParentCommandLine", default=""),
                ]
            ),
            any(
                [
                    event.deep_get("Image", default="").endswith("\\PingCastle.exe"),
                    event.deep_get("OriginalFileName", default="") == "PingCastle.exe",
                    event.deep_get("Product", default="") == "Ping Castle",
                    any(
                        [
                            "--scanner aclcheck" in event.deep_get("CommandLine", default=""),
                            "--scanner antivirus" in event.deep_get("CommandLine", default=""),
                            "--scanner computerversion"
                            in event.deep_get("CommandLine", default=""),
                            "--scanner foreignusers" in event.deep_get("CommandLine", default=""),
                            "--scanner laps_bitlocker" in event.deep_get("CommandLine", default=""),
                            "--scanner localadmin" in event.deep_get("CommandLine", default=""),
                            "--scanner nullsession" in event.deep_get("CommandLine", default=""),
                            "--scanner nullsession-trust"
                            in event.deep_get("CommandLine", default=""),
                            "--scanner oxidbindings" in event.deep_get("CommandLine", default=""),
                            "--scanner remote" in event.deep_get("CommandLine", default=""),
                            "--scanner share" in event.deep_get("CommandLine", default=""),
                            "--scanner smb" in event.deep_get("CommandLine", default=""),
                            "--scanner smb3querynetwork"
                            in event.deep_get("CommandLine", default=""),
                            "--scanner spooler" in event.deep_get("CommandLine", default=""),
                            "--scanner startup" in event.deep_get("CommandLine", default=""),
                            "--scanner zerologon" in event.deep_get("CommandLine", default=""),
                        ]
                    ),
                    "--no-enum-limit" in event.deep_get("CommandLine", default=""),
                    all(
                        [
                            "--healthcheck" in event.deep_get("CommandLine", default=""),
                            "--level Full" in event.deep_get("CommandLine", default=""),
                        ]
                    ),
                    all(
                        [
                            "--healthcheck" in event.deep_get("CommandLine", default=""),
                            "--server " in event.deep_get("CommandLine", default=""),
                        ]
                    ),
                ]
            ),
        ]
    ):
        return True
    return False
