That’s where it would start. I imagine it would be capable to see the flaws in the system and rectify them. This most probably means we as humans won’t come out on top however.
A sentient ai would probably be the most dangerous thing to the human species as a whole.