void FreeServicesUsed( void ) { orl_return status; DisFini( &DHnd ); status = ORLFini( ORLHnd ); if( status != ORL_OKAY ) { PrintErrorMsg( ERROR, WHERE_CLOSING_ORL ); } }
static void dumpCodeBuff( void (*output)( char ), code_buff *buff ) { dis_handle handle; dis_dec_ins ins; char name[ MAX_INS_NAME ]; char ops[ MAX_OBJ_NAME + 24 ]; DisInit( buff->cpu, &handle ); while( buff->offset < buff->length ){ DisDecodeInit( &handle, &ins ); if( buff->cpu == DISCPU_x86 ) { ins.flags |= DIF_X86_USE32_FLAGS; } DisDecode( &handle, buff, &ins ); DisFormat( &handle, buff, &ins, DFF_AXP_SYMBOLIC_REG|DFF_PSEUDO, &name, &ops ); myPrintf( output, "\t%4.4x:", buff->offset ); dumpOpcodes( output, buff->start+buff->offset, ins.size ); myPrintf( output, "\t%s\t%s\n", name, ops ); buff->offset += ins.size; } DisFini( &handle ); }
void DisasmFini() { DisFini( &DH ); }