92 }
else if (start ==
NULL)
143 xed_error_enum_t xed_err;
144 xed_decoded_inst_t
xedd;
145 xed_decoded_inst_t *xptr = &
xedd;
146 char *val_pushed =
NULL;
147 char *push_succ_addr =
NULL;
148 char *jmp_target =
NULL;
151 while ((((
long) ins) & 0x11) && (*ins == 0x0)) ins++;
156 xed_decoded_inst_zero_set_mode(xptr, xed_settings);
157 xed_err = xed_decode(xptr, (uint8_t*) ins, 15);
158 if (xed_err != XED_ERROR_NONE) {
163 if (xed_decoded_inst_number_of_memory_operands(xptr) == 2) {
164 const xed_inst_t* xi = xed_decoded_inst_inst(xptr);
165 const xed_operand_t* op0 = xed_inst_operand(xi, 0);
166 if ((xed_operand_name(op0) == XED_OPERAND_MEM0) &&
167 x86_isReg_IP(xed_decoded_inst_get_base_reg(xptr, 0))) {
168 int64_t offset = xed_decoded_inst_get_memory_displacement(xptr, 0);
169 push_succ_addr = ins + xed_decoded_inst_get_length(xptr);
170 val_pushed = push_succ_addr + offset;
175 if (val_pushed ==
NULL) {
183 xed_decoded_inst_zero_set_mode(xptr, xed_settings);
184 xed_err = xed_decode(xptr, (uint8_t*) push_succ_addr, 15);
185 if (xed_err != XED_ERROR_NONE) {
191 if (xed_decoded_inst_number_of_memory_operands(xptr) == 1) {
193 const xed_inst_t *xi = xed_decoded_inst_inst(xptr);
194 const xed_operand_t *op0 = xed_inst_operand(xi,0);
195 if ((xed_operand_name(op0) == XED_OPERAND_MEM0) &&
196 x86_isReg_IP(xed_decoded_inst_get_base_reg(xptr, 0))) {
197 long long offset = xed_decoded_inst_get_memory_displacement(xptr,0);
198 jmp_target = push_succ_addr + xed_decoded_inst_get_length(xptr) + offset;
203 if (jmp_target ==
NULL) {
211 if ((jmp_target - val_pushed) == 8){
static bool plt_is_next(char *ins)
unwind_interval * restored_canonical
void suspicious_interval(void *pc)
unwind_interval * process_return(xed_decoded_inst_t *xptr, bool irdebug, interval_arg_t *iarg)
void reset_to_canonical_interval(xed_decoded_inst_t *xptr, unwind_interval **next, bool irdebug, interval_arg_t *iarg)
#define UWI_RECIPE(btuwi)
#define iclass_eq(xptr, class)
bitree_uwi_t * canonical_interval
static char * nextInsn(uint32_t *insn)
xed_control_t x86_decoder_settings
static xed_decoded_inst_t xedd
bitree_uwi_t unwind_interval