Skip to content
AL-MIZAN.WORLD

AI-assisted reverse engineering: the equations, posed and then solved

From the video to the computation: section entropy, call coverage, an MCP agent's budget, reconstruction fidelity, the physics of the replayed game — and the explicit limits of the exercise.

13 equations 13/13 checks 0 real binary analysed Source: 11 public chapters 13 quality checks
Honest scope. The video supplies a path (11 public chapters) and a theme, not quotations: its transcript is inaccessible. The binary analysed here is a declared synthetic sample, not Moon-Buggy. No reverse engineering tool is run and no legal advice is given.

Source

Video: “REA : recréer un logiciel avec l'IA et la rétro-ingénierie”, IT-Connect - Florian, 10 min 01 s. Chapters: 0:00 REA and GitHub · 0:20 reverse engineering · 1:21 an MCP server · 2:43 the community · 4:28 the legal frame · 5:52 installation · 7:16 the Moon-Buggy demo · 8:25 comparison with the source · 9:00 with or without REA · 9:44 conclusion.

The thirteen equations

Each row gives the formula, the computed result, the explanation path (module function → check) and the status.

Thirteen equations on analysis, fidelity and the legal frame.
IDFormulaResultExplanation pathStatus
EQ-01H = −Σ_i p_i log₂ p_i (bits/octet) ; section suspecte si H ≥ 7,2H(.texte) = 4.584963 · H(.surcouche) = 8.000000 · 1 section suspecteretro_ingenierie_ia.py → analyse_sections() → C01OPERATIONAL
EQ-02Chaînes = suites de [0x20–0x7E] de longueur ≥ 4 dans .rodata7/7 chaînes · 78 octets · 7.617 % de .rodataretro_ingenierie_ia.py → extraction_chaines() → C02OPERATIONAL
EQ-03cov = |{f : main →* f}| / |F| (fermeture transitive du graphe d'appels)9/12 atteintes · cov = 0.7500 · 3 inatteignablesretro_ingenierie_ia.py → couverture_symboles() → C03OPERATIONAL
EQ-04W = ⌈L / (C − R)⌉ ; part = L / (C − R)L = 252 jetons · W = 1 · part = 0.140 %retro_ingenierie_ia.py → budget_contexte() → C04OPERATIONAL
EQ-05k = ⌈N/n⌉ ; coût = k·J_req + Σ_f J_fk = 3 appels · coût = 1752 jetons = 3×500 + 252retro_ingenierie_ia.py → budget_appels() → C05OPERATIONAL
EQ-06P_k = 1 − (1−p)^k ; E[tentatives] = 1/p ; k* = ⌈ln(1−c)/ln(1−p)⌉p = 0.62 : P₅ = 0.9921 · k* = 4 · p = 0.18 : k* = 16retro_ingenierie_ia.py → tentatives() → C06SIMULATED
EQ-07sim = 1 − d_L / max(|a|,|b|) ; d_L par programmation dynamiqued = 5 sur 34 jetons · sim = 0.8529retro_ingenierie_ia.py → fidelite() → C07OPERATIONAL
EQ-08eq = 1 − |{x : f(x) ≠ ĝ(x)}| / |X| ; écart ⇔ y + v·dt − ½g·dt² < 013/250 écarts · eq = 0.9480retro_ingenierie_ia.py → equivalence_comportementale() → C08OPERATIONAL
EQ-09h = v₀²/(2g) ; t* = v₀/g ; y_n = v₀t − ½gt² − ½g·dt·th = 3.2620 m · discret = 3.1954 m · erreur = 0.0666 mretro_ingenierie_ia.py → balistique() → C09SIMULATED
EQ-10Recouvrement ⇔ dx < (w₁+w₂)/2 ∧ dy < (h₁+h₂)/2 ; tunneling ⇔ v·dt > w30/121 paires · tunneling dès 72.5 m/sretro_ingenierie_ia.py → collision() → C10OPERATIONAL
EQ-11v(t) = v₀ + a·t ; D = v₀T + ½aT² ; points = ⌊D/10⌋D = 1 380.00 m (discret 1 380.25) · 138 pointsretro_ingenierie_ia.py → score_partie() → C11SIMULATED
EQ-12Décompilation : 5 conditions cumulatives (CPI L.122-6-1 ; dir. 2009/24/CE art. 6)5 conditions, chacune avec sa limite expliciteretro_ingenierie_ia.py → cadre_legal() → C12SPECIFIED
EQ-13P1 ↔ empreinte · P2 ↔ test différentiel · P3 ↔ extraction bornée · P4 ↔ contrôle4 ponts déclarés comme analogies structurelles, sans identité juridiqueretro_ingenierie_ia.py → pont_piliers() → C13SPECIFIED

Explanation cards

Each card states the equation, gives the result and explains what it says — and what it does not say.

EQ-01OPERATIONAL

Entropy reveals a packed section

H = −Σ p log₂ p measures the average surprise per byte: 0 for a constant section, 8 for a section uniform over 256 values.

H = −Σ_i p_i log₂ p_i (bits/octet) ; section suspecte si H ≥ 7,2

Result : H(.texte) = 4.584963 · H(.surcouche) = 8.000000 · 1 section suspecte

The 7.2 bit/byte threshold is a field convention, not a theorem: a legitimate section can be dense. The check cross-validates every entropy against log₂(symbols).

retro_ingenierie_ia.py → analyse_sections() → C01

EQ-02OPERATIONAL

What the binary says without running

Printable runs of four bytes or more, NUL-terminated, yield messages, formats and options without executing a single instruction.

Chaînes = suites de [0x20–0x7E] de longueur ≥ 4 dans .rodata

Result : 7/7 chaînes · 78 octets · 7.617 % de .rodata

The sample contains exactly seven planted strings: the check compares the extracted list with that ground truth, not with itself.

retro_ingenierie_ia.py → extraction_chaines() → C02

EQ-03OPERATIONAL

Not all code is reachable

Call coverage is the ratio of functions reached from main to functions in the corpus: 9 out of 12 here.

cov = |{f : main →* f}| / |F| (fermeture transitive du graphe d'appels)

Result : 9/12 atteintes · cov = 0.7500 · 3 inatteignables

Three functions stay unreachable (help, sound, save). The check uses two distinct algorithms — breadth-first search and Floyd–Warshall — and gets the same count.

retro_ingenierie_ia.py → couverture_symboles() → C03

EQ-04OPERATIONAL

Context is a budget

W = ⌈L/(C−R)⌉ windows to hold the L tokens of decompiled code, with C = 200,000 and R = 20,000 reserved.

W = ⌈L / (C − R)⌉ ; part = L / (C − R)

Result : L = 252 jetons · W = 1 · part = 0.140 %

The demonstration corpus fits in a single window at 0.14 %. The figure is SIMULATED for a real decompiler, whose function bodies are far longer.

retro_ingenierie_ia.py → budget_contexte() → C04

EQ-05OPERATIONAL

Three round trips are enough here

k = ⌈N/n⌉ MCP calls, each costing its tool schema plus the tokens of the returned functions.

k = ⌈N/n⌉ ; coût = k·J_req + Σ_f J_f

Result : k = 3 appels · coût = 1752 jetons = 3×500 + 252

Twelve functions in batches of five give three calls and 1,752 tokens. The check replays the per-call sum and compares it with k·J_req + L.

retro_ingenierie_ia.py → budget_appels() → C05

EQ-06SIMULATED

With or without REA: how many attempts?

P_k = 1 − (1−p)^k; the expectation is 1/p and the threshold k* = ⌈ln(1−c)/ln(1−p)⌉ for a target c.

P_k = 1 − (1−p)^k ; E[tentatives] = 1/p ; k* = ⌈ln(1−c)/ln(1−p)⌉

Result : p = 0.62 : P₅ = 0.9921 · k* = 4 · p = 0.18 : k* = 16

With p = 0.62, four attempts reach 95 %; with p = 0.18, sixteen are needed. p is a declared parameter, not a measurement — hence SIMULATED.

retro_ingenierie_ia.py → tentatives() → C06

EQ-07OPERATIONAL

Measuring the gap to the original

Levenshtein distance counts insertions, deletions and substitutions; similarity normalises by the longer of the two sequences.

sim = 1 − d_L / max(|a|,|b|) ; d_L par programmation dynamique

Result : d = 5 sur 34 jetons · sim = 0.8529

The demonstration pair differs by five declared edits, i.e. 0.8529 similarity. The reference values kitten/sitting = 3 and saturday/sunday = 3 check the algorithm itself.

retro_ingenierie_ia.py → fidelite() → C07

EQ-08OPERATIONAL

Differential testing finds the bug

Reference state and reconstructed state are compared over 250 inputs; the reconstruction clamps position at ground level.

eq = 1 − |{x : f(x) ≠ ĝ(x)}| / |X| ; écart ⇔ y + v·dt − ½g·dt² < 0

Result : 13/250 écarts · eq = 0.9480

Thirteen mismatches appear, exactly the cases where the reference would go below zero — and the analytic threshold predicts thirteen. This is how a reconstruction defect is proven rather than guessed.

retro_ingenierie_ia.py → equivalence_comportementale() → C08

EQ-09SIMULATED

The jump: continuous versus integrated

Height is v₀²/(2g); fixed-step semi-implicit integration shifts the parabola by ½g·dt·t.

h = v₀²/(2g) ; t* = v₀/g ; y_n = v₀t − ½gt² − ½g·dt·t

Result : h = 3.2620 m · discret = 3.1954 m · erreur = 0.0666 m

The discrete apex is 2.04 % lower than the continuous one. The check cross-validates the simulation against the shifted parabola on the same grid, to within 10⁻¹².

retro_ingenierie_ia.py → balistique() → C09

EQ-10OPERATIONAL

Collision and step skipping

Two boxes overlap if dx < (w₁+w₂)/2 and dy < (h₁+h₂)/2; beyond v·dt > w the obstacle is crossed unseen.

Recouvrement ⇔ dx < (w₁+w₂)/2 ∧ dy < (h₁+h₂)/2 ; tunneling ⇔ v·dt > w

Result : 30/121 paires · tunneling dès 72.5 m/s

Thirty overlaps out of 121 positions; the tunnelling threshold is 72 m/s. The check cross-validates the enumeration with the 6 × 5 product of sub-threshold positions.

retro_ingenierie_ia.py → collision() → C10

EQ-11SIMULATED

Distance and score

v(t) = v₀ + a·t gives D = v₀T + ½aT²; points are ⌊D/10⌋.

v(t) = v₀ + a·t ; D = v₀T + ½aT² ; points = ⌊D/10⌋

Result : D = 1 380.00 m (discret 1 380.25) · 138 points

The discrete sum exceeds the closed form by 0.25 m, i.e. ½a·dt·T, without changing the score: 138 points in both cases.

retro_ingenierie_ia.py → score_partie() → C11

EQ-12SPECIFIED

What the law allows, and on what conditions

Decompilation requires five cumulative conditions: lawful user, interoperability necessity, strictly necessary parts, limited purpose, normal exploitation preserved.

Décompilation : 5 conditions cumulatives (CPI L.122-6-1 ; dir. 2009/24/CE art. 6)

Result : 5 conditions, chacune avec sa limite explicite

Recreating a whole program or competing with its publisher falls outside the exception. This table is a reading summary: it does not replace legal advice.

retro_ingenierie_ia.py → cadre_legal() → C12

EQ-13SPECIFIED

The four pillars as a reading grid

Each pillar receives a counterpart: binary fingerprint, differential test, bounded extraction, numerical check.

P1 ↔ empreinte · P2 ↔ test différentiel · P3 ↔ extraction bornée · P4 ↔ contrôle

Result : 4 ponts déclarés comme analogies structurelles, sans identité juridique

These four bridges are declared SPECIFIED: they organise the reading; they establish no equivalence between security, law and engineering.

retro_ingenierie_ia.py → pont_piliers() → C13

Computed figure

Section entropy and continuous versus semi-implicit Euler jumpTwo panels. Left: entropy of the four sections (4.000, 4.585, 0.748, 8.000 bits/byte) and the 7.2 threshold. Right: the jump parabola (height 3.262 m, apex at 0.815 s) and the semi-implicit Euler points.Entropie par section — bits/octetseuil 7.24.000000.entete4.584963.texte0.747926.donnees8.000000.surcoucheSaut — continu vs Euler semi-implicitet* = 0.8155 sh = 3.2620 m
Left: entropy of the four sample sections, with the conventional 7.2 bit/byte threshold; only the overlay is flagged. Right: the jump, continuous parabola (line) and semi-implicit Euler points (orange), computed by EQ-09.

Results

Results recomputed at each generation.
Equations13
Checks13/13
H(.overlay)8.000000 bits/octet
Call coverage9/12 (0.750)
Context window252 jetons · W = 1 · 0.140 %
MCP calls3 · 1752 jetons
Attempts (REA / without)4 / 16
Text fidelityd = 5 · sim = 0.8529
Equivalence13/250 · 0.9480
Jump apex3.2620 m → 3.1954 m
Overlaps30/121 · 72.0 m/s
Score138 points · 1 380 m

Values are recomputed at each generation. Checks fail if a constant or a formula drifts.

Source: IT-Connect - Florian (YouTube), 11 public chapters; transcript inaccessible.

Bridges to the four pillars

A structural reading declared SPECIFIED: each pillar receives a counterpart, with its explicit limit.

Four bridges declared SPECIFIED with the four pillars.
PillarProject questionCounterpartLimit
P1 — Identity and mandateWho acts, in what capacity, for how long?The SHA-256 fingerprint of the analysed binary: it names the exact object the agent works on.A fingerprint identifies an artefact, not a right to act on it.
P2 — Integrity and provenanceIs what runs what was signed?The differential test (EQ-08) compares the reconstructed state with the reference state: the gap is measured, not assumed.A differential test covers the declared domain, never every state.
P3 — Confidentiality and controlWho can read, restore, erase?Extraction is bounded to the data section (EQ-02): the corpus stays a declared sample.Bounding extraction is not a guarantee against disclosure.
P4 — Resilience and proofWhat remains when the attack succeeds?Every equation carries an independent check: the result is reproducible, not merely asserted.A numerical check validates a computation, not a legality.

Quality and accessibility

Thirteen automatable WCAG 2.2 (level AA) criteria evaluated on this page at each generation: explicit formulas, independent checks, recomputed results. An automated audit replaces neither a human test nor a screen reader.

Thirteen quality and accessibility checks computed on the produced document.
IDCriterionFormulaResultWCAG ref.
QA-01Relative luminanceL = 0,2126·f(R) + 0,7152·f(G) + 0,0722·f(B)L(#ffffff) = 1.000000 · L(#000000) = 0.000000 · CR(#767676) = 4.54221.4.3
QA-02Text contrastCR = (L₁+0,05)/(L₂+0,05) ≥ 4,519/19 paires ≥ 4,5 · min 5.02:1 (figure_seuil)1.4.3
QA-03Large textseuil = 3 si f ≥ 24 px ou (gras et f ≥ 18,66 px), sinon 4,517 × 4,5:1 · 2 × 3:1 · 0 écart1.4.3 / 1.4.6
QA-04Touch targetsh = f·interligne + 2·padding + 2·bordure ; min(w,h) ≥ 24 pxtargets=11 · min=30.25 px2.5.8
QA-05Focus indicatorépaisseur ≥ 2 px ∧ offset ≥ 1 px ∧ CR(contour, fond) ≥ 3outline=3 px · offset=2 px · 6.66:1 / 14.40:12.4.11 / 2.4.13
QA-06Heading hierarchyn(h1) = 1 ∧ Δniveau ≤ 1 ∧ profondeur ≤ 3h1=1 · h2=9 · h3=13 · Δmax=1 · prof=31.3.1 / 2.4.6
QA-07Landmarks and skip linkheader + nav[aria-label] + main + footer ; 1er lien → #contenurepères=4 · saut=#contenu1.3.1 / 2.4.1
QA-08Table semanticscaption = 1/table ∧ th[scope] sur 100 % des en-têtestables=4 · captions=4 · th=26 · scope=261.3.1
QA-09Accessible namesnom(a) = texte ∨ aria-label ; SVG → title + desc + labelledbyliens=24/24 · svg title=1 desc=11.1.1 / 4.1.2
QA-10Language and alternateshtml[lang] ∧ 4 alternates (3 + x-default) ∧ 1 aria-currentlang=fr · dir=ltr · alternates=4 · aria-current=13.1.1 / 3.1.2
QA-11Reading measurelargeur_max en em ; CPL ≈ largeur/(0,5·f) et 45 ≤ CPL ≤ 75CPL ≈ 60 · 510 px · f=17 px · interligne=1.621.4.8
QA-12Horizontal overflownowrap ⊂ overflow-x:auto ∧ nav flex-wrap:wrapnowrap_hors_conteneur=0 · zones défilantes=3 · tableaux_enveloppés=41.4.10
QA-13Colour not sole carrierlibellé textuel par statut ∧ animations = 0statuts=26 · animations=01.4.1 / 2.3.3

The thirteen checks are automated and run on the HTML and CSS actually produced; they do not cover all of WCAG 2.2.

How to use it

py -3 oeuvre_universelle/retro_ingenierie_ia.py
py -3 -m unittest tests.test_retro_ingenierie_ia -v
py -3 oeuvre_universelle/generer_page_retro_ingenierie_ia.py

Commands run from ASTRO-Q°ODE_SYSTEME/. The public JSON is served at the address below.

Limits

JSON results The Universal Work

English version. The French and Arabic versions carry the same equations and the same figures.