This answer from Remy is perfect, however here is one small addition that you can also see right after
mov ebp, esp
It is very possible to see an instruction like this:
sub esp, 20h ; creating space for local variables with size 20h sub esp, CCh ; creating space for local variables with size CCh
along with calling AND sometimes (like and esp, 0FFFFFFF0h). This is also part of working with the stack, and this is done so that the stack can be aligned and divided by 16. Of course, it all depends on the calling convention used (cdecl, fastcall, stdcall, etc.)
source share