All perfect praise be to Allaah, The Lord of the worlds. I testify that there is none worthy of worship except Allaah and that Muhammad is His slave and Messenger.
There is nothing wrong for you to repel the harm of that cat in order to stop its harm by beating it and the like, as the scholars of Fiqh stated that it is permissible to kill it, let alone to beat it.
Ar-Ruhaybaani said in Mataalib Uli An-Nuha – which is one of the books of the Hanbali School, “It is permissible to kill a cat because of it eating one's meat, like other (five kinds of) harmful animals (namely: the crow, the kite, the mouse, the scorpion and the rabid dog), according to the correct view of the School, and this is the favored view in Al-Furoo’. At-Targheeb [a name of a book] reads that a person may kill the cat if its harm is not stopped except by killing it, as in the case of as-Saa'il (the assailant, attacker or violator).”
Allaah knows best.