Random Baxter-Wu model: Duality relations and the replica method