int myfunction(int a[3][3],int b[3][3],int c[3][3])
{
for(int i=0;i<3;i++)
{
for(int j=0;j<3;j++)
{
c[i][j] = a[i][0]*b[0][j]+a[i][1]*b[1][j]+a[i][2]*b[2][j];
}
}
}
00401000 mov eax,dword ptr [esp+4] ;a
00401004 mov edx,dword ptr [esp+0Ch] ;c
00401008 mov ecx,dword ptr [esp+8] ;b
0040100C push ebx
0040100D push esi
0040100E add eax,4 ;不明白这里为什么要给A+4
00401011 push edi
00401012 add edx,8 ;不明白这里为什么要给C+8
00401015 mov esi,3
0040101A lea ebx,[ebx]
00401020 mov ebx,dword ptr [eax] ;EBX=a[i][0]
00401022 imul ebx,dword ptr [ecx+0Ch] ;EBX=a[i][0]*b[0][j]
00401026 mov edi,dword ptr [ecx+18h] ;edi=a[i][1]
00401029 imul edi,dword ptr [eax+4] ;edi=a[i][1]*b[1][j]
0040102D add edi,ebx ;edi=edi+ebx
0040102F mov ebx,dword ptr [eax-4] ;不明白这里为什么要减4
00401032 imul ebx,dword ptr [ecx]
00401035 add edi,ebx
00401037 mov dword ptr [edx-8],edi
0040103A mov ebx,dword ptr [eax]
0040103C imul ebx,dword ptr [ecx+10h]
00401040 mov edi,dword ptr [ecx+1Ch]
00401043 imul edi,dword ptr [eax+4]
00401047 add edi,ebx
00401049 mov ebx,dword ptr [eax-4]
0040104C imul ebx,dword ptr [ecx+4]
00401050 add edi,ebx
00401052 mov dword ptr [edx-4],edi
00401055 mov ebx,dword ptr [eax+4]
00401058 imul ebx,dword ptr [ecx+20h]
0040105C mov edi,dword ptr [ecx+14h]
0040105F imul edi,dword ptr [eax]
00401062 add edi,ebx
00401064 mov ebx,dword ptr [eax-4]
00401067 imul ebx,dword ptr [ecx+8]
0040106B add edi,ebx
0040106D mov dword ptr [edx],edi
0040106F add eax,0Ch
00401072 add edx,0Ch
00401075 dec esi
00401076 jne myfunction+20h (401020h)
00401078 pop edi
00401079 pop esi
0040107A xor eax,eax
0040107C pop ebx
}
也不知道这样逆向是不是正确的
上面不明白的地方,请高手指出下,想了好久了,不明白
[招生]科锐逆向工程师培训(2024年11月15日实地,远程教学同时开班, 第51期)