x86 and AMD64 detouring