Skip to content

Instantly share code, notes, and snippets.

@fox-srt

fox-srt/vm.cpp Secret

Created August 22, 2024 07:33
Show Gist options
  • Save fox-srt/c4f90ba74289af3ec894357a062e0e84 to your computer and use it in GitHub Desktop.
Save fox-srt/c4f90ba74289af3ec894357a062e0e84 to your computer and use it in GitHub Desktop.
VM
auto target = fetch_value(vm, i->lparam_type, i->lparam);
auto nargs = vm->registers.rcx.qword;
// extract the arguments
...
// Invoke the api
auto result = syscall(target, ...);
// return the result to the bytecode environment
vm->registers.rax = result;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment