This is the compensator for Deadshot's custom Glock 17 sidearm from the Suicide Squad movie. It is not an exact match but pretty close - it is based on behind the scenes photos of Deadshot's Glock as well as product photos of the manufacturer (Zev Technologies).
I designed this to fit my toy Glock 17 gel ball shooter, a cheap gun I got from China (aliexpress.com).
Note it is non-functional - there is no hole and my gel ball shooter is now completely disabled to make it "con safe".
This was actually one of the first 3D objects I designed. I used tinkercad.com.