I have found topic related to linux x86_64 absolute addressing: Absolute addressing for runtime code replacement in x86_64 . It was told that absolute addressing is not supported for linux.
What about windows x64, are near absolute calls supported?
For windows x86 the address of the function can be grabbed from near absolute calls (0xFF 0x15) in this way:
unsigned char call_nearAbsolute[2] = {0xFF, 0x15};
if(memcmp(bytes, call_nearAbsolute, sizeof(call_nearAbsolute)) == 0) {
{
unsigned char offset[] = {
*(bytes + 0x5),
*(bytes + 0x4),
*(bytes + 0x3),
*(bytes + 0x2)
};
PDWORD_PTR absolute_addr =
(PDWORD_PTR)(((offset[0] & 0xFF) << 24) |
((offset[1] & 0xFF) << 16) |
((offset[2] & 0xFF) << 8) |
offset[3] & 0xFF);
}
If it is supported for x64, how to get procedure address correctly?