I've already spent too much time looking at this.
The restricted area (RA) is the area within the arched line on the court located below the rim. Its purpose is to stop secondary defenders from taking a position under the basket in an attempt to draw the offensive foul when a player is driving to the basket. If an offensive player drives past his primary defender on the way to the basket and a secondary defender comes over, he must establish a legal position outside the RA to draw an offensive foul. If the drive starts inside the Lower Defensive Box (LDB – this is the area from the bottom tip of the free throw circle to the endline between the two 3’ posted-up marks), the secondary defender is legally allowed to be positioned inside the RA. The restricted are also does not apply if the secondary defender jumps in attempting to block the shot, the offensive player leads with his leg or knee in an unnatural motion or uses his off arm to prevent the defender from blocking his shot. The RA does not extend from below the backboard to the baseline. Therefore, if a player drives the baseline and is not attempting to go directly to the rim, the RA does not apply.
I've already said this once, but I think the refs were looking to see if LeBron was going to put a knee up like that, he did, and they called the offensive foul on him.