mirror of
https://github.com/radareorg/radare2.git
synced 2025-01-09 23:11:41 +00:00
One more standard prelude for x86-32/64
This commit is contained in:
parent
97edd9a452
commit
e38e5dd5c2
@ -202,7 +202,6 @@ R_API int r_core_search_prelude(RCore *core, ut64 from, ut64 to, const ut8 *buf,
|
||||
break;
|
||||
}
|
||||
}
|
||||
eprintf ("Analized %d functions based on preludes\n", preludecnt);
|
||||
free (b);
|
||||
return preludecnt;
|
||||
}
|
||||
@ -235,17 +234,22 @@ R_API int r_core_search_preludes(RCore *core) {
|
||||
} else if (strstr (arch, "x86")) {
|
||||
switch (bits) {
|
||||
case 32:
|
||||
ret = r_core_search_prelude (core, from, to,
|
||||
(const ut8 *)"\x55\x89\xe5", 3, NULL, 0);
|
||||
r_core_search_prelude (core, from, to,
|
||||
(const ut8 *)"\x55\x89\xe5", 3, NULL, 0) +
|
||||
r_core_search_prelude (core, from, to,
|
||||
(const ut8 *)"\x55\x8b\xec", 3, NULL, 0);
|
||||
break;
|
||||
case 64:
|
||||
ret = r_core_search_prelude (core, from, to,
|
||||
(const ut8 *)"\x55\x48\x89\xe5", 3, NULL, 0);
|
||||
r_core_search_prelude (core, from, to,
|
||||
(const ut8 *)"\x55\x48\x89\xe5", 4, NULL, 0);
|
||||
r_core_search_prelude (core, from, to,
|
||||
(const ut8 *)"\x55\x48\x8b\xec", 4, NULL, 0);
|
||||
break;
|
||||
default:
|
||||
eprintf ("ap: Unsupported bits: %d\n", bits);
|
||||
}
|
||||
} else eprintf ("ap: Unsupported asm.arch and asm.bits\n");
|
||||
eprintf ("Analyzed %d functions based on preludes\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user