summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorspv420 <spv@spv.sh>2022-07-29 15:12:13 -0400
committerspv420 <spv@spv.sh>2022-07-29 15:12:13 -0400
commite35a04268fb48fac634ca123a58584a26b513831 (patch)
tree0061367f10cddc99081868e16d9d4bcb56861aff
parentaaeed83399c45daa3f067abc5fb1cc4abfb57f5b (diff)
fuck
-rwxr-xr-xsrc/js/lib/myutils.js4
-rw-r--r--src/js/primitives/mem.js4
2 files changed, 7 insertions, 1 deletions
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;
}