def rule(event):
    if all(
        [
            event.deep_get("EventID", default="") == 4663,
            event.deep_get("ObjectType", default="") == "File",
            event.deep_get("AccessMask", default="") == "0x1",
            any(
                [
                    any(
                        [
                            "\\User Data\\Default\\Login Data"
                            in event.deep_get("ObjectName", default=""),
                            "\\User Data\\Local State" in event.deep_get("ObjectName", default=""),
                            "\\User Data\\Default\\Network\\Cookies"
                            in event.deep_get("ObjectName", default=""),
                        ]
                    ),
                    any(
                        [
                            event.deep_get("FileName", default="").endswith("\\cookies.sqlite"),
                            event.deep_get("FileName", default="").endswith("\\places.sqlite"),
                            event.deep_get("FileName", default="").endswith("release\\key3.db"),
                            event.deep_get("FileName", default="").endswith("release\\key4.db"),
                            event.deep_get("FileName", default="").endswith("release\\logins.json"),
                        ]
                    ),
                ]
            ),
            not any(
                [
                    event.deep_get("ProcessName", default="") == "System",
                    any(
                        [
                            event.deep_get("ProcessName", default="").startswith(
                                "C:\\Program Files (x86)\\"
                            ),
                            event.deep_get("ProcessName", default="").startswith(
                                "C:\\Program Files\\"
                            ),
                            event.deep_get("ProcessName", default="").startswith(
                                "C:\\Windows\\system32\\"
                            ),
                            event.deep_get("ProcessName", default="").startswith(
                                "C:\\Windows\\SysWOW64\\"
                            ),
                        ]
                    ),
                ]
            ),
            not all(
                [
                    event.deep_get("ProcessName", default="").startswith(
                        "C:\\ProgramData\\Microsoft\\Windows Defender\\"
                    ),
                    any(
                        [
                            event.deep_get("ProcessName", default="").endswith(
                                "\\MpCopyAccelerator.exe"
                            ),
                            event.deep_get("ProcessName", default="").endswith("\\MsMpEng.exe"),
                        ]
                    ),
                ]
            ),
        ]
    ):
        return True
    return False
