之前看过一个帖子说,函数顺序可以直接按照msdn查出来。但是我感觉有的是对的,有的完全不对啊。比如下面这段。
eax是IDirectSound的接口,这段函数从参数个数和值看得出来是CreateSoundBuffer函数,但是它call [ecx+0c],0c应该是第4个函数,在msdn(左侧的函数序列)里面查CreateSoundBuffer是第2个,是不是不能根据这个顺序查函数,而只能根据参数来判断。但是有些函数看起来又好像是对的。这个程序是directsound8。
代码:
.text:004050F4 loc_4050F4:
.text:004050F4 mov ecx, 9
.text:004050F9 xor eax, eax
.text:004050FB lea edi, [esp+64h+var_3C]
.text:004050FF lea esi, [ebp+0Ch]
.text:00405102 rep stosd
.text:00405104 mov eax, [ebx]
.text:00405106 push 0
.text:00405108 lea edx, [esp+68h+var_3C]
.text:0040510C mov [esp+68h+var_3C], 24h
.text:00405114 mov [esp+68h+var_38], 1
.text:0040511C mov ecx, [eax]
.text:0040511E push esi ; 之前分配的结构体偏移为0c的地址,存储buffer接口的指针
.text:0040511F push edx
.text:00405120 push eax
.text:00405121 call dword ptr [ecx+0Ch] ; CreateSoundBuffe