<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Aciiderixx</title>
    <description>The latest articles on DEV Community by Aciiderixx (@aciiderixx_d3f21e795ce4eb).</description>
    <link>https://dev.to/aciiderixx_d3f21e795ce4eb</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4049358%2F63a210ba-af4e-4188-9481-794ed5faead7.jpg</url>
      <title>DEV Community: Aciiderixx</title>
      <link>https://dev.to/aciiderixx_d3f21e795ce4eb</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/aciiderixx_d3f21e795ce4eb"/>
    <language>en</language>
    <item>
      <title>ARET translates legacy Windows x86 binaries to native Linux executables</title>
      <dc:creator>Aciiderixx</dc:creator>
      <pubDate>Tue, 28 Jul 2026 11:08:54 +0000</pubDate>
      <link>https://dev.to/aciiderixx_d3f21e795ce4eb/aret-translates-legacy-windows-x86-binaries-to-native-linux-executables-ej2</link>
      <guid>https://dev.to/aciiderixx_d3f21e795ce4eb/aret-translates-legacy-windows-x86-binaries-to-native-linux-executables-ej2</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqxum5xm26hse1mwc3uot.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqxum5xm26hse1mwc3uot.png" alt=" " width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I've been working on something that still sounds impossible to me when I describe it:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;You give it a Windows &lt;code&gt;.exe&lt;/code&gt;. It hands you back a native Linux ELF that runs directly on your CPU — no Wine, no QEMU, no virtualization at runtime.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It's called &lt;a href="https://github.com/aciderix/Automatic-reverse-engineering-toolkit" rel="noopener noreferrer"&gt;&lt;strong&gt;ARET — Automatic Reverse Engineering Toolkit&lt;/strong&gt;&lt;/a&gt;, and it's an open-source project written in Rust.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it does
&lt;/h2&gt;

&lt;p&gt;Most tools that "run a Windows program on Linux" either emulate the CPU (QEMU, Box86) or keep a compatibility runtime in the loop (Wine). ARET takes a radically different approach:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Translates the machine code to C&lt;/strong&gt; via a typed SSA IR.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Re-implements the OS calls&lt;/strong&gt; in a native shim layer.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Recompiles&lt;/strong&gt; the result into an ordinary native binary.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The output is a normal ELF — or a &lt;code&gt;.wasm&lt;/code&gt; module, derived from the exact same lift.&lt;/p&gt;

&lt;h2&gt;
  
  
  Architecture overview
&lt;/h2&gt;

&lt;p&gt;Here is how the pipeline flows from a compiled binary to a native executable:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;       Windows PE (.exe)
              │
              ▼
     x86 decoder + lifter
              │
              ▼
     Typed SSA machine IR
              │
    ┌─────────┴─────────┐
    ▼                   ▼
 C backend         WASM backend
    │                   │
    ▼                   ▼
 ELF binary        WebAssembly

              +
              │
 Native Win32/CRT HLE layer
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Clarifying the High-Level Emulation (HLE)
&lt;/h3&gt;

&lt;p&gt;When I say ARET uses an HLE layer, &lt;strong&gt;it does not emulate the Windows kernel or the CPU&lt;/strong&gt;. Instead, it provides native C implementations of the subset of Win32/CRT APIs required by the lifted programs (like &lt;code&gt;kernel32&lt;/code&gt;, &lt;code&gt;msvcrt&lt;/code&gt;, &lt;code&gt;user32&lt;/code&gt;). These shims are statically linked into the final executable.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Files&lt;/strong&gt;: Windows to POSIX path translation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Threads&lt;/strong&gt;: &lt;code&gt;CreateThread&lt;/code&gt; is implemented using cooperative fibers (&lt;code&gt;ucontext&lt;/code&gt;), ensuring deterministic round-robin scheduling.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GUI (WIP)&lt;/strong&gt;: Uses SDL2 and FreeType under the hood to render native controls.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The Shared-Stack Model
&lt;/h2&gt;

&lt;p&gt;This is probably the most crucial design decision in ARET.&lt;/p&gt;

&lt;p&gt;Most binary translators try to recover high-level function signatures before translation. &lt;strong&gt;ARET deliberately avoids making this assumption.&lt;/strong&gt; The lifted machine state remains explicit.&lt;/p&gt;

&lt;p&gt;Lifted functions receive the machine stack pointer (&lt;code&gt;esp&lt;/code&gt;) &lt;strong&gt;by value&lt;/strong&gt;. The machine stack is a single shared region, and &lt;code&gt;ebp&lt;/code&gt; is threaded as an extra callee-saved parameter. This allows arguments to safely cross function calls whether they were passed on the stack (cdecl/stdcall) or in registers (regparm/fastcall), without ever needing to reconstruct or guess the high-level C signatures.&lt;/p&gt;

&lt;p&gt;This design trades some traditional compiler assumptions for a closer representation of the original machine semantics. It also keeps the model thread-safe, making the cooperative-fiber threading model consistent with the lifted execution model.&lt;/p&gt;

&lt;h2&gt;
  
  
  Design principle: Correct or Loud Abort
&lt;/h2&gt;

&lt;p&gt;This is the rule I am most proud of.&lt;/p&gt;

&lt;p&gt;ARET never emits a result it cannot justify. Every mechanism is either verified against an independent reference (Unicorn for CPU instructions, Wine for OS APIs, Z3 for SMT rewrites), or it &lt;strong&gt;aborts with a named message&lt;/strong&gt; (&lt;code&gt;aret_unmodelled()&lt;/code&gt;) at the point where it would otherwise have to guess.&lt;/p&gt;

&lt;p&gt;If an x87 floating-point operation is too complex, or a specific API isn't mapped, the program halts loudly with a diagnostic. The goal is to avoid silent corruption by failing explicitly when behavior cannot be modeled. You always know exactly where the boundary is.&lt;/p&gt;

&lt;h2&gt;
  
  
  One IR, Multiple Uses
&lt;/h2&gt;

&lt;p&gt;ARET is not only a binary translator. Because it builds a clean, unified SSA IR, the same recovered representation powers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Transpilation&lt;/strong&gt; to C/LLVM/WASM&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Decompilation&lt;/strong&gt; to readable pseudo-C (&lt;code&gt;if&lt;/code&gt;/&lt;code&gt;while&lt;/code&gt;, with &lt;code&gt;goto&lt;/code&gt; fallback)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;CFG analysis&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Wall detection&lt;/strong&gt; (statically finding unmodelled instructions and missing imports before running)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Function and CFG recovery works on stripped binaries using prologue scanning, address-taken analysis, jump/pointer tables, and FLIRT signatures — scaling to large binaries (a 27 MB game → ~43k functions recovered).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Transpile to ELF&lt;/span&gt;
aret program.exe &lt;span class="nt"&gt;--mode&lt;/span&gt; transpile &lt;span class="nt"&gt;--out-dir&lt;/span&gt; out/ &lt;span class="nt"&gt;--run&lt;/span&gt;

&lt;span class="c"&gt;# Retarget to WebAssembly&lt;/span&gt;
aret program.exe &lt;span class="nt"&gt;--mode&lt;/span&gt; transpile &lt;span class="nt"&gt;--target&lt;/span&gt; wasm &lt;span class="nt"&gt;--out-dir&lt;/span&gt; out/ &lt;span class="nt"&gt;--run&lt;/span&gt;

&lt;span class="c"&gt;# Decompile to pseudo-C&lt;/span&gt;
aret program.exe                 &lt;span class="c"&gt;# structured&lt;/span&gt;
aret program.exe &lt;span class="nt"&gt;--flat&lt;/span&gt;          &lt;span class="c"&gt;# goto form&lt;/span&gt;

&lt;span class="c"&gt;# Static analysis (wall detection)&lt;/span&gt;
aret program.exe &lt;span class="nt"&gt;--mode&lt;/span&gt; walls
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Show, don't tell
&lt;/h2&gt;

&lt;p&gt;To continuously validate correctness, ARET relies on differential testing. The repository contains a 21-binary regression gauntlet. Each fixture is checked against Wine, used as an independent behavioral reference.&lt;/p&gt;

&lt;p&gt;Here are some real, third-party compiled binaries transpiled to native Linux ELFs and verified:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Binary&lt;/th&gt;
&lt;th&gt;Toolchain&lt;/th&gt;
&lt;th&gt;Verified Features&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Lua 5.4.7&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;MinGW&lt;/td&gt;
&lt;td&gt;Interpreter, coroutines, closures, metatables, GC stress tests.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;sqlite3.exe&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;MSVC&lt;/td&gt;
&lt;td&gt;Full SQL engine (CRUD, JOIN, CTE, window functions, JSON, triggers).&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;NASM 2.16.01&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;MSVC&lt;/td&gt;
&lt;td&gt;The generated output files (&lt;code&gt;-f elf&lt;/code&gt;/&lt;code&gt;win32&lt;/code&gt;/&lt;code&gt;bin&lt;/code&gt;/&lt;code&gt;obj&lt;/code&gt;) match the Wine execution output byte-for-byte.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;busybox-w32&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;MinGW&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;grep&lt;/code&gt;, &lt;code&gt;sed&lt;/code&gt;, &lt;code&gt;awk&lt;/code&gt;, &lt;code&gt;sort&lt;/code&gt;, &lt;code&gt;cksum&lt;/code&gt;, etc.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;strings.exe&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;MSVC (Static C++)&lt;/td&gt;
&lt;td&gt;Sysinternals tool. Output text matches Wine byte-for-byte.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Try it, Break it, Contribute
&lt;/h2&gt;

&lt;p&gt;If you work on binary analysis, compilers, reverse engineering, or if you just think systems programming is fun, I'd love to hear from you.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/aciderix/Automatic-reverse-engineering-toolkit.git
&lt;span class="nb"&gt;cd &lt;/span&gt;Automatic-reverse-engineering-toolkit
cargo build &lt;span class="nt"&gt;--release&lt;/span&gt;
./target/release/aret program.exe &lt;span class="nt"&gt;--mode&lt;/span&gt; transpile &lt;span class="nt"&gt;--run&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;🔗 &lt;strong&gt;Repository:&lt;/strong&gt; &lt;a href="https://github.com/aciderix/Automatic-reverse-engineering-toolkit" rel="noopener noreferrer"&gt;aciderix/Automatic-reverse-engineering-toolkit&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Issues, PRs, and brutal feedback are all welcome.&lt;/p&gt;

&lt;h2&gt;
  
  
  Current Limitations
&lt;/h2&gt;

&lt;p&gt;ARET is not a universal Windows replacement yet. Paradoxically, admitting this is the best way to explain what it actually does. Current gaps include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;x86 32-bit only&lt;/strong&gt;: 64-bit support is on the roadmap but not implemented yet.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Incomplete GUI stack&lt;/strong&gt;: GDI, dialogs, and controls are heavily being worked on (native controls actually paint on screen via SDL2), but complex UI applications will likely hit missing API stubs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No DirectX support&lt;/strong&gt;: Games are currently out of reach (the plan is to eventually route D3D to DXVK/Vulkan).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No kernel drivers&lt;/strong&gt;: Ring 0 emulation is completely out of scope.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Undocumented internals&lt;/strong&gt;: Programs relying heavily on undocumented Windows internals or aggressive obfuscation/packers will hit the "loud abort" wall.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;Note: This is a solo open-source project. I used AI assistants as development tools, but all architecture, implementation choices, and verification strategy are part of the project itself. If you find it interesting, a ⭐ on the repo means a lot.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>architecture</category>
      <category>showdev</category>
      <category>computerscience</category>
    </item>
    <item>
      <title>ARET translates legacy Windows x86 binaries to native Linux executables</title>
      <dc:creator>Aciiderixx</dc:creator>
      <pubDate>Mon, 27 Jul 2026 11:51:53 +0000</pubDate>
      <link>https://dev.to/aciiderixx_d3f21e795ce4eb/aret-translates-legacy-windows-x86-binaries-to-native-linux-executables-3465</link>
      <guid>https://dev.to/aciiderixx_d3f21e795ce4eb/aret-translates-legacy-windows-x86-binaries-to-native-linux-executables-3465</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqxum5xm26hse1mwc3uot.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqxum5xm26hse1mwc3uot.png" alt=" " width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I've been working on something that still sounds impossible to me when I describe it:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;You give it a Windows &lt;code&gt;.exe&lt;/code&gt;. It hands you back a native Linux ELF that runs directly on your CPU — no Wine, no QEMU, no virtualization at runtime.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It's called &lt;a href="https://github.com/aciderix/Automatic-reverse-engineering-toolkit" rel="noopener noreferrer"&gt;&lt;strong&gt;ARET — Automatic Reverse Engineering Toolkit&lt;/strong&gt;&lt;/a&gt;, and it's an open-source project written in Rust.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it does
&lt;/h2&gt;

&lt;p&gt;Most tools that "run a Windows program on Linux" either emulate the CPU (QEMU, Box86) or keep a compatibility runtime in the loop (Wine). ARET takes a radically different approach:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Translates the machine code to C&lt;/strong&gt; via a typed SSA IR.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Re-implements the OS calls&lt;/strong&gt; in a native shim layer.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Recompiles&lt;/strong&gt; the result into an ordinary native binary.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The output is a normal ELF — or a &lt;code&gt;.wasm&lt;/code&gt; module, derived from the exact same lift.&lt;/p&gt;

&lt;h2&gt;
  
  
  Architecture overview
&lt;/h2&gt;

&lt;p&gt;Here is how the pipeline flows from a compiled binary to a native executable:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;       Windows PE (.exe)
              │
              ▼
     x86 decoder + lifter
              │
              ▼
     Typed SSA machine IR
              │
    ┌─────────┴─────────┐
    ▼                   ▼
 C backend         WASM backend
    │                   │
    ▼                   ▼
 ELF binary        WebAssembly

              +
              │
 Native Win32/CRT HLE layer
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Clarifying the High-Level Emulation (HLE)
&lt;/h3&gt;

&lt;p&gt;When I say ARET uses an HLE layer, &lt;strong&gt;it does not emulate the Windows kernel or the CPU&lt;/strong&gt;. Instead, it provides native C implementations of the subset of Win32/CRT APIs required by the lifted programs (like &lt;code&gt;kernel32&lt;/code&gt;, &lt;code&gt;msvcrt&lt;/code&gt;, &lt;code&gt;user32&lt;/code&gt;). These shims are statically linked into the final executable.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Files&lt;/strong&gt;: Windows to POSIX path translation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Threads&lt;/strong&gt;: &lt;code&gt;CreateThread&lt;/code&gt; is implemented using cooperative fibers (&lt;code&gt;ucontext&lt;/code&gt;), ensuring deterministic round-robin scheduling.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GUI (WIP)&lt;/strong&gt;: Uses SDL2 and FreeType under the hood to render native controls.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The Shared-Stack Model
&lt;/h2&gt;

&lt;p&gt;This is probably the most crucial design decision in ARET.&lt;/p&gt;

&lt;p&gt;Most binary translators try to recover high-level function signatures before translation. &lt;strong&gt;ARET deliberately avoids making this assumption.&lt;/strong&gt; The lifted machine state remains explicit.&lt;/p&gt;

&lt;p&gt;Lifted functions receive the machine stack pointer (&lt;code&gt;esp&lt;/code&gt;) &lt;strong&gt;by value&lt;/strong&gt;. The machine stack is a single shared region, and &lt;code&gt;ebp&lt;/code&gt; is threaded as an extra callee-saved parameter. This allows arguments to safely cross function calls whether they were passed on the stack (cdecl/stdcall) or in registers (regparm/fastcall), without ever needing to reconstruct or guess the high-level C signatures.&lt;/p&gt;

&lt;p&gt;This design trades some traditional compiler assumptions for a closer representation of the original machine semantics. It also keeps the model thread-safe, making the cooperative-fiber threading model consistent with the lifted execution model.&lt;/p&gt;

&lt;h2&gt;
  
  
  Design principle: Correct or Loud Abort
&lt;/h2&gt;

&lt;p&gt;This is the rule I am most proud of.&lt;/p&gt;

&lt;p&gt;ARET never emits a result it cannot justify. Every mechanism is either verified against an independent reference (Unicorn for CPU instructions, Wine for OS APIs, Z3 for SMT rewrites), or it &lt;strong&gt;aborts with a named message&lt;/strong&gt; (&lt;code&gt;aret_unmodelled()&lt;/code&gt;) at the point where it would otherwise have to guess.&lt;/p&gt;

&lt;p&gt;If an x87 floating-point operation is too complex, or a specific API isn't mapped, the program halts loudly with a diagnostic. The goal is to avoid silent corruption by failing explicitly when behavior cannot be modeled. You always know exactly where the boundary is.&lt;/p&gt;

&lt;h2&gt;
  
  
  One IR, Multiple Uses
&lt;/h2&gt;

&lt;p&gt;ARET is not only a binary translator. Because it builds a clean, unified SSA IR, the same recovered representation powers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Transpilation&lt;/strong&gt; to C/LLVM/WASM&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Decompilation&lt;/strong&gt; to readable pseudo-C (&lt;code&gt;if&lt;/code&gt;/&lt;code&gt;while&lt;/code&gt;, with &lt;code&gt;goto&lt;/code&gt; fallback)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;CFG analysis&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Wall detection&lt;/strong&gt; (statically finding unmodelled instructions and missing imports before running)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Function and CFG recovery works on stripped binaries using prologue scanning, address-taken analysis, jump/pointer tables, and FLIRT signatures — scaling to large binaries (a 27 MB game → ~43k functions recovered).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Transpile to ELF&lt;/span&gt;
aret program.exe &lt;span class="nt"&gt;--mode&lt;/span&gt; transpile &lt;span class="nt"&gt;--out-dir&lt;/span&gt; out/ &lt;span class="nt"&gt;--run&lt;/span&gt;

&lt;span class="c"&gt;# Retarget to WebAssembly&lt;/span&gt;
aret program.exe &lt;span class="nt"&gt;--mode&lt;/span&gt; transpile &lt;span class="nt"&gt;--target&lt;/span&gt; wasm &lt;span class="nt"&gt;--out-dir&lt;/span&gt; out/ &lt;span class="nt"&gt;--run&lt;/span&gt;

&lt;span class="c"&gt;# Decompile to pseudo-C&lt;/span&gt;
aret program.exe                 &lt;span class="c"&gt;# structured&lt;/span&gt;
aret program.exe &lt;span class="nt"&gt;--flat&lt;/span&gt;          &lt;span class="c"&gt;# goto form&lt;/span&gt;

&lt;span class="c"&gt;# Static analysis (wall detection)&lt;/span&gt;
aret program.exe &lt;span class="nt"&gt;--mode&lt;/span&gt; walls
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Show, don't tell
&lt;/h2&gt;

&lt;p&gt;To continuously validate correctness, ARET relies on differential testing. The repository contains a 21-binary regression gauntlet. Each fixture is checked against Wine, used as an independent behavioral reference.&lt;/p&gt;

&lt;p&gt;Here are some real, third-party compiled binaries transpiled to native Linux ELFs and verified:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Binary&lt;/th&gt;
&lt;th&gt;Toolchain&lt;/th&gt;
&lt;th&gt;Verified Features&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Lua 5.4.7&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;MinGW&lt;/td&gt;
&lt;td&gt;Interpreter, coroutines, closures, metatables, GC stress tests.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;sqlite3.exe&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;MSVC&lt;/td&gt;
&lt;td&gt;Full SQL engine (CRUD, JOIN, CTE, window functions, JSON, triggers).&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;NASM 2.16.01&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;MSVC&lt;/td&gt;
&lt;td&gt;The generated output files (&lt;code&gt;-f elf&lt;/code&gt;/&lt;code&gt;win32&lt;/code&gt;/&lt;code&gt;bin&lt;/code&gt;/&lt;code&gt;obj&lt;/code&gt;) match the Wine execution output byte-for-byte.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;busybox-w32&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;MinGW&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;grep&lt;/code&gt;, &lt;code&gt;sed&lt;/code&gt;, &lt;code&gt;awk&lt;/code&gt;, &lt;code&gt;sort&lt;/code&gt;, &lt;code&gt;cksum&lt;/code&gt;, etc.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;strings.exe&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;MSVC (Static C++)&lt;/td&gt;
&lt;td&gt;Sysinternals tool. Output text matches Wine byte-for-byte.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Try it, Break it, Contribute
&lt;/h2&gt;

&lt;p&gt;If you work on binary analysis, compilers, reverse engineering, or if you just think systems programming is fun, I'd love to hear from you.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/aciderix/Automatic-reverse-engineering-toolkit.git
&lt;span class="nb"&gt;cd &lt;/span&gt;Automatic-reverse-engineering-toolkit
cargo build &lt;span class="nt"&gt;--release&lt;/span&gt;
./target/release/aret program.exe &lt;span class="nt"&gt;--mode&lt;/span&gt; transpile &lt;span class="nt"&gt;--run&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;🔗 &lt;strong&gt;Repository:&lt;/strong&gt; &lt;a href="https://github.com/aciderix/Automatic-reverse-engineering-toolkit" rel="noopener noreferrer"&gt;aciderix/Automatic-reverse-engineering-toolkit&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Issues, PRs, and brutal feedback are all welcome.&lt;/p&gt;

&lt;h2&gt;
  
  
  Current Limitations
&lt;/h2&gt;

&lt;p&gt;ARET is not a universal Windows replacement yet. Paradoxically, admitting this is the best way to explain what it actually does. Current gaps include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;x86 32-bit only&lt;/strong&gt;: 64-bit support is on the roadmap but not implemented yet.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Incomplete GUI stack&lt;/strong&gt;: GDI, dialogs, and controls are heavily being worked on (native controls actually paint on screen via SDL2), but complex UI applications will likely hit missing API stubs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No DirectX support&lt;/strong&gt;: Games are currently out of reach (the plan is to eventually route D3D to DXVK/Vulkan).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No kernel drivers&lt;/strong&gt;: Ring 0 emulation is completely out of scope.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Undocumented internals&lt;/strong&gt;: Programs relying heavily on undocumented Windows internals or aggressive obfuscation/packers will hit the "loud abort" wall.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;Note: This is a solo open-source project. I used AI assistants as development tools, but all architecture, implementation choices, and verification strategy are part of the project itself. If you find it interesting, a ⭐ on the repo means a lot.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>architecture</category>
      <category>showdev</category>
      <category>computerscience</category>
    </item>
  </channel>
</rss>
