Verse in Koran implicitly accepts the existence of brothels
YUSUFALI: Let those who find not the wherewithal for marriage keep themselves chaste, until Allah gives them means out of His grace. And if any of your slaves ask for a deed in writing (to enable them to earn their freedom for a certain sum), give them such a deed if ye know any good in them: yea, give them something yourselves out of the means which Allah has given to you. But force not your maids to prostitution when they desire chastity, in order that ye may make a gain in the goods of this life. But if anyone compels them, yet, after such compulsion, is Allah, Oft-Forgiving, Most Merciful (to them),
PICKTHAL: And let those who cannot find a match keep chaste till Allah give them independence by His grace. And such of your slaves as seek a writing (of emancipation), write it for them if ye are aware of aught of good in them, and bestow upon them of the wealth of Allah which He hath bestowed upon you. Force not your slave-girls to whoredom that ye may seek enjoyment of the life of the world, if they would preserve their chastity. And if one force them, then (unto them), after their compulsion, lo! Allah will be Forgiving, Merciful.
SHAKIR: And let those who do not find the means to marry keep chaste until Allah makes them free from want out of His grace. And (as for) those who ask for a writing from among those whom your right hands possess, give them the writing if you know any good in them, and give them of the wealth of Allah which He has given you; and do not compel your slave girls to prostitution, when they desire to keep chaste, in order to seek the frail good of this world's life; and whoever compels them, then surely after their compulsion Allah is Forgiving, Merciful.
It is only sinful if you compel your slave girls.
If you do not compel them then it is OK.
Prostitution should certainly not of course be forced. If it is a willing transaction between punter and prostitute, then it is OK.
If your slave girls desire manumission then prostitution is one of the ways of earning it, then you must allow them the ways and means to obtain their manumission.
Therefore an Islamic state would legalise brothel-keeping.
Interestingly, a liberal-feminist state wishes to outlaw it. Hypocrisy and irrationality, anyone?