There's a bug in the SymCrypt multi-precision arithmetic routines that can cause an infinite loop when calculating the modular inverse on specific bit patterns with bcryptprimitives!SymCryptFdefModInvGeneric.
77ebee2e76c83cac1e5410a53acbe10f9b0064d421f6789060e5502ae995009e