256
Reversing / Extract address of CALL instruction
« on: May 01, 2018, 10:43:47 PM »
Heres a nice function Syn showed when I was trying to figure out how to find the CALL address when your signature scan lands on a CALL XXXX
Quote
uintptr_t get_absolute_address(void* instruction, uint8_t skip = 1, uint8_t size = 5)
{
unsigned char *memory = (unsigned char *)(instruction);
int relative = *(int *)(memory + skip);
uintptr_t absolute = relative + (uintptr_t)(instruction)+size;
return absolute;
}