You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
vmprofiler/doxygen/html/classvm_1_1ctx__t.html

326 lines
18 KiB

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>VMProfiler: vm::ctx_t Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="icon.png"/></td>
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">VMProfiler
&#160;<span id="projectnumber">v1.8</span>
</div>
<div id="projectbrief">vmprofiler is a c++ library which is used to statically analyze VMProtect 2 polymorphic virtual machines. This project is inherited in vmprofiler-qt, vmprofiler-cli, and vmemu.</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="namespacevm.html">vm</a></li><li class="navelem"><a class="el" href="classvm_1_1ctx__t.html">ctx_t</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="classvm_1_1ctx__t-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">vm::ctx_t Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<p><a class="el" href="classvm_1_1ctx__t.html" title="vm::ctx_t class is used to auto generate vm_entry, calc_jmp, and other per-vm entry information....">vm::ctx_t</a> class is used to auto generate vm_entry, <a class="el" href="namespacevm_1_1calc__jmp.html">calc_jmp</a>, and other per-vm entry information... creating a <a class="el" href="classvm_1_1ctx__t.html" title="vm::ctx_t class is used to auto generate vm_entry, calc_jmp, and other per-vm entry information....">vm::ctx_t</a> object can make it easier to pass around information pertaining to a given vm entry...
<a href="classvm_1_1ctx__t.html#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="vmctx_8hpp_source.html">vmctx.hpp</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:aac2f090b11989dacf989648f751f77ad"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classvm_1_1ctx__t.html#aac2f090b11989dacf989648f751f77ad">ctx_t</a> (std::uintptr_t <a class="el" href="classvm_1_1ctx__t.html#a41019acb80ba763e3154c4417b133b5a">module_base</a>, std::uintptr_t <a class="el" href="classvm_1_1ctx__t.html#a9cec1f42d21b006cba4ac370d5962869">image_base</a>, std::uintptr_t <a class="el" href="classvm_1_1ctx__t.html#a469ea113041b62e9a044db8e56fa78cb">image_size</a>, std::uintptr_t <a class="el" href="classvm_1_1ctx__t.html#a44b4eb5513ad87a12173e599591847c3">vm_entry_rva</a>)</td></tr>
<tr class="memdesc:aac2f090b11989dacf989648f751f77ad"><td class="mdescLeft">&#160;</td><td class="mdescRight">default constructor for <a class="el" href="classvm_1_1ctx__t.html" title="vm::ctx_t class is used to auto generate vm_entry, calc_jmp, and other per-vm entry information....">vm::ctx_t</a>... all information for a given vm entry must be provided... <a href="classvm_1_1ctx__t.html#aac2f090b11989dacf989648f751f77ad">More...</a><br /></td></tr>
<tr class="separator:aac2f090b11989dacf989648f751f77ad"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7f24e3ed32d1cca86c296dd8dae4b6d2"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classvm_1_1ctx__t.html#a7f24e3ed32d1cca86c296dd8dae4b6d2">init</a> ()</td></tr>
<tr class="memdesc:a7f24e3ed32d1cca86c296dd8dae4b6d2"><td class="mdescLeft">&#160;</td><td class="mdescRight">init all per-vm entry data such as vm_entry, <a class="el" href="namespacevm_1_1calc__jmp.html">calc_jmp</a>, and vm handlers... <a href="classvm_1_1ctx__t.html#a7f24e3ed32d1cca86c296dd8dae4b6d2">More...</a><br /></td></tr>
<tr class="separator:a7f24e3ed32d1cca86c296dd8dae4b6d2"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:a41019acb80ba763e3154c4417b133b5a"><td class="memItemLeft" align="right" valign="top">const std::uintptr_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classvm_1_1ctx__t.html#a41019acb80ba763e3154c4417b133b5a">module_base</a></td></tr>
<tr class="separator:a41019acb80ba763e3154c4417b133b5a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9cec1f42d21b006cba4ac370d5962869"><td class="memItemLeft" align="right" valign="top">const std::uintptr_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classvm_1_1ctx__t.html#a9cec1f42d21b006cba4ac370d5962869">image_base</a></td></tr>
<tr class="separator:a9cec1f42d21b006cba4ac370d5962869"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a44b4eb5513ad87a12173e599591847c3"><td class="memItemLeft" align="right" valign="top">const std::uintptr_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classvm_1_1ctx__t.html#a44b4eb5513ad87a12173e599591847c3">vm_entry_rva</a></td></tr>
<tr class="separator:a44b4eb5513ad87a12173e599591847c3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a469ea113041b62e9a044db8e56fa78cb"><td class="memItemLeft" align="right" valign="top">const std::uintptr_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classvm_1_1ctx__t.html#a469ea113041b62e9a044db8e56fa78cb">image_size</a></td></tr>
<tr class="separator:a469ea113041b62e9a044db8e56fa78cb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1451637395107d39f69b097a07ef9a0f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespacevmp2.html#ab2b6fa03f63a776a5c68007f89b140b5">vmp2::exec_type_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classvm_1_1ctx__t.html#a1451637395107d39f69b097a07ef9a0f">exec_type</a></td></tr>
<tr class="memdesc:a1451637395107d39f69b097a07ef9a0f"><td class="mdescLeft">&#160;</td><td class="mdescRight">the order in which VIP advances... <a href="classvm_1_1ctx__t.html#a1451637395107d39f69b097a07ef9a0f">More...</a><br /></td></tr>
<tr class="separator:a1451637395107d39f69b097a07ef9a0f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a40f0524813578bcddf9ded1e74443793"><td class="memItemLeft" align="right" valign="top"><a class="el" href="vmutils_8hpp.html#a5fdde6e9d3e6c6eca28ecadf2e837d3c">zydis_routine_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classvm_1_1ctx__t.html#a40f0524813578bcddf9ded1e74443793">vm_entry</a></td></tr>
<tr class="separator:a40f0524813578bcddf9ded1e74443793"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aed0dfa1748035f48bda0f59f76643d8d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="vmutils_8hpp.html#a5fdde6e9d3e6c6eca28ecadf2e837d3c">zydis_routine_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classvm_1_1ctx__t.html#aed0dfa1748035f48bda0f59f76643d8d">calc_jmp</a></td></tr>
<tr class="separator:aed0dfa1748035f48bda0f59f76643d8d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0fa31b5bd78861dbd2c5cf04af81aa4d"><td class="memItemLeft" align="right" valign="top">std::vector&lt; <a class="el" href="structvm_1_1handler_1_1handler__t.html">vm::handler::handler_t</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classvm_1_1ctx__t.html#a0fa31b5bd78861dbd2c5cf04af81aa4d">vm_handlers</a></td></tr>
<tr class="memdesc:a0fa31b5bd78861dbd2c5cf04af81aa4d"><td class="mdescLeft">&#160;</td><td class="mdescRight">all the vm handlers for the given vm entry... <a href="classvm_1_1ctx__t.html#a0fa31b5bd78861dbd2c5cf04af81aa4d">More...</a><br /></td></tr>
<tr class="separator:a0fa31b5bd78861dbd2c5cf04af81aa4d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p><a class="el" href="classvm_1_1ctx__t.html" title="vm::ctx_t class is used to auto generate vm_entry, calc_jmp, and other per-vm entry information....">vm::ctx_t</a> class is used to auto generate vm_entry, <a class="el" href="namespacevm_1_1calc__jmp.html">calc_jmp</a>, and other per-vm entry information... creating a <a class="el" href="classvm_1_1ctx__t.html" title="vm::ctx_t class is used to auto generate vm_entry, calc_jmp, and other per-vm entry information....">vm::ctx_t</a> object can make it easier to pass around information pertaining to a given vm entry... </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="aac2f090b11989dacf989648f751f77ad"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aac2f090b11989dacf989648f751f77ad">&#9670;&nbsp;</a></span>ctx_t()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">vm::ctx_t::ctx_t </td>
<td>(</td>
<td class="paramtype">std::uintptr_t&#160;</td>
<td class="paramname"><em>module_base</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">std::uintptr_t&#160;</td>
<td class="paramname"><em>image_base</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">std::uintptr_t&#160;</td>
<td class="paramname"><em>image_size</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">std::uintptr_t&#160;</td>
<td class="paramname"><em>vm_entry_rva</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">explicit</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>default constructor for <a class="el" href="classvm_1_1ctx__t.html" title="vm::ctx_t class is used to auto generate vm_entry, calc_jmp, and other per-vm entry information....">vm::ctx_t</a>... all information for a given vm entry must be provided... </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">module_base</td><td>the linear virtual address of the module base...</td></tr>
<tr><td class="paramname">image_base</td><td>image base from optional nt header... <a href="https://docs.microsoft.com/en-us/windows/win32/api/winnt/ns-winnt-image_optional_header64">IMAGE_OPTIONAL_HEADER64</a>...</td></tr>
<tr><td class="paramname">image_size</td><td>image size from optional nt header... <a href="https://docs.microsoft.com/en-us/windows/win32/api/winnt/ns-winnt-image_optional_header64">IMAGE_OPTIONAL_HEADER64</a>...</td></tr>
<tr><td class="paramname">vm_entry_rva</td><td>relative virtual address from the module base address to the first push prior to a vm entry...</td></tr>
</table>
</dd>
</dl>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a7f24e3ed32d1cca86c296dd8dae4b6d2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7f24e3ed32d1cca86c296dd8dae4b6d2">&#9670;&nbsp;</a></span>init()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool vm::ctx_t::init </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>init all per-vm entry data such as vm_entry, <a class="el" href="namespacevm_1_1calc__jmp.html">calc_jmp</a>, and vm handlers... </p>
<dl class="section return"><dt>Returns</dt><dd>returns true if no errors...</dd></dl>
</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="aed0dfa1748035f48bda0f59f76643d8d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aed0dfa1748035f48bda0f59f76643d8d">&#9670;&nbsp;</a></span>calc_jmp</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="vmutils_8hpp.html#a5fdde6e9d3e6c6eca28ecadf2e837d3c">zydis_routine_t</a> vm::ctx_t::calc_jmp</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="a1451637395107d39f69b097a07ef9a0f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1451637395107d39f69b097a07ef9a0f">&#9670;&nbsp;</a></span>exec_type</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="namespacevmp2.html#ab2b6fa03f63a776a5c68007f89b140b5">vmp2::exec_type_t</a> vm::ctx_t::exec_type</td>
</tr>
</table>
</div><div class="memdoc">
<p>the order in which VIP advances... </p>
</div>
</div>
<a id="a9cec1f42d21b006cba4ac370d5962869"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9cec1f42d21b006cba4ac370d5962869">&#9670;&nbsp;</a></span>image_base</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const std::uintptr_t vm::ctx_t::image_base</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="a469ea113041b62e9a044db8e56fa78cb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a469ea113041b62e9a044db8e56fa78cb">&#9670;&nbsp;</a></span>image_size</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const std::uintptr_t vm::ctx_t::image_size</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="a41019acb80ba763e3154c4417b133b5a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a41019acb80ba763e3154c4417b133b5a">&#9670;&nbsp;</a></span>module_base</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const std::uintptr_t vm::ctx_t::module_base</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="a40f0524813578bcddf9ded1e74443793"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a40f0524813578bcddf9ded1e74443793">&#9670;&nbsp;</a></span>vm_entry</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="vmutils_8hpp.html#a5fdde6e9d3e6c6eca28ecadf2e837d3c">zydis_routine_t</a> vm::ctx_t::vm_entry</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="a44b4eb5513ad87a12173e599591847c3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a44b4eb5513ad87a12173e599591847c3">&#9670;&nbsp;</a></span>vm_entry_rva</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const std::uintptr_t vm::ctx_t::vm_entry_rva</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="a0fa31b5bd78861dbd2c5cf04af81aa4d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0fa31b5bd78861dbd2c5cf04af81aa4d">&#9670;&nbsp;</a></span>vm_handlers</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">std::vector&lt; <a class="el" href="structvm_1_1handler_1_1handler__t.html">vm::handler::handler_t</a> &gt; vm::ctx_t::vm_handlers</td>
</tr>
</table>
</div><div class="memdoc">
<p>all the vm handlers for the given vm entry... </p>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>D:/vmprofiler-qt/dependencies/vmprofiler/include/<a class="el" href="vmctx_8hpp_source.html">vmctx.hpp</a></li>
<li>D:/vmprofiler-qt/dependencies/vmprofiler/src/<a class="el" href="vmctx_8cpp.html">vmctx.cpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1
</small></address>
</body>
</html>