Welcome, Guest.

Author Topic: Extract address of CALL instruction  (Read 803 times)

Online KittoniuM

  • Administrator
  • Poster
  • *
  • Posts: 3306
    • View Profile
  • Canada
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;
}

Offline pr0jekt

  • New
  • Posts: 5
    • View Profile
Re: Extract address of CALL instruction
« Reply #1 on: May 26, 2018, 07:13:58 pm »
Thanks.



Total Registered Members:





2022 BigPackets. All rights reserved. All other trademarks, logos and copyrights are the property of their respective owners. This site is not associated with any company in any way.