<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to 11: FindOpRev makes Ollydbg freeze</title><link>https://sourceforge.net/p/odbgscript/bugs/11/</link><description>Recent changes to 11: FindOpRev makes Ollydbg freeze</description><atom:link href="https://sourceforge.net/p/odbgscript/bugs/11/feed.rss" rel="self"/><language>en</language><lastBuildDate>Thu, 15 Feb 2018 15:23:23 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/odbgscript/bugs/11/feed.rss" rel="self" type="application/rss+xml"/><item><title>#11 FindOpRev makes Ollydbg freeze</title><link>https://sourceforge.net/p/odbgscript/bugs/11/?limit=25#74f6</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Nice to see my ages-old project still being alive and kicking! :) Will fix this - my first fix since v0.93 or something.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">SHaG</dc:creator><pubDate>Thu, 15 Feb 2018 15:23:23 -0000</pubDate><guid>https://sourceforge.net7db4c0d697756abf0cdb015aa202dbf04fe1e927</guid></item><item><title>FindOpRev makes Ollydbg freeze</title><link>https://sourceforge.net/p/odbgscript/bugs/11/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;**### Phenom&lt;br/&gt;
-&amp;gt;When using the command FindOpRev in a script  (to search certain command backwards) there's a great change to make Ollydbg hung and not responding anymore.&lt;/p&gt;
&lt;h3 id="background"&gt;background:&lt;/h3&gt;
&lt;p&gt;&lt;code&gt;bool OllyLang::DoFINDOPREV(string args)&lt;/code&gt; &lt;br/&gt;
in&lt;em&gt; ODbgScript.1.82.src\OllyLangCommands.cpp&lt;/em&gt;&lt;br/&gt;
gets stucked in a endlessloop in case there is nothing found.&lt;/p&gt;
&lt;h3 id="workaroundfix"&gt;Workaround/Fix:&lt;/h3&gt;
&lt;p&gt;If Ollydbg gets freezed. &lt;br/&gt;
Start another Ollydbg instance and attach it to the hunged Ollydbg. Pause and trace with F8 a while.  You'll probably get soon into the endless loop and do something to  break out of it. &lt;/p&gt;
&lt;h3 id="more-in-detail"&gt;More in detail&lt;/h3&gt;
&lt;p&gt;the problem is that boader check in the find Loop:&lt;br/&gt;
        do &lt;br/&gt;
        {&lt;br/&gt;
            addr    = Disassembleback( 0, tmem-&amp;gt;base, tmem-&amp;gt;size, addr, 1, 0); &lt;br/&gt;
            endaddr = Disassembleback( 0, tmem-&amp;gt;base, tmem-&amp;gt;size, addr, 1, 0); &lt;br/&gt;
            ok = Readcommand(addr, cmd);&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;        if(addr == tmem-&amp;gt;base + tmem-&amp;gt;size)
            ok = 0;

        if(ok)
            result = FindWithWildcards(cmd, ops[1].c_str(), endaddr - addr);
    } while(result != 0 &amp;amp;&amp;amp; ok != 0);
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;While &lt;br/&gt;
Since the index in loop is running backwards it should  check for lower boundary.&lt;br/&gt;
&lt;s&gt;if(addr == tmem-&amp;gt;base + tmem-&amp;gt;size)&lt;/s&gt; will  check the upper boundary (&amp;lt;-which is excellent for FindOp ) but to make FindOpRev work change it to:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;if ( addr =&amp;lt; tmem-&amp;gt;base )&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h1 id="quickfixdownload"&gt;Quickfix/Download:&lt;/h1&gt;
&lt;p&gt;However here's a fixed binary. &lt;br/&gt;
Hehe just  two NOP's and the bug is gone. &lt;em&gt;smile&lt;/em&gt; &lt;br/&gt;
Jay Hoo ya  probably all know this game. &lt;/p&gt;
&lt;p&gt;Beside that I also packed-&amp;gt;&lt;br/&gt;
&lt;strong&gt;OdbgScript.xml&lt;/strong&gt;&lt;br/&gt;
in the Zip.  It a language definition  file for&lt;strong&gt; Notepad++&lt;/strong&gt; that enables&lt;strong&gt; code folding &lt;/strong&gt;&amp;amp; &lt;strong&gt;syntax highlighting&lt;/strong&gt; to make look ya script shiny colorful and well organized.&lt;br/&gt;
Original name is '*OdbgScript4npp by SpeedJack.rar'  *&lt;/p&gt;
&lt;h3 id="off-topic"&gt;Off topic:&lt;/h3&gt;
&lt;p&gt;Well I'm sorry for that flaw . &lt;br/&gt;
Some years ago I did that Olly Script 0.93 -&amp;gt; 0.94  update. Since reverse engineering needed some search for commands that can also run in reverse. &lt;br/&gt;
Wow its a real honor to see that it made its way into ODbgScript!&lt;br/&gt;
I even loved ODbgScript before and now when I got the Update to maybe add the  FindOp_r I saw that it's already there. Wow magic.&lt;/p&gt;
&lt;p&gt;Oops I yeah I'm really sorrow for this little glitch.&lt;/p&gt;
&lt;p&gt;Okay &lt;/p&gt;
&lt;p&gt;That's it.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Daniello Alto</dc:creator><pubDate>Wed, 14 Feb 2018 15:21:23 -0000</pubDate><guid>https://sourceforge.net4a338d9f4064e11b9d4db2d180526e242b796327</guid></item></channel></rss>