The present invention relates to a compound having a structure of formula I or a pharmaceutically acceptable salt of the compound. Regarding the compound, R1 is selected from hydrogen, fluorine, and chlorine; R2 and R3 are independently selected from hydrogen, alkyl, substituted alkyl, alkenyl or substituted alkenyl, alkynyl or substituted alkynyl, and aryl, wherein R2 and R3 can be bonded to forma ring, and the ring can be cycloalkyl, substituted cycloalkyl, an aromatic heterocyclic ring or a non-aromatic heterocyclic ring; R4 is selected from hydrogen, cyano, alkyl, substituted alkyl, alkene or substituted alkenyl, alkynyl or substituted alkynyl, and aryl; R5 is selected from hydrogen, halogen, and haloalkyl. The invention further relates to a pharmaceutical composition comprising the compound. The compound and composition provided by the invention shows significant activity in the treatment of prostate cancer. (The formulas are shown in the description.).