{"id":473,"date":"2007-10-31T21:14:12","date_gmt":"2007-11-01T04:14:12","guid":{"rendered":"http:\/\/multimedia.cx\/eggs\/barretts-basic-blocks-are-back\/"},"modified":"2007-10-31T21:14:12","modified_gmt":"2007-11-01T04:14:12","slug":"barretts-basic-blocks-are-back","status":"publish","type":"post","link":"https:\/\/multimedia.cx\/eggs\/barretts-basic-blocks-are-back\/","title":{"rendered":"Barrett&#8217;s Basic Blocks Are Back"},"content":{"rendered":"<p>Thanks to <a href=\"http:\/\/nothings.org\/\">Sean Barrett<\/a> for helping me compile his bb86 app. I let it rip on this code snippet from the <a href=\"http:\/\/multimedia.cx\/eggs\/unnamed-re-project\/\">Unnamed RE Project<\/a>. It&#8217;s interesting stuff. I omitted the push, pop, and ret instructions since basic blocks pertain to linear sequences of load, store, and arithmetic instructions:<\/p>\n<pre>\r\n$ .\/bb86 < ~\/basic-block.asm\r\nReading stdin\r\nWarning: unknown opcode 'bswap' in line 9\r\n\r\nMemory locations:\r\n        mem1 EQU dword+(ebp_0)+08\r\n        mem5 EQU dword+(mem4)+((mem3 >> 03))\r\n        mem4 EQU dword+(mem1)+10\r\n        mem3 EQU dword+(mem1)+04\r\n        mem2 EQU dword+(ebp_0)+0c\r\n\r\nInteger registers:\r\n  eax = ((mem5 < < cl_0) >> cl_0)\r\n  ebx = mem4\r\n  ecx = (00000020 - mem2)\r\n  edx = (mem3 >> 03)\r\n  esi = mem2\r\n  edi = mem1\r\n\r\nFloating point stack:\r\n  st(0) = fp3\r\n  st(1) = fp2\r\n  st(2) = fp1\r\n  st(3) = fp0\r\n\r\nMemory locations:\r\n  [dword+(mem1)+04] < = (mem3 + mem2)\r\n<\/pre>\n<p>I am pretty sure that all of those register states are true at the end of the block, though they are listed in the traditional sequence rather than the logical order. I.e., cl needs to be set before eax could be correct.<\/p>\n<p>I tried out bb86 on a basic block of floating point instructions (using a computation I understand, like the distance between 2 points, rather than a Fourier transform), and it was less than successful (crash). But I can not fault the program since I am feeding it data disassembled by objdump (-Mintel) rather than Microsoft's official format. Again, bb86 is an interesting effort, and I was impressed when I examined the output of test.asm that was packaged with the code (<a href=\"http:\/\/multimedia.cx\/eggs\/what-re-looks-like\/#comment-86937\">seen in Sean's original comment<\/a>).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Thanks to Sean Barrett for helping me compile his bb86 app. I let it rip on this code snippet from the Unnamed RE Project. It&#8217;s interesting stuff. I omitted the push, pop, and ret instructions since basic blocks pertain to linear sequences of load, store, and arithmetic instructions: $ .\/bb86 < ~\/basic-block.asm Reading stdin Warning: [&hellip;]\n<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[54,46,277,47],"class_list":["post-473","post","type-post","status-publish","format-standard","hentry","category-reverse-engineering","tag-decompilation","tag-intel-x86","tag-reverse-engineering","tag-sean-barrett"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"Thanks to Sean Barrett for helping me compile his bb86 app. I let it rip on this code snippet from the Unnamed RE Project. It&#039;s interesting stuff. I omitted the push, pop, and ret instructions since basic blocks pertain to linear sequences of load, store, and arithmetic instructions: $ .\/bb86 &lt; ~\/basic-block.asm Reading stdin Warning:\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Multimedia Mike\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/multimedia.cx\/eggs\/barretts-basic-blocks-are-back\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.10\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Breaking Eggs And Making Omelettes | Topics On Multimedia Technology and Reverse Engineering\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Barrett\u2019s Basic Blocks Are Back | Breaking Eggs And Making Omelettes\" \/>\n\t\t<meta property=\"og:description\" content=\"Thanks to Sean Barrett for helping me compile his bb86 app. I let it rip on this code snippet from the Unnamed RE Project. It&#039;s interesting stuff. I omitted the push, pop, and ret instructions since basic blocks pertain to linear sequences of load, store, and arithmetic instructions: $ .\/bb86 &lt; ~\/basic-block.asm Reading stdin Warning:\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/multimedia.cx\/eggs\/barretts-basic-blocks-are-back\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2007-11-01T04:14:12+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2007-11-01T04:14:12+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Barrett\u2019s Basic Blocks Are Back | Breaking Eggs And Making Omelettes\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Thanks to Sean Barrett for helping me compile his bb86 app. I let it rip on this code snippet from the Unnamed RE Project. It&#039;s interesting stuff. I omitted the push, pop, and ret instructions since basic blocks pertain to linear sequences of load, store, and arithmetic instructions: $ .\/bb86 &lt; ~\/basic-block.asm Reading stdin Warning:\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/barretts-basic-blocks-are-back\\\/#article\",\"name\":\"Barrett\\u2019s Basic Blocks Are Back | Breaking Eggs And Making Omelettes\",\"headline\":\"Barrett&#8217;s Basic Blocks Are Back\",\"author\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/author\\\/multimedia-mike\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/#organization\"},\"datePublished\":\"2007-10-31T21:14:12-07:00\",\"dateModified\":\"2007-10-31T21:14:12-07:00\",\"inLanguage\":\"en-US\",\"commentCount\":4,\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/barretts-basic-blocks-are-back\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/barretts-basic-blocks-are-back\\\/#webpage\"},\"articleSection\":\"Reverse Engineering, decompilation, intel x86, Reverse Engineering, sean barrett\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/barretts-basic-blocks-are-back\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/multimedia.cx\\\/eggs\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/category\\\/reverse-engineering\\\/#listItem\",\"name\":\"Reverse Engineering\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/category\\\/reverse-engineering\\\/#listItem\",\"position\":2,\"name\":\"Reverse Engineering\",\"item\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/category\\\/reverse-engineering\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/barretts-basic-blocks-are-back\\\/#listItem\",\"name\":\"Barrett&#8217;s Basic Blocks Are Back\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/barretts-basic-blocks-are-back\\\/#listItem\",\"position\":3,\"name\":\"Barrett&#8217;s Basic Blocks Are Back\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/category\\\/reverse-engineering\\\/#listItem\",\"name\":\"Reverse Engineering\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/#organization\",\"name\":\"Breaking Eggs And Making Omelettes\",\"description\":\"Topics On Multimedia Technology and Reverse Engineering\",\"url\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/author\\\/multimedia-mike\\\/#author\",\"url\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/author\\\/multimedia-mike\\\/\",\"name\":\"Multimedia Mike\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/barretts-basic-blocks-are-back\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/2eb93f7cada658f7986b5092062849fa255779eada3342c8f6b9a40764b95fdd?s=96&d=identicon&r=g\",\"width\":96,\"height\":96,\"caption\":\"Multimedia Mike\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/barretts-basic-blocks-are-back\\\/#webpage\",\"url\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/barretts-basic-blocks-are-back\\\/\",\"name\":\"Barrett\\u2019s Basic Blocks Are Back | Breaking Eggs And Making Omelettes\",\"description\":\"Thanks to Sean Barrett for helping me compile his bb86 app. I let it rip on this code snippet from the Unnamed RE Project. It's interesting stuff. I omitted the push, pop, and ret instructions since basic blocks pertain to linear sequences of load, store, and arithmetic instructions: $ .\\\/bb86 < ~\\\/basic-block.asm Reading stdin Warning:\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/barretts-basic-blocks-are-back\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/author\\\/multimedia-mike\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/author\\\/multimedia-mike\\\/#author\"},\"datePublished\":\"2007-10-31T21:14:12-07:00\",\"dateModified\":\"2007-10-31T21:14:12-07:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/#website\",\"url\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/\",\"name\":\"Breaking Eggs And Making Omelettes\",\"description\":\"Topics On Multimedia Technology and Reverse Engineering\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Barrett\u2019s Basic Blocks Are Back | Breaking Eggs And Making Omelettes","description":"Thanks to Sean Barrett for helping me compile his bb86 app. I let it rip on this code snippet from the Unnamed RE Project. It's interesting stuff. I omitted the push, pop, and ret instructions since basic blocks pertain to linear sequences of load, store, and arithmetic instructions: $ .\/bb86 < ~\/basic-block.asm Reading stdin Warning:","canonical_url":"https:\/\/multimedia.cx\/eggs\/barretts-basic-blocks-are-back\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/multimedia.cx\/eggs\/barretts-basic-blocks-are-back\/#article","name":"Barrett\u2019s Basic Blocks Are Back | Breaking Eggs And Making Omelettes","headline":"Barrett&#8217;s Basic Blocks Are Back","author":{"@id":"https:\/\/multimedia.cx\/eggs\/author\/multimedia-mike\/#author"},"publisher":{"@id":"https:\/\/multimedia.cx\/eggs\/#organization"},"datePublished":"2007-10-31T21:14:12-07:00","dateModified":"2007-10-31T21:14:12-07:00","inLanguage":"en-US","commentCount":4,"mainEntityOfPage":{"@id":"https:\/\/multimedia.cx\/eggs\/barretts-basic-blocks-are-back\/#webpage"},"isPartOf":{"@id":"https:\/\/multimedia.cx\/eggs\/barretts-basic-blocks-are-back\/#webpage"},"articleSection":"Reverse Engineering, decompilation, intel x86, Reverse Engineering, sean barrett"},{"@type":"BreadcrumbList","@id":"https:\/\/multimedia.cx\/eggs\/barretts-basic-blocks-are-back\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/multimedia.cx\/eggs#listItem","position":1,"name":"Home","item":"https:\/\/multimedia.cx\/eggs","nextItem":{"@type":"ListItem","@id":"https:\/\/multimedia.cx\/eggs\/category\/reverse-engineering\/#listItem","name":"Reverse Engineering"}},{"@type":"ListItem","@id":"https:\/\/multimedia.cx\/eggs\/category\/reverse-engineering\/#listItem","position":2,"name":"Reverse Engineering","item":"https:\/\/multimedia.cx\/eggs\/category\/reverse-engineering\/","nextItem":{"@type":"ListItem","@id":"https:\/\/multimedia.cx\/eggs\/barretts-basic-blocks-are-back\/#listItem","name":"Barrett&#8217;s Basic Blocks Are Back"},"previousItem":{"@type":"ListItem","@id":"https:\/\/multimedia.cx\/eggs#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/multimedia.cx\/eggs\/barretts-basic-blocks-are-back\/#listItem","position":3,"name":"Barrett&#8217;s Basic Blocks Are Back","previousItem":{"@type":"ListItem","@id":"https:\/\/multimedia.cx\/eggs\/category\/reverse-engineering\/#listItem","name":"Reverse Engineering"}}]},{"@type":"Organization","@id":"https:\/\/multimedia.cx\/eggs\/#organization","name":"Breaking Eggs And Making Omelettes","description":"Topics On Multimedia Technology and Reverse Engineering","url":"https:\/\/multimedia.cx\/eggs\/"},{"@type":"Person","@id":"https:\/\/multimedia.cx\/eggs\/author\/multimedia-mike\/#author","url":"https:\/\/multimedia.cx\/eggs\/author\/multimedia-mike\/","name":"Multimedia Mike","image":{"@type":"ImageObject","@id":"https:\/\/multimedia.cx\/eggs\/barretts-basic-blocks-are-back\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/2eb93f7cada658f7986b5092062849fa255779eada3342c8f6b9a40764b95fdd?s=96&d=identicon&r=g","width":96,"height":96,"caption":"Multimedia Mike"}},{"@type":"WebPage","@id":"https:\/\/multimedia.cx\/eggs\/barretts-basic-blocks-are-back\/#webpage","url":"https:\/\/multimedia.cx\/eggs\/barretts-basic-blocks-are-back\/","name":"Barrett\u2019s Basic Blocks Are Back | Breaking Eggs And Making Omelettes","description":"Thanks to Sean Barrett for helping me compile his bb86 app. I let it rip on this code snippet from the Unnamed RE Project. It's interesting stuff. I omitted the push, pop, and ret instructions since basic blocks pertain to linear sequences of load, store, and arithmetic instructions: $ .\/bb86 < ~\/basic-block.asm Reading stdin Warning:","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/multimedia.cx\/eggs\/#website"},"breadcrumb":{"@id":"https:\/\/multimedia.cx\/eggs\/barretts-basic-blocks-are-back\/#breadcrumblist"},"author":{"@id":"https:\/\/multimedia.cx\/eggs\/author\/multimedia-mike\/#author"},"creator":{"@id":"https:\/\/multimedia.cx\/eggs\/author\/multimedia-mike\/#author"},"datePublished":"2007-10-31T21:14:12-07:00","dateModified":"2007-10-31T21:14:12-07:00"},{"@type":"WebSite","@id":"https:\/\/multimedia.cx\/eggs\/#website","url":"https:\/\/multimedia.cx\/eggs\/","name":"Breaking Eggs And Making Omelettes","description":"Topics On Multimedia Technology and Reverse Engineering","inLanguage":"en-US","publisher":{"@id":"https:\/\/multimedia.cx\/eggs\/#organization"}}]},"og:locale":"en_US","og:site_name":"Breaking Eggs And Making Omelettes | Topics On Multimedia Technology and Reverse Engineering","og:type":"article","og:title":"Barrett\u2019s Basic Blocks Are Back | Breaking Eggs And Making Omelettes","og:description":"Thanks to Sean Barrett for helping me compile his bb86 app. I let it rip on this code snippet from the Unnamed RE Project. It's interesting stuff. I omitted the push, pop, and ret instructions since basic blocks pertain to linear sequences of load, store, and arithmetic instructions: $ .\/bb86 &lt; ~\/basic-block.asm Reading stdin Warning:","og:url":"https:\/\/multimedia.cx\/eggs\/barretts-basic-blocks-are-back\/","article:published_time":"2007-11-01T04:14:12+00:00","article:modified_time":"2007-11-01T04:14:12+00:00","twitter:card":"summary","twitter:title":"Barrett\u2019s Basic Blocks Are Back | Breaking Eggs And Making Omelettes","twitter:description":"Thanks to Sean Barrett for helping me compile his bb86 app. I let it rip on this code snippet from the Unnamed RE Project. It's interesting stuff. I omitted the push, pop, and ret instructions since basic blocks pertain to linear sequences of load, store, and arithmetic instructions: $ .\/bb86 &lt; ~\/basic-block.asm Reading stdin Warning:"},"aioseo_meta_data":{"post_id":"473","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"location":null,"local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2020-12-31 21:43:32","updated":"2025-12-31 18:13:41","seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/multimedia.cx\/eggs\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/multimedia.cx\/eggs\/category\/reverse-engineering\/\" title=\"Reverse Engineering\">Reverse Engineering<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tBarrett\u2019s Basic Blocks Are Back\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/multimedia.cx\/eggs"},{"label":"Reverse Engineering","link":"https:\/\/multimedia.cx\/eggs\/category\/reverse-engineering\/"},{"label":"Barrett&#8217;s Basic Blocks Are Back","link":"https:\/\/multimedia.cx\/eggs\/barretts-basic-blocks-are-back\/"}],"_links":{"self":[{"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/posts\/473","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/comments?post=473"}],"version-history":[{"count":0,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/posts\/473\/revisions"}],"wp:attachment":[{"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/media?parent=473"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/categories?post=473"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/tags?post=473"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}