Played around with mach APIs a little to see how hard it is to inject code into a running process. Pretty similar to what you need to do on Windows.

Maybe this PoS code is helpful to others.

https://github.com/badlogic/macinject

https://cdn.masto.host/mastodongamedevplace/media_attachments/files/112/815/886/760/725/644/original/e6bbd39b00742379.mp4

Reply to this note

Please Login to reply.

Discussion

Fun fact: On ARM64, trivial functions may not have enough space for a long jump to a newly allocated memory area with new machine code.

Praise be x86_64 for its generous prologues and epilogues! 🫠

👀