From e35a04268fb48fac634ca123a58584a26b513831 Mon Sep 17 00:00:00 2001 From: spv420 Date: Fri, 29 Jul 2022 15:12:13 -0400 Subject: fuck --- src/js/lib/myutils.js | 4 +++- src/js/primitives/mem.js | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'src/js') diff --git a/src/js/lib/myutils.js b/src/js/lib/myutils.js index 4424541..4f03957 100755 --- a/src/js/lib/myutils.js +++ b/src/js/lib/myutils.js @@ -125,4 +125,6 @@ var CFNumberCreate = scall_wrapper("CFNumberCreate"); var mig_get_reply_port = scall_wrapper("mig_get_reply_port"); var mach_ports_lookup = scall_wrapper("mach_ports_lookup"); var mach_port_destroy = scall_wrapper("mach_port_destroy"); -var pid_for_task = scall_wrapper("pid_for_task"); \ No newline at end of file +var pid_for_task = scall_wrapper("pid_for_task"); +var __CFStringMakeConstantString = scall_wrapper("__CFStringMakeConstantString"); +var CFStringCreateWithCString = scall_wrapper("CFStringCreateWithCString"); \ No newline at end of file diff --git a/src/js/primitives/mem.js b/src/js/primitives/mem.js index 4025c2f..633a082 100644 --- a/src/js/primitives/mem.js +++ b/src/js/primitives/mem.js @@ -252,8 +252,10 @@ function _sptr(s) { var addy = call4arg(dlsym_addy + shc_slide, 0xfffffffe, 0x150000, 0, 0); global_sptr_addy = call4arg(addy, global_sptr_addy, sptr_size, 0, 0); } + global_sptr_addy += (16 - (global_sptr_addy % 16)); write_str(global_sptr_addy, s); global_sptr_addy += s.length; + sptr_len += (16 - (sptr_len % 16)); sptr_len += s.length; return global_sptr_addy - s.length; } @@ -281,7 +283,9 @@ function shit_heap(v) { global_sptr_addy = call4arg(addy, global_sptr_addy, sptr_size, 0, 0); } // write_str(global_sptr_addy, s); + global_sptr_addy += (16 - (global_sptr_addy % 16)); global_sptr_addy += v; + sptr_len += (16 - (sptr_len % 16)); sptr_len += v; return global_sptr_addy - v; } -- cgit v1.2.3