It’s like extracting a power from an item except it pulls the rank into the cube. Any rank zero legendary gem would then use the rank of that gem from the cube (when socketed). Ranking up a zero gem would make it a rank 1 and no longer use the cube’s rank.
As a player I would want the old (lower) rank placed on the legendary gem used when increasing the cube rank (i.e. swap values), but I realize that is reaching.
Alternatively, Urshi could allow the cube gems to be selected for ranking up. and all socketed leg gems could use the cube ranks if those are higher. That might even be a simpler solution.