所以我正在練習/慢慢地,但肯定地學習和刷新我的大會。這裏有一個隨機分解核函數爲例:裝配的新手,對於一些指令有點困惑
81a1e85f 8b450c mov eax,dword ptr [ebp+0Ch] // Moving value stored at memory address contained in the ebp register+0Ch to the eax register.
81a1e862 8b4048 mov eax,dword ptr [eax+48h] // Moving value stored at memory address contained in the eax register+48h to the eax register.
81a1e865 8945f0 mov dword ptr [ebp-10h],eax // Moving value stored at memory address contained in the epb-10h register to the eax register?
81a1e868 6a00 push 0 // ?
81a1e86a 8bc7 mov eax,edi // Move contents of the edi register into eax.
81a1e86c c745fc22010000 mov dword ptr [ebp-4],122h // ?
81a1e873 e8bf010000 call nt!PspGetPreviousProcessThread (81a1ea37) // Call the function name nt!PspGetPreviousProcessThread?
81a1e878 8b5d14 mov ebx,dword ptr [ebp+14h] // Moving value stored at memory address contained in the ebp register+14h to the ebx register.
我是很新,大部分,所以毫無疑問,我現在不是錯了一些吧,還是錯在它的全部。任何人都可以讓我知道最重要的是我在哪裏評論過'?'因爲我不熟悉。
此外,括號內的任何內容 - 例如,[ebp-4],這被認爲是一個取消引用的指針,是正確的嗎?
是,任何在括號中,如'[EBP - 4]'是取消引用指針。 「無論在'EBP'寄存器中,減4,用作地址」。更確切地說,在32位系統上,它是當前子程序的第一個局部變量。 – Powerslave 2014-09-29 14:26:10