def rule(event):
    if all(
        [
            event.deep_get("ParentImage", default="").endswith("\\userinit.exe"),
            not event.deep_get("Image", default="").endswith(":\\WINDOWS\\explorer.exe"),
            not any(
                [
                    any(
                        [
                            "netlogon.bat" in event.deep_get("CommandLine", default=""),
                            "UsrLogon.cmd" in event.deep_get("CommandLine", default=""),
                        ]
                    ),
                    event.deep_get("CommandLine", default="") == "PowerShell.exe",
                    any(
                        [
                            event.deep_get("Image", default="").endswith(
                                ":\\Windows\\System32\\proquota.exe"
                            ),
                            event.deep_get("Image", default="").endswith(
                                ":\\Windows\\SysWOW64\\proquota.exe"
                            ),
                        ]
                    ),
                    any(
                        [
                            event.deep_get("Image", default="").endswith(
                                ":\\Program Files (x86)\\Citrix\\HDX\\bin\\cmstart.exe"
                            ),
                            event.deep_get("Image", default="").endswith(
                                ":\\Program Files (x86)\\Citrix\\HDX\\bin\\icast.exe"
                            ),
                            event.deep_get("Image", default="").endswith(
                                ":\\Program Files (x86)\\Citrix\\System32\\icast.exe"
                            ),
                            event.deep_get("Image", default="").endswith(
                                ":\\Program Files\\Citrix\\HDX\\bin\\cmstart.exe"
                            ),
                            event.deep_get("Image", default="").endswith(
                                ":\\Program Files\\Citrix\\HDX\\bin\\icast.exe"
                            ),
                            event.deep_get("Image", default="").endswith(
                                ":\\Program Files\\Citrix\\System32\\icast.exe"
                            ),
                        ]
                    ),
                    event.deep_get("Image", default="") == "",
                ]
            ),
        ]
    ):
        return True
    return False
