def rule(event):
    if all(
        [
            event.deep_get("EventID", default="") == 16403,
            any(
                [
                    event.deep_get("LocalName", default="").endswith(".bat"),
                    event.deep_get("LocalName", default="").endswith(".dll"),
                    event.deep_get("LocalName", default="").endswith(".exe"),
                    event.deep_get("LocalName", default="").endswith(".hta"),
                    event.deep_get("LocalName", default="").endswith(".ps1"),
                    event.deep_get("LocalName", default="").endswith(".psd1"),
                    event.deep_get("LocalName", default="").endswith(".sh"),
                    event.deep_get("LocalName", default="").endswith(".vbe"),
                    event.deep_get("LocalName", default="").endswith(".vbs"),
                ]
            ),
            not all(
                [
                    "\\AppData\\" in event.deep_get("LocalName", default=""),
                    ".com" in event.deep_get("RemoteName", default=""),
                ]
            ),
        ]
    ):
        return True
    return False
