Could you explain to me the information provided after the @ symbol in Hex-Rays decompilation ? For examples @1 and @5 in the following output:

struct WSAData wsadata; // [sp+0h] [bp-1A0h]@1
int v6; // [sp+198h] [bp-8h]@5
int v7; // [sp+19Ch] [bp-4h]@5

Hexrays Decompilation: Variable Declarations

  • Like I said in the linked question, it seems to indicate the number of the basic block where this variable is first referenced. (To see basic blocks, switch to disassembly graph mode.) – DCoder Apr 22 '14 at 7:52

The numbers denote the basic block number in the microcode where the variable was first used. Microcode basic blocks do not necessarily match the basics block in the disassembly, because during optimization steps the microcode basic blocks may be split, merged, added, or removed.

You can see some samples of microcode in Ilfak's whitepaper on the decompiler or in some of the old blog posts: 1 2 (block number is the first number on the line).

  • Hi, thanks for your answer, I think the link to the whitepaper on the decompiler should be updated :) . – Minh-Triet Pham Tran Sep 24 '20 at 1:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.