diff options
| author | spv420 <unomilliono@gmail.com> | 2022-04-23 16:41:06 -0400 |
|---|---|---|
| committer | spv420 <unomilliono@gmail.com> | 2022-04-23 16:41:06 -0400 |
| commit | dea01ec71c348f4d7f5c6e5e7079b6e4cc1bfe3a (patch) | |
| tree | 8be3efe3c3046b63cb47b7a77dfbe6bcb1c7916e /js | |
| parent | 357f356b0908acebe0ec890fcb8cedec43f3ff03 (diff) | |
yeet
Diffstat (limited to 'js')
| -rw-r--r-- | js/call.js | 19 |
1 files changed, 10 insertions, 9 deletions
@@ -1,5 +1,6 @@ +var gettimeofday_lazy_addy = 0x34d63d3c; +var atan2_lazy_addy = 0x346afc84; var reserve_addr = 0x1a0000; -var gettimeofday_addy = 0x34d63d3c; var slide = 0x0; var base = 0x0; //var slid = 0x0; @@ -10,10 +11,10 @@ function get_dyld_shc_slide() { function call(addy) { var dyld_shc_slide = get_dyld_shc_slide(); - var tmp = read_u32(gettimeofday_addy + dyld_shc_slide); - write_u32(gettimeofday_addy + dyld_shc_slide, addy); + var tmp = read_u32(gettimeofday_lazy_addy + dyld_shc_slide); + write_u32(gettimeofday_lazy_addy + dyld_shc_slide, addy); var d = new Date(); - write_u32(gettimeofday_addy + dyld_shc_slide, tmp); + write_u32(gettimeofday_lazy_addy + dyld_shc_slide, tmp); } function call4arg(addy, r0, r1, r2, r3) { @@ -28,10 +29,10 @@ function call4arg(addy, r0, r1, r2, r3) { var dyld_shc_slide = get_dyld_shc_slide(); - tmp = read_u32(0x346afc84 + dyld_shc_slide); - write_u32(0x346afc84 + dyld_shc_slide, addy); + tmp = read_u32(atan2_lazy_addy + dyld_shc_slide); + write_u32(atan2_lazy_addy + dyld_shc_slide, addy); ret = Math.atan2(arg1d, arg2d); - write_u32(0x346afc84 + dyld_shc_slide, tmp); + write_u32(atan2_lazy_addy + dyld_shc_slide, tmp); delete tmp; delete arg1d; @@ -44,8 +45,8 @@ function call4arg(addy, r0, r1, r2, r3) { * call with symbol */ function calls4arg(sym, r0, r1, r2, r3) { - var dlsym_addy = read_u32(0x1a0000 + 24 + slid); - var shc_slide = read_u32(0x1a0000 + 20 + slid); + var dlsym_addy = read_u32(reserve_addr + 24 + slid); + var shc_slide = read_u32(reserve_addr + 20 + slid); var addy = call4arg(dlsym_addy + shc_slide, 0xfffffffe, sptr(sym), 0, 0); return call4arg(addy, r0, r1, r2, r3); } |
