Update README.md

merge-requests/2/head
_xeroxz 4 years ago
parent 5771d56033
commit 9b4a8622ca

@ -73,4 +73,23 @@ get_hello:
LREGQ 0x88 LREGQ 0x88
LREGQ 0x90 LREGQ 0x90
VMEXIT VMEXIT
```
# Usage Example
Once you have defined a vasm file, you can now generate the c++ header file which will handle everything for you. Simply execute the following command:
```
vmassembler.exe --input [filename] --vmpbin [vmprotect'ed binary] --vmentry [make sure this rva is correct!] --out test.hpp
```
If the file is generated without any errors you can now include this file inside of your project. This header file uses no STL, nor any CRT functions, however it does create a RWX section so if you want to use this in a driver it cannot run on HVCI systems...
To call your vasm routine all you must do is pass the label name as a template param...
```cpp
// note, the header file generates an enum call "calls", inside of this enum will be an entry with the same name as your label!
// note, the second template param is the return type...
const auto hello = vm::call< vm::calls::get_hello, vm::u64 >();
``` ```
Loading…
Cancel
Save