I have wrote the following very simple program:
#include <Windows.h>
#include <stdio.h>
int wmain(void) {
DWORD dwProcId = GetCurrentProcessId();
HANDLE hProc = OpenProcess(0x0400, FALSE, dwProcId);
wprintf(L"Process handle is %p\n.", hProc);
return 0;
}
When I open this on x64dbg (or any other debugger), I can see that the IAT is at the start of the .rdata
section, and it does include the functions I use, GetCurrentProcessId
and OpenProcess
, and others.
However, close to the end of the text section, I see this code, which also seems to be something like a jump table: What is this table?
I can see the functions that seem to be called being imported in IAT as well, but I can't find any reference to this table, in any of the PE Guides that I have read.
What is is this table and how can I reference it somehow programmatically, via PE sections or structures?