When it was too late they, could have divested and removed themselves - but hanging in there and continuing the business connections was treasonous.
Recall that the Nazis didn't invade Romania. Instead, Romania allied itself with the Axis. Nazi control of the facilities was probably simultaneous with that act.
At that point, no expertise and financial support was required from Standard.
If they decided to divest themselves of the operation, to whom would they sell it? A German firm would likely be the only bidder -- something Standard couldn't accept.
In the end, the only valid option would be for Standard to abandon the operation. Which they may well have effectively done -- withdrawing their expertise and financial support simply because there was no way to deliver them.
At any rate, the question becomes: Can a corporation be guilty of treasonous conduct if a one-time subsidiary beyond its control cooperates with the enemy?
And, as the question applies to Standard Oil, I'm not confident I know the answer to the question.