Welcome, Guest.

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

Online KittoniuM

  • Administrator
  • Level 8 - Tru Packet
  • *
  • Posts: 1090
    • 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

  • Level 0 - Leacher Skid
  • Posts: 6
    • View Profile
Re: Extract address of CALL instruction
« Reply #1 on: May 26, 2018, 07:13:58 pm »
Thanks.




Total Members


  • Youtube Youtube
  • Facebook Facebook
  • Twitter Twitter
  • Steam Steam

  • Powered by SMF | SMF © 2018, Simple Machines

    2018 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.