I am currently learning RE and I came upon this piece of code which made me question whether stack frames grow upward:
0x080483f4 <main+0>: push ebp 0x080483f5 <main+1>: mov ebp,esp 0x080483f7 <main+3>: and esp,0xfffffff0 0x080483fa <main+6>: sub esp,0x60 0x080483fd <main+9>: mov DWORD PTR [esp+0x5c],0x0
So I understand that from
<main+6>, we're setting up the stack frame. Being that the stack grows downwards, it makes sense that we
sub esp,0x60 thereby allocating 96 bytes for the main function's stack frame.
My confusion/doubts, however start on
mov DWORD PTR [esp+0x5c],0x0 which from what I understood stores the value
0 in a location 4 bytes above the stack pointer and we know that the stack grows downwards, but this operation seems to indicate that the data in the stack frame is stored bottom up.
So my question is, does that mean that while the stack as a whole grows downwards individual stack frames actually grow upwards?