Your [a+rbx*4]
and similar all assemble to absolute addressing with 32 bit displacement. You should load the address into a register first, then apply the indexing. For example:
lea rdx, [a]
mov [rdx + rcx*8], rax
Note that a qword
is 8 bytes, so you should scale by that, or, if you have 4 byte integers you need to change to 32 bit register.