記錄著 main stack frame base 的位址 • void Func(int a, int b) char buf[12]; Previous ebp Return Address a b Stack ESP growth Low High push ebp mov ebp, esp sub esp, 0xc ======= Main Stack Frame Func Stack Frame 11
記錄著 Func stack frame base 的位址 • void Func(int a, int b) char buf[12]; Previous ebp Return Address a b Stack EBP = ESP growth Low High push ebp mov ebp, esp sub esp, 0xc ======= Main Stack Frame Func Stack Frame 12
a, int b) char buf[12]; buf[0]~[3] buf[4]~[7] buf[8]~[11] Previous ebp Return Address a b Stack EBP growth Low High push ebp mov ebp, esp sub esp, 0xc 13 ESP buffer