here are my views:
I think the crucible didn't physically reprogrammed the catalyst, it made it reassess its priorities, as it said, it "changed the variables". The reapers were the catalyst's "imperfect" solution to its problem. Its ultimate goal was something similar to synthesis. But it was unable to achieve that, for whatever reasons. So, in the meantime he just harvested, which was its plan B.
It (the catalyst) has been seeing this superweapon time and again, for the last few cycles. Each time, the device is improved a little from the last them, and each time the reapers are able to stop the thing before its too late. Now, for the first time the thing is completed and is docked into its ass. It sees the inevitable, the writing on the wall. It realizes its old solutions (reapers) would no longer work. It says this much. Even if they stopped the crucible from firing, it was (for the first time ever) in a finished state. The next cycle may well build it again and reach this state. So, it sets out to find a new solution, which are the three ways in the crucible can be used.
Destroy: Initially it may look like total opposite to what the catalyst has been trying to achieve. But if the catalyst decides to destroy the crucible it achieves nothing the next cycle will just rebuild it. If it decides to play good boi and destroy all synthetics then that solution will be identical to destroy solution, except the reapers live, and the crucible is intact. The organics are unlikely to let them go because the reapers destroyed some synthetics, they will likely use the crucible. So, as far as the catalyst is considered, its either destroy now via the crucible, or destroy a few cycles later.
Destroy is similar to resetting the clock. Start fresh, reapers dead, synthetics dead, and organics in possession of plans for a superweapons that can destroy all synthetics if need arises.
Control: The status quo. You become the new catalyst, the old-catalyst hopes you would find a better solution, succeed where he failed.
Synthesis: self-explanatory. Similar to the catalyst's original goal all along, so he supports it whole-heartedly.
This is also the reason the catalyst seems pissed if Shepard refuses. It has been shown its old solution doesn't work, it is intent on finding a new one. But since Shepard refused, it has to go back to its old, inefficient solutions.
Also, I believe the real victory was achieved when you docked the crucible into the citadel. It made the catalyst realize its solution is failing and made it reassess the situation. The rest is just you choosing how the aftermath plays out.