I am reading a ring 0 privilege acquiring source code in windows XP
in that code,
there are 2 lines
which are
LONG (NTAPI *NtSystemDebugControl) (int,void*,DWORD,void*,DWORD,DWORD*);
*(DWORD*) &NtSystemDebugControl =(DWORD)GetProcAddress(LoadLibrary("ntdll"),"NtSystemDebugControl");
it is first time I see such a grammar
what does both of 2 lines means?
The first line creates a function pointer, the second one initializes the function pointer in a rather horrible way (It will fail on 64-bit machines, though that is probably insignificant in this case).
If you’re asking what
GetProcAddressdoes I suggest reading about it in MSDN.