69 #define DIS_DATA32 0x0001 // Data size 16/32 bits (0/1) 70 #define DIS_GETDATASIZE(flags) ((flags)&DIS_DATA32) 71 #define DIS_ADDRESS32 0x0002 // Address size 16/32 bits (0/1) 72 #define DIS_GETADDRSIZE(flags) (((flags)&DIS_ADDRESS32)?1:0) 74 #define DIS_SEGOVERRIDE 0x0004 // Default segment has been overriden 76 #define DIS_REP 0x0100 // Return: REP prefix found (followed by..) 77 #define DIS_REPNE 0x0200 // Return: REPNE prefix found 78 #define DIS_GETREPENUM(flags) (((flags)>>8)&3) 79 #define DIS_ILLEGALOP 0x8000 // Return: illegal opcode 120 return( *(
USHORT *) pCode );
130 return( *(
ULONG *) pCode );
134 #define NEXTUCHAR GetNextUCHAR( pDis->wSel, bpTarget, bpCode); bpCode += 1; bpTarget += 1; bInstrLen += 1 136 #define NEXTUSHORT GetNextUSHORT( pDis->wSel, bpTarget, bpCode); bpCode += 2; bpTarget += 2; bInstrLen += 2 138 #define NEXTULONG GetNextULONG(pDis->wSel, bpTarget, bpCode); bpCode += 4; bpTarget += 4; bInstrLen += 4 206 bpCode = pDis->
Codes;
233 bReg = (bOpcode >> 3) & 7;
236 goto StartInstructionParseMODRM;
242 goto StartInstructionNoMODRM;
274 if(
p->name <
_GRP6 )
goto IllegalOpcode;
297 bReg = (bOpcode >> 3) & 7;
300 if( !(
p->flags &
DIS_SPECIAL) )
goto StartInstructionParseMODRM;
309 goto StartInstruction;
311 while( bInstrLen < 15 );
329 bReg = (bOpcode >> 3) & 7;
331 StartInstructionParseMODRM:
338 StartInstructionNoMODRM:
405 if( bMod == 3 )
goto IllegalOpcode;
429 bIndex = (bSib >> 3) & 7;
433 if( (bBase==5) && (bMod==0) )
459 if( (
signed char)bUCHAR < 0 )
506 if( (
signed char)bUCHAR < 0 )
char * sSegOverrideDefaultDS[8]
int PICE_sprintf(char *buf, const char *fmt,...)
char * sSegOverrideDefaultES[8]
TOpcodeData Groups[17][8]
UCHAR GetUCHAR(ULONG addr)
static ULONG GetNextULONG(USHORT sel, UCHAR *offset, UCHAR *pCode)
#define DIS_GETREPENUM(flags)
TOpcodeData Coproc2[8][16 *4]
#define DIS_GETADDRSIZE(flags)
char * sGenReg16_32[2][8]
static USHORT GetNextUSHORT(USHORT sel, UCHAR *offset, UCHAR *pCode)
GLenum const GLvoid * addr
BOOLEAN Disasm(PULONG pOffset, PUCHAR pchDst)
#define DIS_GETNAMEFLAG(flags)
TOpcodeData Coproc1[8][8]
UCHAR Disassembler(TDisassembler *pDis)
BOOLEAN ScanExportsByAddress(LPSTR *pFind, ULONG ulValue)
BOOLEAN IsAddressValid(ULONG address)
#define DIS_GETDATASIZE(flags)
static UCHAR GetNextUCHAR(USHORT sel, UCHAR *offset, UCHAR *pCode)