Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var log = [];
- var oldf = {}; // this object is used to access the original function from the hook
- // address of smemalloc taken from:
- // wow build 12340, macOS i386 build, md5: 1abfcf2cb17cdbe804c1c77d0525f1fa
- var smemalloc = @encode(void*(int, char*, int, int))(0x9bad0)
- var hook = function(a1, file, a3, a4) {
- var ptr = (*oldf)(a1, file, a3, a4);
- log.push([a1, file.toString(), a3, a4]);
- return ptr;
- }
- MS.hookFunction(smemalloc, hook, oldf);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement