{"id":272851,"date":"2016-01-25T17:58:02","date_gmt":"2016-01-25T14:58:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=272851"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=272851","title":{"rendered":"\u00abHello World!\u00bb \u043d\u0430 C \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u043c int main[]"},"content":{"rendered":"<p>       \u042f \u0445\u043e\u0442\u0435\u043b \u0431\u044b \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u044f \u043f\u0438\u0441\u0430\u043b \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u00abHello, World!\u00bb \u043d\u0430 C. \u0414\u043b\u044f \u043f\u043e\u0434\u043e\u0433\u0440\u0435\u0432\u0430 \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u043a\u0430\u0436\u0443 \u043a\u043e\u0434. \u041a\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442 \u043a\u0430\u043a \u0434\u043e \u044d\u0442\u043e\u0433\u043e \u0434\u043e\u0445\u043e\u0434\u0438\u043b \u044f, \u0434\u043e\u0431\u0440\u043e \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434 \u043a\u0430\u0442.<\/p>\n<pre><code>#include &lt;stdio.h&gt; const void *ptrprintf = printf; #pragma section(&quot;.exre&quot;, execute, read) __declspec(allocate(&quot;.exre&quot;)) int main[] = {     0x646C6890, 0x20680021, 0x68726F57,     0x2C6F6C6C, 0x48000068, 0x24448D65,     0x15FF5002, &ptrprintf, 0xC314C483 };<\/code><\/pre>\n<p>  <a name=\"habracut\"><\/a>  <\/p>\n<h1>\u041f\u0440\u0435\u0434\u0438\u0441\u043b\u043e\u0432\u0438\u0435<\/h1>\n<p>  \u0418\u0442\u0430\u043a, \u043d\u0430\u0447\u0430\u043b \u044f \u0441 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043d\u0430\u0448\u0435\u043b \u044d\u0442\u0443 <a href=\"http:\/\/tproger.ru\/translations\/main-is-usually-a-function-so-then-when-is-it-not\/\">\u0441\u0442\u0430\u0442\u044c\u044e<\/a>. \u0412\u0434\u043e\u0445\u043d\u043e\u0432\u0438\u0432\u0448\u0438\u0441\u044c \u0435\u044e \u044f \u0441\u0442\u0430\u043b \u0434\u0443\u043c\u0430\u0442\u044c \u043a\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u043d\u0430 windows.<\/p>\n<p>  \u0412 \u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0432\u044b\u0432\u043e\u0434 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d \u0431\u044b\u043b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e syscall, \u043d\u043e \u0432 windows \u043c\u044b \u0441\u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044e printf. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u044f \u043e\u0448\u0438\u0431\u0430\u044e\u0441\u044c, \u043d\u043e \u043d\u0438\u0447\u0435\u0433\u043e \u0438\u043d\u043e\u0433\u043e \u044f \u0442\u0430\u043a \u0438 \u043d\u0435 \u043d\u0430\u0448\u0435\u043b.<\/p>\n<p>  \u041d\u0430\u0431\u0440\u0430\u0432\u0448\u0438\u0441\u044c \u0441\u043c\u0435\u043b\u043e\u0441\u0442\u0438 \u0438 \u0432\u0437\u044f\u0432 \u0432 \u0440\u0443\u043a\u0438 visual studio \u044f \u0441\u0442\u0430\u043b \u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c. \u041d\u0435 \u0437\u043d\u0430\u044e, \u0437\u0430\u0447\u0435\u043c \u044f \u0442\u0430\u043a \u0434\u043e\u043b\u0433\u043e \u0432\u043e\u0437\u0438\u043b\u0441\u044f \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c entry point \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438, \u043d\u043e \u043a\u0430\u043a \u0432\u044b\u044f\u0441\u043d\u0438\u043b\u043e\u0441\u044c \u043f\u043e\u0437\u0436\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 visual studio \u0434\u0430\u0436\u0435 \u043d\u0435 \u043a\u0438\u0434\u0430\u0435\u0442 warning \u0435\u0441\u043b\u0438 main \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u043c, \u0430 \u043d\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439.<\/p>\n<p>  \u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u0440\u043e\u0431\u043b\u0435\u043c, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u043c\u043d\u0435 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u0442\u044c\u0441\u044f:<\/p>\n<p>  <a href=\"#execarray\">1) \u041c\u0430\u0441\u0441\u0438\u0432 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0441\u0435\u043a\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d<\/a><br \/>  <a href=\"#funccall\">2) \u0412 windows \u043d\u0435\u0442 syscall \u0438 \u0432\u044b\u0432\u043e\u0434 \u043d\u0443\u0436\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e printf<\/a><\/p>\n<p>  \u041f\u043e\u044f\u0441\u043d\u044e \u0447\u0435\u043c \u0442\u0443\u0442 \u043f\u043b\u043e\u0445 \u0432\u044b\u0437\u043e\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u041e\u0431\u044b\u0447\u043d\u043e \u0430\u0434\u0440\u0435\u0441 \u0432\u044b\u0437\u043e\u0432\u0430 \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043e\u043c \u0438\u0437 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432, \u0435\u0441\u043b\u0438 \u044f \u043d\u0435 \u043e\u0448\u0438\u0431\u0430\u044e\u0441\u044c. \u041d\u043e \u0443 \u043d\u0430\u0441 \u0432\u0435\u0434\u044c \u043e\u0431\u044b\u0447\u043d\u044b\u0439 \u043c\u0430\u0441\u0441\u0438\u0432, \u0433\u0434\u0435 \u043c\u044b \u0441\u0430\u043c\u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0430\u0434\u0440\u0435\u0441.<\/p>\n<p>  <a name=\"execarray\"><\/a><\/p>\n<h2>\u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u00ab\u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445\u00bb<\/h2>\n<p>  \u041f\u0435\u0440\u0432\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u044f \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0441\u044f, \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u043e \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0442\u043e, \u0447\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043c\u0430\u0441\u0441\u0438\u0432 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432 \u0441\u0435\u043a\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d, \u043a\u0430\u043a \u043a\u043e\u0434. \u041d\u043e \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u043a\u043e\u043f\u0430\u0432 stackoverflow \u0438 msdn \u044f \u0432\u0441\u0435 \u0436\u0435 \u043d\u0430\u0448\u0435\u043b \u0432\u044b\u0445\u043e\u0434. \u041a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 visual studio \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043f\u0440\u0435\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043d\u0443\u044e \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0443 <a href=\"https:\/\/msdn.microsoft.com\/en-us\/library\/50bewfwa.aspx\">section<\/a> \u0438 \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u044a\u044f\u0432\u0438\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0430 \u043e\u043a\u0430\u0437\u0430\u043b\u0430\u0441\u044c \u0432 \u0441\u0435\u043a\u0446\u0438\u0438 \u0441 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c \u043d\u0430 \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435.<\/p>\n<p>  \u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0432, \u0442\u0430\u043a \u043b\u0438 \u044d\u0442\u043e, \u044f \u0443\u0431\u0435\u0434\u0438\u043b\u0441\u044f, \u0447\u0442\u043e \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0438 <s>\u0444\u0443\u043d\u043a\u0446\u0438\u044f<\/s> \u043c\u0430\u0441\u0441\u0438\u0432 main \u0441\u043f\u043e\u043a\u043e\u0439\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u0442 opcode ret \u0438 \u043d\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u043e\u0448\u0438\u0431\u043a\u0438 \u00abAccess violation\u00bb.<\/p>\n<pre><code>#pragma section(&quot;.exre&quot;, execute, read) __declspec(allocate(&quot;.exre&quot;)) char main[] = { 0xC3 }; <\/code><\/pre>\n<p>  <\/p>\n<h3>\u041d\u0435\u043c\u043d\u043e\u0433\u043e \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u0430<\/h3>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043a\u043e\u0433\u0434\u0430 \u044f \u043c\u043e\u0433 \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u043c\u0430\u0441\u0441\u0438\u0432 \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043a\u043e\u0434 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f.<\/p>\n<p>  \u042f \u0440\u0435\u0448\u0438\u043b, \u0447\u0442\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u00abHello, World\u00bb \u044f \u0431\u0443\u0434\u0443 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0432 \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u043d\u043e\u043c \u043a\u043e\u0434\u0435. \u0421\u0440\u0430\u0437\u0443 \u0441\u043a\u0430\u0436\u0443, \u0447\u0442\u043e \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440 \u044f \u043f\u043e\u043d\u0438\u043c\u0430\u044e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u043b\u043e\u0445\u043e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u043e\u0448\u0443 \u0441\u0438\u043b\u044c\u043d\u043e \u0442\u0430\u043f\u043a\u0430\u043c\u0438 \u043d\u0435 \u043a\u0438\u0434\u0430\u0442\u044c\u0441\u044f, \u043d\u043e \u043a\u0440\u0438\u0442\u0438\u043a\u0430 \u043f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442\u0441\u044f. \u0412 \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0438 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a\u043e\u0439 \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u043d\u044b\u0439 \u043a\u043e\u0434 \u043c\u043e\u0436\u043d\u043e \u0432\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0438 \u043d\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u043b\u0438\u0448\u043d\u0438\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u043c\u043d\u0435 \u043f\u043e\u043c\u043e\u0433 \u044d\u0442\u043e\u0442 \u043e\u0442\u0432\u0435\u0442 \u043d\u0430 <a href=\"http:\/\/stackoverflow.com\/a\/4025307\/4109062\">stackoverfow<\/a><br \/>  \u042f \u0432\u0437\u044f\u043b notepad++ \u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 plugins-&gt;converter-&gt;\u00abASCII -&gt; HEX\u00bb \u043f\u043e\u043b\u0443\u0447\u0438\u043b \u043a\u043e\u0434 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432.<\/p>\n<pre>Hello, World!<\/pre>\n<p>  <\/p>\n<pre>48656C6C6F2C20576F726C6421<\/pre>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u043f\u043e 4 \u0431\u0430\u0439\u0442\u0430 \u0438 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c \u043d\u0430 \u0441\u0442\u0435\u043a \u0432 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435, \u043d\u0435 \u0437\u0430\u0431\u044b\u0432 \u043f\u0435\u0440\u0435\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0432 little-endian.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0414\u0435\u043b\u0438\u043c, \u043f\u0435\u0440\u0435\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u043c.<\/b><\/p>\n<div class=\"spoiler_text\">\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0432 \u043a\u043e\u043d\u0435\u0446 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u043d\u043e\u043b\u044c.<\/p>\n<pre>48656C6C6F2C20576F726C642100<\/pre>\n<p>  \u0414\u0435\u043b\u0438\u043c \u0441 \u043a\u043e\u043d\u0446\u0430 \u043d\u0430 4 \u0431\u0430\u0439\u0442\u043d\u044b\u0435 hex \u0447\u0438\u0441\u043b\u0430.<\/p>\n<pre>00004865 6C6C6F2C 20576F72 6C642100<\/pre>\n<p>  \u041f\u0435\u0440\u0435\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u0432 little-endian \u0438 \u043c\u0435\u043d\u044f\u0435\u043c \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u043d\u0430 \u043e\u0431\u0440\u0430\u0442\u043d\u044b\u0439<\/p>\n<pre>0x0021646C 0x726F5720 0x2C6F6C6C 0x65480000<\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u042f \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043e\u043f\u0443\u0441\u0442\u0438\u043b \u043c\u043e\u043c\u0435\u043d\u0442 \u0441 \u0442\u0435\u043c, \u043a\u0430\u043a \u044f \u043f\u044b\u0442\u0430\u043b\u0441\u044f \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c printf \u0438 \u0447\u0442\u043e\u0431\u044b \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043f\u043e\u0442\u043e\u043c \u044d\u0442\u043e\u0442 \u0430\u0434\u0440\u0435\u0441 \u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u0435. \u041f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0443 \u043c\u0435\u043d\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0432 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043d\u0430 printf. \u041f\u043e\u0437\u0436\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u0438\u0434\u043d\u043e \u043f\u043e\u0447\u0435\u043c\u0443 \u0442\u0430\u043a.<\/p>\n<pre><code>#include &lt;stdio.h&gt; const void *ptrprintf = printf; void main() {     __asm {         push 0x0021646C ; &quot;ld!\\0&quot;         push 0x726F5720 ; &quot; Wor&quot;         push 0x2C6F6C6C ; &quot;llo,&quot;          push 0x65480000 ; &quot;\\0\\0He&quot;         lea  eax, [esp+2] ; eax -&gt; &quot;Hello, World!&quot;         push eax ; \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043d\u0430 \u043d\u0430\u0447\u0430\u043b\u043e \u0441\u0442\u0440\u043e\u043a\u0438 \u043f\u0443\u0448\u0438\u043c \u043d\u0430 \u0441\u0442\u0435\u043a         call ptrprintf ; \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c printf         add  esp, 20 ; \u0447\u0438\u0441\u0442\u0438\u043c \u0441\u0442\u0435\u043a     } } <\/code><\/pre>\n<p>  \u041a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u043c \u0438 \u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0434\u0438\u0437\u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440.<\/p>\n<pre><code>00A8B001 68 6C 64 21 00       push        21646Ch   00A8B006 68 20 57 6F 72       push        726F5720h   00A8B00B 68 6C 6C 6F 2C       push        2C6F6C6Ch   00A8B010 68 00 00 48 65       push        65480000h   00A8B015 8D 44 24 02          lea         eax,[esp+2]   00A8B019 50                   push        eax   00A8B01A FF 15 00 90 A8 00    call        dword ptr [ptrprintf (0A89000h)]   00A8B020 83 C4 14             add         esp,14h   00A8B023 C3                   ret   <\/code><\/pre>\n<p>  \u041e\u0442\u0441\u044e\u0434\u0430 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0432\u0437\u044f\u0442\u044c \u0431\u0430\u0439\u0442\u044b \u043a\u043e\u0434\u0430. <\/p>\n<p>  <a name=\"byteasm\"><\/a><\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0427\u0442\u043e\u0431\u044b \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u043d\u0435 \u0443\u0431\u0438\u0440\u0430\u0442\u044c \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u043d\u044b\u0439 \u043a\u043e\u0434 \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u043c\u0438 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u043c\u0438 \u0432 notepad++.<\/b><\/p>\n<div class=\"spoiler_text\">\u0420\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u0441\u043b\u0435 \u0431\u0430\u0439\u0442\u043e\u0432 \u043a\u043e\u0434\u0430:<\/p>\n<pre> {2} *.*<\/pre>\n<p>  \u041d\u0430\u0447\u0430\u043b\u043e \u0441\u0442\u0440\u043e\u043a \u043c\u043e\u0436\u043d\u043e \u0443\u0431\u0440\u0430\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u043b\u0430\u0433\u0438\u043d\u0430 \u0434\u043b\u044f notepad++ TextFx:<\/p>\n<p>  TextFX-&gt;\u00abTextFx Tools\u00bb-&gt;\u00abDelete Line Numbers or First Word\u00bb, \u0432\u044b\u0434\u0435\u043b\u0438\u0432 \u0432\u0441\u0435 \u0441\u0442\u0440\u043e\u043a\u0438.<\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u0443 \u043d\u0430\u0441 \u0443\u0436\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0447\u0442\u0438 \u0433\u043e\u0442\u043e\u0432\u0430\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043a\u043e\u0434\u0430 \u0434\u043b\u044f \u043c\u0430\u0441\u0441\u0438\u0432\u0430.<\/p>\n<pre> 68 6C 64 21 00 68 20 57 6F 72 68 6C 6C 6F 2C 68 00 00 48 65 8D 44 24 02 50 FF 15 00 90 A8 00 ; \u041f\u043e\u0441\u043b\u0435 FF 15 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 4 \u0431\u0430\u0439\u0442\u0430 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0430\u0434\u0440\u0435\u0441\u043e\u043c \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c\u043e\u0439 \u0444\u0443\u043d\u0446\u043a\u0438\u0438 83 C4 14 C3 <\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <a name=\"funccall\"><\/a><\/p>\n<h2>\u0412\u044b\u0437\u043e\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0441 \u00ab\u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u043c\u00bb \u0430\u0434\u0440\u0435\u0441\u043e\u043c<\/h2>\n<p>  \u042f \u0434\u043e\u043b\u0433\u043e \u0434\u0443\u043c\u0430\u043b \u043a\u0430\u043a \u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0432 \u0433\u043e\u0442\u043e\u0432\u043e\u0439 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0430\u0434\u0440\u0435\u0441 \u0438\u0437 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u0435\u0441\u043b\u0438 \u044d\u0442\u043e \u0437\u043d\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440. \u0418 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0441\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0432 \u0443 \u0437\u043d\u0430\u043a\u043e\u043c\u044b\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u043e\u0432 \u0438 \u043f\u043e\u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0432 \u044f \u043f\u043e\u043d\u044f\u043b, \u0447\u0442\u043e \u0430\u0434\u0440\u0435\u0441 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0432\u0437\u044f\u0442\u0438\u044f \u0430\u0434\u0440\u0435\u0441\u0430 \u043e\u0442 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f \u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044e. \u0427\u0442\u043e \u044f \u0438 \u0441\u0434\u0435\u043b\u0430\u043b.<\/p>\n<pre><code>#include &lt;stdio.h&gt; const void *ptrprintf = printf; void main() {     void *funccall = &ptrprintf;     __asm {         call ptrprintf     } } <\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/07e\/374\/7de\/07e3747dec7841189b0169252c478517.png\"\/><\/p>\n<p>  \u041a\u0430\u043a \u0432\u0438\u0434\u043d\u043e \u0432 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435 \u043b\u0435\u0436\u0438\u0442 \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u043e\u0442 \u0441\u0430\u043c\u044b\u0439 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c\u044b\u0439 \u0430\u0434\u0440\u0435\u0441. \u0422\u043e \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e.<\/p>\n<h3>\u0421\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u0432\u0441\u0435 \u0432\u043c\u0435\u0441\u0442\u0435<\/h3>\n<p>  \u0418\u0442\u0430\u043a, \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0431\u0430\u0439\u0442 \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430, \u0441\u0440\u0435\u0434\u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442 \u0432 \u0430\u0434\u0440\u0435\u0441, \u043d\u0443\u0436\u043d\u044b\u0439 \u043d\u0430\u043c \u0434\u043b\u044f \u0432\u044b\u0437\u043e\u0432\u0430 printf. \u0410\u0434\u0440\u0435\u0441 \u0443 \u043d\u0430\u0441 4 \u0431\u0430\u0439\u0442\u043d\u044b\u0439(\u0442.\u043a. \u043f\u0438\u0448\u0435\u043c \u0434\u043b\u044f \u043a\u043e\u0434 \u0434\u043b\u044f 32 \u0440\u0430\u0437\u0440\u044f\u0434\u043d\u043e\u0439 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b), \u0437\u043d\u0430\u0447\u0438\u0442 \u0438 \u043c\u0430\u0441\u0441\u0438\u0432 \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c 4 \u0431\u0430\u0439\u0442\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u043f\u0440\u0438\u0447\u0435\u043c \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0441\u043b\u0435 \u0431\u0430\u0439\u0442 FF 15 \u0443 \u043d\u0430\u0441 \u0448\u0435\u043b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442, \u043a\u0443\u0434\u0430 \u043c\u044b \u0438 \u0431\u0443\u0434\u0435\u043c \u043f\u043e\u043c\u0435\u0449\u0430\u0442\u044c \u043d\u0430\u0448 \u0430\u0434\u0440\u0435\u0441.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u0443\u0442\u0435\u043c \u043d\u0435\u0445\u0438\u0442\u0440\u044b\u0445 \u043f\u043e\u0434\u0441\u0442\u0430\u043d\u043e\u0432\u043e\u043a \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0438\u0441\u043a\u043e\u043c\u0443\u044e \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c.<\/b><\/p>\n<div class=\"spoiler_text\">\u0411\u0435\u0440\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u0443\u044e \u0440\u0430\u043d\u0435\u0435 <a href=\"#byteasm\">\u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0431\u0430\u0439\u0442<\/a> \u043d\u0430\u0448\u0435\u0433\u043e \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430. \u041e\u0442\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u044f\u0441\u044c \u043e\u0442 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e 4 \u0431\u0430\u0439\u0442\u0430 \u043f\u043e\u0441\u043b\u0435 FF 15 \u0443 \u043d\u0430\u0441 \u0434\u043e\u043b\u0436\u043d\u044b \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u043e\u0434\u043d\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u0443\u0435\u043c \u043f\u043e\u0434 \u043d\u0438\u0445. \u0410 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u044e\u0449\u0438\u0435 \u0431\u0430\u0439\u0442\u044b \u0437\u0430\u043c\u0435\u043d\u0438\u043c \u043d\u0430 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044e nop \u0441 \u043a\u043e\u0434\u043e\u043c 0x90.<\/p>\n<pre> 90 68 6C 64 21 00 68 20 57 6F 72 68 6C 6C 6F 2C 68 00 00 48 65 8D 44 24  02 50 FF 15 00 90 A8 00 ; \u0430\u0434\u0440\u0435\u0441 \u0434\u043b\u044f \u0432\u044b\u0437\u043e\u0432\u0430 printf 83 C4 14 C3 <\/pre>\n<p>  \u0418 \u043e\u043f\u044f\u0442\u044c \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u043c 4 \u0431\u0430\u0439\u0442\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 little-endian. \u0414\u043b\u044f \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0430 \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432 \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u043d\u043e\u0433\u043e\u0441\u0442\u0440\u043e\u0447\u043d\u043e\u0435 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0432 notepad++ \u0441 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0435\u0439 alt+shift:<\/p>\n<pre> 646C6890 20680021 68726F57 2C6F6C6C 48000068 24448D65 15FF5002 00000000 ; \u0430\u0434\u0440\u0435\u0441 \u0434\u043b\u044f \u0432\u044b\u0437\u043e\u0432\u0430 printf, \u0434\u0430\u043b\u0435\u0435 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043c\u0435\u043d\u0435\u043d \u043d\u0430 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 C314C483 <\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c 4 \u0431\u0430\u0439\u0442\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b \u0438 \u0430\u0434\u0440\u0435\u0441 \u0434\u043b\u044f \u0432\u044b\u0437\u043e\u0432\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 printf \u0438 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043d\u0430\u043a\u043e\u043d\u0435\u0446 \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043d\u0430\u0448 \u043c\u0430\u0441\u0441\u0438\u0432 main.<\/p>\n<pre><code>#include &lt;stdio.h&gt; const void *ptrprintf = printf; #pragma section(&quot;.exre&quot;, execute, read) __declspec(allocate(&quot;.exre&quot;)) int main[] = {     0x646C6890, 0x20680021, 0x68726F57,     0x2C6F6C6C, 0x48000068, 0x24448D65,     0x15FF5002, &ptrprintf, 0xC314C483 }; <\/code><\/pre>\n<p>  \u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c break point \u0432 \u0434\u0435\u0431\u0430\u0433\u0433\u0435\u0440\u0435 visual studio \u043d\u0430\u0434\u043e \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043f\u0435\u0440\u0432\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u043d\u0430 0x646C68<b>CC<\/b><br \/>  \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c, \u0441\u043c\u043e\u0442\u0440\u0438\u043c.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/32f\/2e0\/8a3\/32f2e08a393446bc980c4ed5d19e02e5.png\"\/><\/p>\n<p>  \u0413\u043e\u0442\u043e\u0432\u043e!<\/p>\n<h1>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h1>\n<p>  \u042f \u0438\u0437\u0432\u0438\u043d\u044f\u044e\u0441\u044c \u0435\u0441\u043b\u0438 \u043a\u043e\u043c\u0443-\u0442\u043e \u0432 \u0441\u0442\u0430\u0442\u044c\u044f \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0430\u0441\u044c \u00ab\u0434\u043b\u044f \u0441\u0430\u043c\u044b\u0445 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0445\u00bb. \u042f \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u043b\u0441\u044f \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0430\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0438 \u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u0435 \u0432\u0435\u0449\u0438. \u0425\u043e\u0442\u0435\u043b \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c \u043e\u043f\u044b\u0442\u043e\u043c \u0442\u0430\u043a\u043e\u0433\u043e \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f. \u0411\u0443\u0434\u0443 \u0440\u0430\u0434 \u0435\u0441\u043b\u0438 \u0441\u0442\u0430\u0442\u044c\u044f \u043e\u043a\u0430\u0436\u0435\u0442\u0441\u044f \u043a\u043e\u043c\u0443-\u0442\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0439, \u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0438 \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0439.<\/p>\n<p>  \u041e\u0441\u0442\u0430\u0432\u043b\u044e \u0442\u0443\u0442 \u0432\u0441\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0435 \u0441\u0441\u044b\u043b\u043a\u0438:<\/p>\n<p>  <a href=\"http:\/\/tproger.ru\/translations\/main-is-usually-a-function-so-then-when-is-it-not\/\">\u0421\u0442\u0430\u0442\u044c\u044f \u00abmain usually a function\u00bb<\/a><br \/>  <a href=\"https:\/\/msdn.microsoft.com\/en-us\/library\/50bewfwa.aspx\">\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 section \u043d\u0430 msdn<\/a><br \/>  <a href=\"http:\/\/stackoverflow.com\/a\/4025307\/4109062\">\u041d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u0438\u0435 \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u043d\u0430 stackoverflow<\/a><\/p>\n<p>  \u0418 \u043d\u0430 \u0432\u0441\u044f\u043a\u0438\u0439 \u0441\u043b\u0443\u0447\u0430\u0439 \u043e\u0441\u0442\u0430\u0432\u043b\u044e <a href=\"https:\/\/dl.dropboxusercontent.com\/u\/94468957\/code\/main_array.7z\">\u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 7z \u0430\u0440\u0445\u0438\u0432 \u0441 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c \u043f\u043e\u0434 visual studio 2013<\/a><\/p>\n<p>  \u0422\u0430\u043a\u0436\u0435 \u043d\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0430\u044e, \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0435\u0449\u0451 \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u044b\u0437\u043e\u0432 printf \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u043e\u0439 \u043a\u043e\u0434 \u0432\u044b\u0437\u043e\u0432\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043d\u043e \u044f \u043d\u0435 \u0443\u0441\u043f\u0435\u043b \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u0432\u043e\u043f\u0440\u043e\u0441.<\/p>\n<p>  \u0411\u0443\u0434\u0443 \u0440\u0430\u0434 \u0432\u0430\u0448\u0438\u043c \u043e\u0442\u0437\u044b\u0432\u0430\u043c \u0438 \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u044f\u043c.       <\/p>\n<div class=\"clear\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habrahabr.ru\/post\/275861\/\"> https:\/\/habrahabr.ru\/post\/275861\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>       \u042f \u0445\u043e\u0442\u0435\u043b \u0431\u044b \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u044f \u043f\u0438\u0441\u0430\u043b \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u00abHello, World!\u00bb \u043d\u0430 C. \u0414\u043b\u044f \u043f\u043e\u0434\u043e\u0433\u0440\u0435\u0432\u0430 \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u043a\u0430\u0436\u0443 \u043a\u043e\u0434. \u041a\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442 \u043a\u0430\u043a \u0434\u043e \u044d\u0442\u043e\u0433\u043e \u0434\u043e\u0445\u043e\u0434\u0438\u043b \u044f, \u0434\u043e\u0431\u0440\u043e \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434 \u043a\u0430\u0442.<\/p>\n<pre><code>#include &lt;stdio.h&gt; const void *ptrprintf = printf; #pragma section(&quot;.exre&quot;, execute, read) __declspec(allocate(&quot;.exre&quot;)) int main[] = {     0x646C6890, 0x20680021, 0x68726F57,     0x2C6F6C6C, 0x48000068, 0x24448D65,     0x15FF5002, &#038;ptrprintf, 0xC314C483 };<\/code><\/pre>\n<p>  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-272851","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/272851","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=272851"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/272851\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=272851"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=272851"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=272851"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}