def rule(event):
    if all(
        [
            any(
                [
                    event.deep_get("Image", default="").endswith("\\reg.exe"),
                    event.deep_get("OriginalFileName", default="") == "reg.exe",
                ]
            ),
            any(
                [
                    "\\AppDataLow\\Software\\Microsoft\\"
                    in event.deep_get("CommandLine", default=""),
                    "\\Policies\\Microsoft\\Windows\\OOBE"
                    in event.deep_get("CommandLine", default=""),
                    "\\Policies\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon"
                    in event.deep_get("CommandLine", default=""),
                    "\\SOFTWARE\\Microsoft\\Windows NT\\Currentversion\\Winlogon"
                    in event.deep_get("CommandLine", default=""),
                    "\\CurrentControlSet\\Control\\SecurityProviders\\WDigest"
                    in event.deep_get("CommandLine", default=""),
                    "\\Microsoft\\Windows Defender\\" in event.deep_get("CommandLine", default=""),
                ]
            ),
        ]
    ):
        return True
    return False
