I want to call the same function more times but with other args, I can't add new instructions, so how can I call it?

enter image description here

1 Answer 1


The simplest approach would be to use code cave:

  • Find some locations with no (or useless) instructions.
  • Put in there your function calls and args.
  • At the end of your calls, place a jump to the instruction executing next after the original call, according to your screenshot, that would be the address 0x41B417.
  • Overwrite the address of the original call (0x41B412) with a jump to your code cave (you've got 5 bytes, plenty of space for a good long jump).

Another approach would be to write a DLL, define the function's prototype, load it and call the function as many times and with any arguments as you want.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.