2

I used IDA Starter to dissassemble a Windows program, and there is something I don't understand in the resulting assembler code:

mov eax, dword_4033CC[eax*4]

My question is, what the purpose of the squared brackets is.

I found this other question, that is also about squared brackets, but I believe that this is a different context.

cleminator
  • 21
  • 3
  • 5
    It means the same. It's a slightly confusing syntax variation, you usually see that as `[dword_4033CC+eax*4]`. – Jester Mar 08 '18 at 14:56
  • Ah, that makes much more sense, thank you. Is there a usecase where this confusing syntax should be preferred? – cleminator Mar 08 '18 at 15:09
  • If you want your assembly access to static arrays to look like C, e.g. `arrayname[ecx*4]`, and you're using an assembler that supports that syntax, then use this syntax. Otherwise don't. – Peter Cordes Mar 08 '18 at 15:13

0 Answers0