1、左移
2、加一定倍值
3、再左移,得到数组下标形成偏移
4、取首地址
5、首地址 + 数组下标形成偏移 + 结构体内部偏移得到欲存取的地址
routine
shl ...
add ...
shl ...
mov offset xxxxx
call atoi函数取得一个整数,将这个整数按照68字节一个结构体进行寻址以16 bit字类型写入对应结构体的第四个字节处
写入
.text:0802A6E9 call _atoi
.text:0802A6EE add esp, 4
.text:0802A6F1 mov [ebp+tmp], eax ;保存得到的整数(返回值)
.text:0802A6F7 mov eax, [ebp+index] ;[ebp+index]保存欲寻址第index个结构体
.text:0802A6FA mov [ebp+struct_offset], eax ;[ebp+index] = [ebp+tmp] = eax = index(第index个item)
.text:0802A700 mov ebx, [ebp+struct_offset]
.text:0802A706 mov ecx, ebx
.text:0802A708 shl ecx, 4 ;ecx = 16 * [ebp+index]
.text:0802A70B add ec