| 4946 | } |
| 4947 | |
| 4948 | ZyanStatus ZydisDecoderEnableMode(ZydisDecoder* decoder, ZydisDecoderMode mode, ZyanBool enabled) |
| 4949 | { |
| 4950 | if (!decoder || ((ZyanUSize)mode > ZYDIS_DECODER_MODE_MAX_VALUE)) |
| 4951 | { |
| 4952 | return ZYAN_STATUS_INVALID_ARGUMENT; |
| 4953 | } |
| 4954 | |
| 4955 | #ifdef ZYDIS_MINIMAL_MODE |
| 4956 | if ((mode == ZYDIS_DECODER_MODE_MINIMAL) && !enabled) |
| 4957 | { |
| 4958 | return ZYAN_STATUS_INVALID_OPERATION; |
| 4959 | } |
| 4960 | #endif |
| 4961 | |
| 4962 | decoder->decoder_mode[mode] = enabled; |
| 4963 | |
| 4964 | return ZYAN_STATUS_SUCCESS; |
| 4965 | } |
| 4966 | |
| 4967 | ZyanStatus ZydisDecoderDecodeFull(const ZydisDecoder* decoder, |
| 4968 | const void* buffer, ZyanUSize length, ZydisDecodedInstruction* instruction, |
no outgoing calls