__asm
{
push ebx
push eax
mov ebx,KeServiceDescriptorTable
mov ebx,[ebx] //表的基地址
mov eax,0x7a
shl eax,2//0x7A*4 //imul eax,eax,4//shl eax,2
add ebx,eax//[KeServiceDescriptorTable]+0x7A*4
mov ebx,[ebx]
mov SSDT_NtOpenProcess_Cur_Addr,ebx
pop eax
pop ebx
}
是在vs2003中,用到的内联汇编,其中的变量mov ebx,KeServiceDescriptorTable不太明白啊,
这个变量被定义为ULONG KeServiceDescriptorTable,然后就在汇编代码中使用了!
我不明白的地方就是,为什么在语句mov ebx,KeServiceDescriptorTable中,自然的就将其
转换为正确的表项地址了呢?难道编译器就是这么规定好了的,只要碰到KeServiceDescriptorTable
就将其自动转换为正确的地址吗?
因为在C中,变量的地址都是应该系统分配的啊!
这点疑惑,请明白人指点一下!