def rule(event):
    if all(
        [
            any(
                [
                    any(
                        [
                            event.deep_get("Image", default="").endswith("\\tree.com"),
                            event.deep_get("Image", default="").endswith("\\WMIC.exe"),
                            event.deep_get("Image", default="").endswith("\\doskey.exe"),
                            event.deep_get("Image", default="").endswith("\\sc.exe"),
                        ]
                    ),
                    event.deep_get("OriginalFileName", default="")
                    in ["wmic.exe", "DOSKEY.EXE", "sc.exe"],
                ]
            ),
            any(
                [
                    " > %TEMP%\\" in event.deep_get("ParentCommandLine", default=""),
                    " > %TMP%\\" in event.deep_get("ParentCommandLine", default=""),
                ]
            ),
        ]
    ):
        return True
    return False
