The original vertical part is
Molex 47053-1000, a KK 254 series connector, where the friction lock part covers only the first three pins. Molex does not manufacture a right-angle version. For just one or two connectors, you can replace the pins from a Molex 47053-1000 with suitable (0.65mm×0.65mm cross section) right angle 2.54mm pins. The straight section needs to be 10mm long (not including the bend radius) as the pin needs to extend 7.5mm from the connector plastic surface.
There are
many otherwise compatible sets from several large manufacturers, except that the friction lock is too wide. It is about as difficult to re-pin the connector as shave the friction lock to correct width, because the friction lock end is directly in line with the third pin; so to do a good job, you'll end up having to at least push that one pin out, temporarily. Alternatively, you can shave off the friction edge from the fan connector, although then you can accidentally connect the fan one pin off.
The reason for such an odd shape is for compatibility with three-pin (voltage-controlled) 12V PC fans. Essentially, the bottom simply extends 2.54mm further, and adds a fourth pin. Because of this, the KF2510 3+1pin male connectors should have compatible dimensions with the Molex 47053, 3-pin KF2510 being one series compatible with the 3-pin fan connectors.
I did a bit of digging at Aliexpress, and all the "KF2510 3+1pin" male right-angle connectors that I found definitely look correct. (Many of the 4-pin KF2510 connectors have a too-wide friction lock, covering all four pins.) Mostly I'd worry about the pin material itself, so I'd check the resistance and wettability with my favourite solder.