Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2017
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. var log = [];
  2. var oldf = {}; // this object is used to access the original function from the hook
  3.  
  4. // address of smemalloc taken from:
  5. // wow build 12340, macOS i386 build, md5: 1abfcf2cb17cdbe804c1c77d0525f1fa
  6. var smemalloc = @encode(void*(int, char*, int, int))(0x9bad0)
  7.  
  8. var hook = function(a1, file, a3, a4) {
  9. var ptr = (*oldf)(a1, file, a3, a4);
  10. log.push([a1, file.toString(), a3, a4]);
  11. return ptr;
  12. }
  13.  
  14. MS.hookFunction(smemalloc, hook, oldf);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement