@ -6,6 +6,8 @@ This page contains the steps needed to add additional VMProtect 2 virtual instru
Consider the `ADDQ` profile which is displayed below which can be found inside of `add.cpp`. Notice that not every single instruction of the vm handler needs to be declared inside of the zydis lambda vector, however you will be required to be as explicit as it requires for each vm handler to have a unique signature.
Consider the `ADDQ` profile which is displayed below which can be found inside of `add.cpp`. Notice that not every single instruction of the vm handler needs to be declared inside of the zydis lambda vector, however you will be required to be as explicit as it requires for each vm handler to have a unique signature.
#### Step 1, Define The Profile
```cpp
```cpp
vm::handler::profile_t addq = {
vm::handler::profile_t addq = {
// ADD [RBP+8], RAX
// ADD [RBP+8], RAX
@ -33,6 +35,8 @@ vm::handler::profile_t addq = {
Inside of `vmprofiles.hpp` you can see a list of these profiles marked as `extern`.
Inside of `vmprofiles.hpp` you can see a list of these profiles marked as `extern`.
#### Step 2, Declare It Extern Inside `vmprofiles.hpp`
```cpp
```cpp
namespace profile
namespace profile
{
{
@ -61,6 +65,8 @@ namespace profile
Lastly the `addq` variable is added to a vector of `vm::handler::profile_t*`'s.
Lastly the `addq` variable is added to a vector of `vm::handler::profile_t*`'s.
#### Step 3, Add The Variable To `vm::handler::profile::all`
```cpp
```cpp
inline std::vector<vm::handler::profile_t*> all = {
inline std::vector<vm::handler::profile_t*> all = {