10 #define OP_PREFIX 0xFF
11 #define OP_JMP_SEG 0x25
13 #define OP_JMP_BYTE 0xEB
14 #define OP_JMP_BYTE_SIZE 2
20 void check_thunks(unsigned char *dest, unsigned char *pc);
22 //if dest is NULL, returns minimum number of bytes needed to be copied
23 //if dest is not NULL, it will copy the bytes to dest as well as fix CALLs and JMPs
24 //http://www.devmaster.net/forums/showthread.php?t=2311
25 int copy_bytes(unsigned char *func, unsigned char* dest, int required_len);
27 //insert a specific JMP instruction at the given location
28 void inject_jmp(void* src, void* dest);
30 //fill a given block with NOPs
31 void fill_nop(void* src, unsigned int len);
33 //evaluate a JMP at the target
34 void* eval_jump(void* src);