This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const THUMB_HOOK_REDIRECT_SIZE = 8; | |
| const THUMB_BIT_REMOVAL_MASK = ptr(1).not(); | |
| const trampolines: NativePointer[] = []; | |
| const replacements: NativePointer[] = []; | |
| export function makeTrampoline(target: NativePointer): NativePointer { | |
| const targetAddress = target.and(THUMB_BIT_REMOVAL_MASK); | |
| const trampoline = Memory.alloc(Process.pageSize); |