mirror of https://github.com/x64dbg/zydis
				
				
				
			Fixed tools
This commit is contained in:
		
							parent
							
								
									03e26408fe
								
							
						
					
					
						commit
						87e80346f4
					
				|  | @ -501,6 +501,7 @@ static ZydisStatus ZydisPrepareOperand(ZydisEncoderContext* ctx, | ||||||
|         // TODO: MMX registers
 |         // TODO: MMX registers
 | ||||||
|         // TODO: rBP
 |         // TODO: rBP
 | ||||||
|         // TODO: RIP relative addressing
 |         // TODO: RIP relative addressing
 | ||||||
|  |         // TODO: Segment prefixes
 | ||||||
| 
 | 
 | ||||||
|         // Memory operand?
 |         // Memory operand?
 | ||||||
|         if (operand->type == ZYDIS_OPERAND_TYPE_MEMORY) |         if (operand->type == ZYDIS_OPERAND_TYPE_MEMORY) | ||||||
|  | @ -628,6 +629,7 @@ static ZydisStatus ZydisPrepareOperand(ZydisEncoderContext* ctx, | ||||||
|         if (reg == -1) return ZYDIS_STATUS_INVALID_PARAMETER; |         if (reg == -1) return ZYDIS_STATUS_INVALID_PARAMETER; | ||||||
|         // TODO: Conditional assignment instead?
 |         // TODO: Conditional assignment instead?
 | ||||||
|         ctx->info->details.vex.vvvv  = (reg & 0x0F); |         ctx->info->details.vex.vvvv  = (reg & 0x0F); | ||||||
|  |         ctx->info->details.xop.vvvv  = (reg & 0x0F); | ||||||
|         ctx->info->details.evex.vvvv = (reg & 0x0F); |         ctx->info->details.evex.vvvv = (reg & 0x0F); | ||||||
|         break; |         break; | ||||||
|     }         |     }         | ||||||
|  |  | ||||||
|  | @ -77,12 +77,11 @@ int main(int argc, char** argv) | ||||||
|         ZydisStatus status; |         ZydisStatus status; | ||||||
|         size_t readOffs = 0; |         size_t readOffs = 0; | ||||||
|         while ((status = ZydisDecoderDecodeInstruction( |         while ((status = ZydisDecoderDecodeInstruction( | ||||||
|             &decoder, readBuf + readOffs, numBytesRead - readOffs, &info |             &decoder, readBuf + readOffs, numBytesRead - readOffs, readOffs, &info | ||||||
|         )) != ZYDIS_STATUS_NO_MORE_DATA) |         )) != ZYDIS_STATUS_NO_MORE_DATA) | ||||||
|         { |         { | ||||||
|             if (!ZYDIS_SUCCESS(status)) |             if (!ZYDIS_SUCCESS(status)) | ||||||
|             { |             { | ||||||
|                 ++decoder.instructionPointer; |  | ||||||
|                 ++readOffs; |                 ++readOffs; | ||||||
|                 printf("db %02X\n", info.data[0]); |                 printf("db %02X\n", info.data[0]); | ||||||
|                 continue; |                 continue; | ||||||
|  |  | ||||||
|  | @ -87,12 +87,11 @@ int main() | ||||||
|         ZydisStatus status; |         ZydisStatus status; | ||||||
|         size_t readOffs = 0; |         size_t readOffs = 0; | ||||||
|         while ((status = ZydisDecoderDecodeInstruction( |         while ((status = ZydisDecoderDecodeInstruction( | ||||||
|             &decoder, readBuf + readOffs, numBytesRead - readOffs, &info |             &decoder, readBuf + readOffs, numBytesRead - readOffs, readOffs, &info | ||||||
|         )) != ZYDIS_STATUS_NO_MORE_DATA) |         )) != ZYDIS_STATUS_NO_MORE_DATA) | ||||||
|         { |         { | ||||||
|             if (!ZYDIS_SUCCESS(status)) |             if (!ZYDIS_SUCCESS(status)) | ||||||
|             { |             { | ||||||
|                 ++decoder.instructionPointer; |  | ||||||
|                 ++readOffs; |                 ++readOffs; | ||||||
|                 continue; |                 continue; | ||||||
|             } |             } | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue