Привет, я разобрал некоторые программы (linux), которые я написал, чтобы лучше понять, как это работает, и я заметил, что основная функция всегда начинается с:
lea ecx,[esp+0x4] ; I assume this is for getting the adress of the first argument of the main...why ?
and esp,0xfffffff0 ; ??? is the compiler trying to align the stack pointer on 16 bytes ???
push DWORD PTR [ecx-0x4] ; I understand the assembler is pushing the return adress....why ?
push ebp
mov ebp,esp
push ecx ;why is ecx pushed too ??
поэтому мой вопрос: зачем все это работает? Я понимаю только использование:
push ebp
mov ebp,esp
остальное мне кажется бесполезным...