lets say we have these commands
mov eax, 0x1234 ; 1234h
mov ebx, 0
mov ecx, 0x1234 ; 1234h
MOV EBX,ECX ; ebx = 0x1234
ADD EBX,EBX ; *2
ADD EBX,EBX ; *4
ADD EBX,EAX ; ebx = 0x5B04
ADD EBX,12 ; ebx = 0x5B10
MOV EBX, [EBX] ; Error out of range
; Or
mov ebx, [eax+ecx*4+12] ; => mov ebx, [0x1234+0x1234*4+12]
=> its actually mov ebx, [0x5B10] where 0x5B10 is the address number in the memory, but in my case the maximal address is 0xFFC < 0x5B10, so its out of range so the appeared result is the result of the before last command
so by using smaller values like 0x14 we get the same result
mov eax, 0x14 ; eax = 0x14
mov ebx, 0 ; ebx = 0
mov ecx, 0x14 ; ecx = 0x14
MOV EBX,ECX ; ebx = 0x14
ADD EBX,EBX ; *2
ADD EBX,EBX ; *4
ADD EBX,EAX ; ebx = 0x64
ADD EBX,12 ; ebx = 0x70
MOV EBX, [EBX] ; => mov ebx, [0x70]
; Or
mov ebx, [eax+ecx*4+12] ; => mov ebx, [0x14+0x14*4+12] => mov ebx, [0x70]
we get in both cases or methode:
eax = 0x14
ebx = 0 => its 0 because the address 0x70 in the memory is empty = 0x0000
ecx = 0x14
BUT if we add before the last line something like
mov [0x70], 0x111
we will get in ebx 0x111