juanmjacobs / il2cpp-modder

Generate DLL injection templates for modding il2cpp games
165 stars 16 forks source link

64 Bit Game Support #16

Closed HenryLeC closed 2 years ago

HenryLeC commented 3 years ago

Add 64 Bit Game Support

Currently the mods are not compatible with 64 bit games because the trampoline hooks will only work for 32 bit processes. This is because relative jumps in assembly only accept 32 bit addresses but in a 64 bit process there is no way to make sure that a dll will be injected less than 2 GBs away from the target function. A 64 bit long relative jump can take up to 13 bytes which takes up more space than most function headers.

Fix

By using MsDetours 4.0 instead of manually implementing trampoline hooking you can solve this problem.

I will work on this in the next few days

juanmjacobs commented 3 years ago

@HenryLeC Hi there, how are you? That's awesome! Let me know if you need anything and I'll try my best to help.

jamzdevs commented 3 years ago

How can I use il2cpp-modder with a 64-bit game right now? Is it possible?

HenryLeC commented 3 years ago

There is no way to use it with a 64 bit game right now. You could use it as a guide and use ms detours yourself to make your own dll injection but that requires some modding skills.

jamzdevs commented 3 years ago

Well that sucks, but thanks

HenryLeC commented 2 years ago

Well looks like I never got to this lol