|
|
|
@ -241,7 +241,6 @@ namespace vm
|
|
|
|
|
possible_block_2 > vmctx.module_base &&
|
|
|
|
|
possible_block_2 < vmctx.module_base + vmctx.image_size;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
} );
|
|
|
|
|
|
|
|
|
@ -267,13 +266,12 @@ namespace vm
|
|
|
|
|
|
|
|
|
|
std::uintptr_t code_block_addr( const vm::ctx_t &ctx, const vmp2::v2::entry_t &entry )
|
|
|
|
|
{
|
|
|
|
|
return ( ( entry.vsp.qword[ 0 ] + ( ctx.image_base & ~0xFFFFFFFFull ) ) - ctx.image_base ) +
|
|
|
|
|
ctx.module_base;
|
|
|
|
|
return ( ( entry.vsp.qword[ 0 ] & 0xFFFFFFFFull ) - ( ctx.image_base & 0xFFFFFFFFull ) ) + ctx.module_base;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
std::uintptr_t code_block_addr( const vm::ctx_t &ctx, const std::uint32_t lower_32bits )
|
|
|
|
|
{
|
|
|
|
|
return ( ( lower_32bits + ( ctx.image_base & ~0xFFFFFFFFull ) ) - ctx.image_base ) + ctx.module_base;
|
|
|
|
|
return ( lower_32bits - ( ctx.image_base & 0xFFFFFFFFull ) ) + ctx.module_base;
|
|
|
|
|
}
|
|
|
|
|
} // namespace instrs
|
|
|
|
|
} // namespace vm
|