There should be three adjuster screws on the cylinder. One adjusts the swing speed (how fast it closes), one adjusts the latch speed (how fast in closes in the final few inches) and one adjusts the back stop (the limit to how wide it opens).
Likely you need to adjust the latch speed and slow it down. You might also need to adjust the swing speed.
Plenty of good thoughts in other comments, but absolutely do not "disassemble" that door closer. There is a heavy spring inside which has a slight potential of causing injury. Even without that hazard, you will never get the spring back in place and the oil refilled.
The installation looks weird and the design of the closer itself is different than I am personally used to. I'm guessing you aren't in the U.S.? Even if you aren't all the basic principles remain the same.
It is possible that the hydraulic fluid has leaked out as others have stated. This is very often the cause of a closer slamming the door. But there is no visible indication of a leak in your picture. If it had leaked out, I would expect there to be stains on the very bottom point that is visible in the photo. Instead, it looks clean and perfectly fine.
The bent arm and mounting point on the door are related, I would guess. The installer did a crappy job. At a wild guess, the factory mounting only allowed around 100 degrees of opening, but the users wanted something closer to 180, so things were fudged. Not the end of the world and never the cause of slamming.
The people saying you need to adjust it are likely the ones who have it right. Fortunately for us all, your picture shows what I am quite certain are the adjustment screws/valves. The two screws on the right hand side, sitting parallel to the cylinder. They are both clearly backed out nearly as far as they can go, this would cause slamming 100% of the time. You can even see that the top one is protruding from the surrounding body of the closer.
Turn those clockwise and see if it helps. I'd start at something like 2 complete turns clockwise on both and then test the door. Keep going that way until the door is closing too slowly, then back one off and see if it speeds up. Remember, one controls the speed from full open until nearly closed, so you have to identify which is which by adjusting one at a time, make sense?
yeah the whole point of the mechanism is to control the door movement, which it clearly isn't doing. Disassembly will be not only required but essential.
In addition to the cylinder needing work, I think another issue is the location of the arm mount - it has no leverage to work with in its current placement. Clearly it was mounted further out previously, and it shouldn’t have that bend either. May want to just replace entirely and mount properly per manufacturer instructions. Good luck, no matter what you choose to do!
I have a slightly off topic question - that's the first time I've seen the big boi mounted on the door frame instead of the door itself... is there generally a difference between this and mounting it to the door instead?
I assume it was mounted to the frame here because it's not wooden
There are two sides that a closer can be mounted on, often called the "pull side" and the "push side". Which side it's on changes how the arm needs to be mounted. There are a few ways for that change to be made and the closer we're looking at is mounted in a way that .... "fell out of favour" I guess.
Instead of changing the way the arm attaches, there is a special mounting plate attached to the jam. When the door is open, the entire closer and mounting plate are out in the open space of the door. My best guess is that this obstruction that could knock a tall person in the head or get damaged by moving large objects through the opening (or just preventing smart people from trying) is why it's almost never done anymore.
Usually there are a few different tuning bolts you can spin that'll adjust the resistance and some other parameters. However, it's also possible to blow out the internal mechanism by pulling the door shut faster than it wants to go. It'll stop working right and sometimes leak oil. It's possible that's happened to this one, in which case the only answer is to get a new one, but that might not be a bad idea anyway, because this one has a bent rod.
You could try unattaching the rod (to see if it can be attached in a better location or something) and playing with the tuning bolts, but it might be worth just getting a new one.
It's a hydrolic cylinder, which suggests to me that it was filled with hydrolic oil at one point, and either no longer is from an external leak, or the seal inside is broken and it has lost its pressure.