How to read Import Address Table, in a driver, from a PEPROCESS?
The problem was because I was using
if ((INT)pNtHeader32 != IMAGE_NT_SIGNATURE)
return NULL;
When I should be checking the Signature of it:
if ((INT)pNtHeader32->Signature != IMAGE_NT_SIGNATURE)
return NULL;
Done.