-
-
Notifications
You must be signed in to change notification settings - Fork 483
Cant encode using ZYDIS_ENCODABLE_BRANCH_TYPE_NEAR32 #266
Copy link
Copy link
Closed
Labels
A-encoderArea: EncoderArea: EncoderC-bug-invalidCategory: Invalid bug reportCategory: Invalid bug reportC-enhancementCategory: Enhancement of existing featuresCategory: Enhancement of existing featuresP-mediumPriority: MediumPriority: Medium
Description
ZydisEncoderRequest req{};
req.mnemonic = ZYDIS_MNEMONIC_JMP;
req.branch_type = ZydisEncodableBranchType::ZYDIS_ENCODABLE_BRANCH_TYPE_NEAR32;
req.operand_count = 1;
req.operands[0].type = ZYDIS_OPERAND_TYPE_IMMEDIATE;
req.operands[0].imm.u = 0xFF;When specifying NEAR32 I sort of expected it to encode jmp <rel32> considering 0xFF is in range but it appears I have to either specify ZYDIS_ENCODABLE_BRANCH_TYPE_NEAR64 or ZYDIS_ENCODABLE_BRANCH_TYPE_SHORT.
Also to my understanding there is no encoding variant that encodes 64 bit relative address.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-encoderArea: EncoderArea: EncoderC-bug-invalidCategory: Invalid bug reportCategory: Invalid bug reportC-enhancementCategory: Enhancement of existing featuresCategory: Enhancement of existing featuresP-mediumPriority: MediumPriority: Medium