To begin understanding, you need to make one replacement - if_.esp
-> p
. And analyze in rows.
*(char **)p= (p + 4); p -= 4; *(int *)p = argc; p -= 4; *(int *)p = 0;
Now it becomes clearer. at a certain address that is stored in p (it used to be if_.esp
), the same address is recorded, incremented by 4. After that, the pointer is decreased by 4. The next step at this new address ( p-4
) is written argc. Likewise, 0 is written at p-8
.
That is, roughly speaking, it's just
push p+4 push argc push 0
the truth is that there is not enough one more line with p -= 4
, but either the optimizer ate it, or you.
If you look at it from a greater height, then it is just a simulation of an assembler call call (first, the address of the next instruction is written onto the stack, then two arguments). The esp
name hints at this.