|
|
|
@ -16,6 +16,7 @@ enum class mnemonic_t : uint8_t {
|
|
|
|
|
lreg,
|
|
|
|
|
lconst,
|
|
|
|
|
add,
|
|
|
|
|
_and, //The fucking idiots who wrote the standard thought reserving the word "and" was appropriate
|
|
|
|
|
div,
|
|
|
|
|
idiv,
|
|
|
|
|
mul,
|
|
|
|
@ -24,7 +25,6 @@ enum class mnemonic_t : uint8_t {
|
|
|
|
|
nop,
|
|
|
|
|
nor,
|
|
|
|
|
read,
|
|
|
|
|
readbzxw, //Read byte zero extend to word
|
|
|
|
|
write,
|
|
|
|
|
shl,
|
|
|
|
|
shld,
|
|
|
|
@ -32,6 +32,7 @@ enum class mnemonic_t : uint8_t {
|
|
|
|
|
shrd,
|
|
|
|
|
lvsp,
|
|
|
|
|
svsp,
|
|
|
|
|
lcr0,
|
|
|
|
|
writecr3,
|
|
|
|
|
readcr3,
|
|
|
|
|
writecr8,
|
|
|
|
@ -288,14 +289,15 @@ extern profiler_t sreg;
|
|
|
|
|
extern profiler_t lreg;
|
|
|
|
|
extern profiler_t lconst;
|
|
|
|
|
extern profiler_t add;
|
|
|
|
|
extern profiler_t _and;
|
|
|
|
|
extern profiler_t lvsp;
|
|
|
|
|
extern profiler_t svsp;
|
|
|
|
|
extern profiler_t nand;
|
|
|
|
|
extern profiler_t nop;
|
|
|
|
|
extern profiler_t nor;
|
|
|
|
|
extern profiler_t read;
|
|
|
|
|
extern profiler_t readbzxw;
|
|
|
|
|
extern profiler_t write;
|
|
|
|
|
extern profiler_t lcr0;
|
|
|
|
|
extern profiler_t writedr7;
|
|
|
|
|
extern profiler_t imul;
|
|
|
|
|
extern profiler_t shl;
|
|
|
|
@ -309,10 +311,10 @@ extern profiler_t vmexit;
|
|
|
|
|
/// unsorted vector of profiles... they get sorted once at runtime...
|
|
|
|
|
/// </summary>
|
|
|
|
|
inline std::vector<profiler_t*> profiles = {
|
|
|
|
|
&vmexit, &shl, &shld, &shr, &shrd, &imul, &nor, &write, &svsp, &read, &readbzxw,
|
|
|
|
|
&nand, &lvsp, &add, &jmp, &sreg, &lreg, &lconst, &nop, &writedr7};
|
|
|
|
|
&vmexit, &shl, &shld, &shr, &shrd, &imul, &nor, &write, &svsp, &read,
|
|
|
|
|
&nand, &lvsp, &add, &jmp, &_and, &sreg, &lreg, &lcr0, &lconst, &nop, &writedr7};
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// no i did not make this by hand, you cannot clown upon me!
|
|
|
|
|
/// </summary>
|
|
|
|
|
inline std::map<zydis_reg_t, uc_x86_reg> reg_map = {
|
|
|
|
|