The PRC is the confederate equivalent, as they weren’t the original legal government unlike Taiwan, which legally is the heir of the ROC.
Going by paper legality argument, ROC is also illegal because it wrested power from Qing. Which conquered China from Ming, which toppled Yuan, and going fast forward to Han, Qing, Zhao and Shang, neither of them also risen peacefully.