def rule(event):
    if all(
        [
            any(
                [
                    event.deep_get("Image", default="").endswith("\\winword.exe"),
                    event.deep_get("Image", default="").endswith("\\excel.exe"),
                    event.deep_get("Image", default="").endswith("\\powerpnt.exe"),
                    event.deep_get("Image", default="").endswith("\\MSACCESS.EXE"),
                    event.deep_get("Image", default="").endswith("\\MSPUB.EXE"),
                    event.deep_get("Image", default="").endswith("\\fltldr.exe"),
                    event.deep_get("Image", default="").endswith("\\cmd.exe"),
                    event.deep_get("Image", default="").endswith("\\certutil.exe"),
                    event.deep_get("Image", default="").endswith("\\mshta.exe"),
                    event.deep_get("Image", default="").endswith("\\cscript.exe"),
                    event.deep_get("Image", default="").endswith("\\wscript.exe"),
                    event.deep_get("Image", default="").endswith("\\curl.exe"),
                    event.deep_get("Image", default="").endswith("\\powershell.exe"),
                    event.deep_get("Image", default="").endswith("\\pwsh.exe"),
                ]
            ),
            event.deep_get("TargetFilename", default="").endswith(".dll"),
            "\\Users\\" in event.deep_get("TargetFilename", default=""),
            "\\AppData\\" in event.deep_get("TargetFilename", default=""),
            any(
                [
                    "\\Microsoft\\OneDrive\\" in event.deep_get("TargetFilename", default=""),
                    "\\Microsoft OneDrive\\" in event.deep_get("TargetFilename", default=""),
                    "\\Microsoft\\Teams\\" in event.deep_get("TargetFilename", default=""),
                    "\\Local\\slack\\app-" in event.deep_get("TargetFilename", default=""),
                    "\\Local\\Programs\\Microsoft VS Code\\"
                    in event.deep_get("TargetFilename", default=""),
                ]
            ),
            not all(
                [
                    event.deep_get("Image", default="").endswith("\\cmd.exe"),
                    "\\Users\\" in event.deep_get("TargetFilename", default=""),
                    "\\AppData\\" in event.deep_get("TargetFilename", default=""),
                    "\\Microsoft\\OneDrive\\" in event.deep_get("TargetFilename", default=""),
                    "\\api-ms-win-core-" in event.deep_get("TargetFilename", default=""),
                ]
            ),
        ]
    ):
        return True
    return False
