I can't say math is exactly my forte either, so so far all the solutions are scaring the crap out of me.
But I'll give in and try them if nothing better comes along.
For the curious, this is the current formula:
lat = asin((y - cenY) / r);
lon = asin((x - cenX) / (r * cos(lat))) - rotLon;
Which works fine... as long as you don't rotate the globe vertically (no rotLat in there), that's the real problem.
Typically spherical coordinates (r, lat, lon) convert into cartesian (x, y, z) easily (Wikipedia has the formulas as posted earlier), but in this case the sphere can be rotated which changes the axis, and they need to be flattened for the screen into (x, y). Also the radius is constant since we always want the sphere's surface. But if it's easier for you, you can think of the process as:
(r, lat, lon) -> (x, y, z) -> (x, y)
(r, lat, lon) <- (x, y, z) <- (x, y)
Early on I did try drawing the globe with (x, y, z) through 3D rendering but that just caused a whole lot more problems, so... here we are.