<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Asm on bramp.net</title>
    <link>https://blog.bramp.net/</link>
    <description>Recent content in Asm on bramp.net</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-GB</language>
    <lastBuildDate>Mon, 24 May 2010 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://blog.bramp.net/tags/asm/" rel="self" type="application/rss+xml" />
    
    <item>
      <title>Fullscreen Hack for Flash 10.1</title>
      <link>https://blog.bramp.net/post/2010/05/24/fullscreen-hack-for-flash-10.1/</link>
      <pubDate>Mon, 24 May 2010 00:00:00 +0000</pubDate>
      
      <guid>https://blog.bramp.net/post/2010/05/24/fullscreen-hack-for-flash-10.1/</guid>
      <description><p>After watching a few hours of <a href="http://www.channel4.com/programmes/4od">4oD</a> today I got annoyed that i couldn’t do something on one monitor while my other monitor plays full screen flash. The reason, flash will instantly lose full screen if another application gains focus (e.g the web browser on my other monitor.)</p>
<p>After a bit of googling I found these links [<a href="http://www.channel4.com/programmes/4od">1</a>]<a href="http://my.opera.com/d.i.z./blog/2009/04/22/watch-fullscreen-flash-while-working-on-another-screen">2</a> [<a href="http://my.opera.com/d.i.z./blog/2009/04/22/watch-fullscreen-flash-while-working-on-another-screen">2</a>]<a href="http://jmaxxz.com/index.php?option=com_content&amp;view=article&amp;id=89:flashhacker&amp;catid=16:downloads&amp;Itemid=32">3</a>. However, both of these sites only support flash 9 and flash 10.0, whereas I’m currently on 10.1.53.38. Additionally the second link mentioned no one has been able to hack this into 10.1, so I instantly recongised a challenge.</p>
<p>About 4 hours later I figure it out:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">On win32 open
</span></span><span class="line"><span class="cl">C:\Windows\System32\Macromed\Flash\NPSWF32.dll
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">On win64 open
</span></span><span class="line"><span class="cl">C:\Windows\SysWOW64\Macromed\Flash\NPSWF32.dll
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">or if using Google Chrome (as Chrome now comes with the Flash plugin) open
</span></span><span class="line"><span class="cl">C:\Users\Andrew\AppData\Local\Google\Chrome\Application\6.0.408.1\gcswf32.dll
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">or if using Google Chrome on Windows XP:
</span></span><span class="line"><span class="cl">C:\Documents and Settings\Andrew\Local Settings\Application Data\Google\Chrome\Application\6.0.408.1
</span></span></code></pre></div><p>On version 10.1.53.38<br>
Jump to offset <strong>0×180227</strong> and change bytes <strong>74 2A</strong> to <strong>90 90</strong>, and voila.</p>
<p>On version 10.1.53.55<br>
Jump to offset <strong>0×180410</strong> and change bytes <strong>74 39</strong> to <strong>90 90</strong>, and voila.</p>
<p>On version 10.1.53.64 (Chrome version – gcswf32.dll)<br>
Jump to offset <strong>0×180753</strong> and change bytes <strong>74 39</strong> to <strong>90 90</strong>, and voila.</p>
<p>On version 10.1.53.64 (Normal version – NPSWF32.dll – thanks Medlir)<br>
Jump to offset <strong>0x180A15</strong> and change bytes <strong>74 39</strong> to <strong>90 90</strong>, and voila.</p>
<p>Thanks to all the commenter who worked this out before me :)<br>
On version 10.1.82.76 (Chrome version – gcswf32.dll)<br>
Jump to offset <strong>0x180FAF</strong> and change bytes <strong>74 39</strong> to <strong>90 90</strong>, and voila.</p>
<p>On version 10.1.82.76 (Normal version – NPSWF32.dll)<br>
Jump to offset <strong>0x180AAF</strong> and change bytes <strong>74 39</strong> to <strong>90 90</strong>, and voila.</p>
<p><strong>Note this method is unsupported, and will most likely break when Flash gets updated again. It is always a good idea to backup any file first, and make sure you are on the same version as me.</strong></p>
<p>For the curious this changes some code that looks like this:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-c" data-lang="c"><span class="line"><span class="cl"><span class="k">if</span> <span class="p">(</span><span class="n">msg</span> <span class="o">==</span> <span class="n">WM_KILLFOCUS</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">  <span class="n">jump</span> <span class="n">to</span> <span class="n">kill_focus</span>
</span></span><span class="line"><span class="cl"><span class="k">if</span> <span class="p">(</span><span class="n">msg</span> <span class="o">==</span> <span class="n">WM_PAINT</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">  <span class="n">jump</span> <span class="n">to</span> <span class="n">paint</span>
</span></span></code></pre></div><p>to</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-c" data-lang="c"><span class="line"><span class="cl"><span class="k">if</span> <span class="p">(</span><span class="n">msg</span> <span class="o">==</span> <span class="n">WM_KILLFOCUS</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">  <span class="n">nop</span> <span class="n">nop</span>
</span></span><span class="line"><span class="cl"><span class="k">if</span> <span class="p">(</span><span class="n">msg</span> <span class="o">==</span> <span class="n">WM_PAINT</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">  <span class="n">jump</span> <span class="n">to</span> <span class="n">paint</span>
</span></span></code></pre></div><p>and for some context the version 10.1.53.64 surrounding code looked like this:</p>
<pre><b>74</b> 39 83 E8 07 <b>74</b> 11 83 E8 05 <b>75</b> 13 8B
</pre>
<p>The 74s and 75 should be the same between versions, but all the other bytes might change.</p>
</description>
    </item>
    
  </channel>
</rss>
