Intel 64 and IA-32 Architectures Software Developers Manual Volume 1, Basic Architecture

6-26 Vol. 1
PROCEDURE CALLS, INTERRUPTS, AND EXCEPTIONS
6.5.2 LEAVE Instruction
The LEAVE instruction, which does not have any operands, reverses the action of the
previous ENTER instruction. The LEAVE instruction copies the contents of the EBP
register into the ESP register to release all stack space allocated to the procedure.
Then it restores the old value of the EBP register from the stack. This simultaneously
restores the ESP register to its original value. A subsequent RET instruction then can
remove any arguments and the return address pushed on the stack by the calling
program for use by the procedure.