def rule(event):
    if all(
        [
            any(
                [
                    event.deep_get("ImageLoaded", default="").endswith("\\RstrtMgr.dll"),
                    event.deep_get("OriginalFileName", default="") == "RstrtMgr.dll",
                ]
            ),
            not any(
                [
                    any(
                        [
                            event.deep_get("Image", default="").startswith("C:\\$WINDOWS.~BT\\'"),
                            event.deep_get("Image", default="").startswith("C:\\$WinREAgent\\'"),
                            event.deep_get("Image", default="").startswith(
                                "C:\\Program Files (x86)\\'"
                            ),
                            event.deep_get("Image", default="").startswith("C:\\Program Files\\'"),
                            event.deep_get("Image", default="").startswith("C:\\ProgramData\\'"),
                            event.deep_get("Image", default="").startswith(
                                "C:\\Windows\\explorer.exe'"
                            ),
                            event.deep_get("Image", default="").startswith(
                                "C:\\Windows\\SoftwareDistribution\\'"
                            ),
                            event.deep_get("Image", default="").startswith(
                                "C:\\Windows\\SysNative\\'"
                            ),
                            event.deep_get("Image", default="").startswith(
                                "C:\\Windows\\System32\\'"
                            ),
                            event.deep_get("Image", default="").startswith(
                                "C:\\Windows\\SysWOW64\\'"
                            ),
                            event.deep_get("Image", default="").startswith(
                                "C:\\Windows\\WinSxS\\'"
                            ),
                            event.deep_get("Image", default="").startswith(
                                "C:\\WUDownloadCache\\'"
                            ),
                        ]
                    ),
                    all(
                        [
                            event.deep_get("Image", default="").startswith("C:\\Users\\'"),
                            "\\AppData\\Local\\Temp\\is-" in event.deep_get("Image", default=""),
                            ".tmp\\" in event.deep_get("Image", default=""),
                            event.deep_get("Image", default="").endswith(".tmp"),
                        ]
                    ),
                    event.deep_get("Image", default="").startswith("C:\\Windows\\Temp\\'"),
                ]
            ),
            not all(
                [
                    event.deep_get("Image", default="").startswith("C:\\Users\\"),
                    event.deep_get("Image", default="").endswith(
                        "\\AppData\\Local\\Microsoft\\OneDrive\\OneDriveStandaloneUpdater.exe"
                    ),
                ]
            ),
        ]
    ):
        return True
    return False
