It's not a very well written sentence in my opinion. I'm also assuming that it's actually 4am, not 4pm, because 4pm wouldn't make much sense.
But anyway, it means she leans towards you (in the way people sometimes do when they're talking to you, especially if they're trying to be quiet), before the lecture has started, 3 weeks after starting the course, and tells you she's was awake until 4am.
"Another readily identifiable "annoying person" in law school is the one who leans over before [the] lecture, three weeks into class, and tells you that she was up until 4am."
So the author started the course 3 weeks ago; he's sat in the lecture theatre waiting for the lecture to start, and a girl leans over to tell him that she was awake until 4am.
Hopefully that makes it a bit clearer.
Not a teacher.