1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
;============================================================================
;NODE function( PNODE pStNode, NODE StNode )
push ebp
mov ebp,esp
sub esp,40h
push ebx
push esi
push edi ;框架结构
mov eax,dword ptr [ebp+0Ch] ;pStNode
mov ecx,dword ptr [ebp+8] ;调用函数时留出的空间
mov edx,dword ptr [eax] ;pStNode->i
mov dword ptr [ecx],edx ;StTempNode.i
mov edx,dword ptr [eax+4] ;pStNode->j
mov dword ptr [ecx+4],edx ;StTempNode.j
mov eax,dword ptr [eax+8] ;pStNode->k
mov dword ptr [ecx+8],eax ;StTempNode.k
mov eax,dword ptr [ebp+8] ;return pStNode
pop edi ;释放框架
pop esi
pop ebx
mov esp,ebp
pop ebp
ret
;============================================================================
;StNode2 = function( &StNode, StNode );
sub esp,0Ch
mov eax,esp ;eax-->StNode
mov ecx,dword ptr [ebp-0Ch] ;i
mov dword ptr [eax],ecx ;StNode.i
mov edx,dword ptr [ebp-8] ;j
mov dword ptr [eax+4],edx ;StNode.j
mov ecx,dword ptr [ebp-4] ;k
mov dword ptr [eax+8],ecx ;StNode.k
lea edx,[ebp-0Ch] ;push *StNode
push edx
lea eax,[ebp-5Ch]
push eax ;用于返回
call @ILT+5(function) (0040100a)
add esp,14h ;平衡堆栈
mov ecx,dword ptr [eax] ;i
mov dword ptr [ebp-24h],ecx ;StTempNode.i
mov edx,dword ptr [eax+4] ;j
mov dword ptr [ebp-20h],edx ;StTempNode.j
mov eax,dword ptr [eax+8] ;k
mov dword ptr [ebp-1Ch],eax ;StTempNode.k
mov ecx,dword ptr [ebp-24h] ;StTempNode.i
mov dword ptr [ebp-18h],ecx ;StNode2.i
mov edx,dword ptr [ebp-20h] ;StTempNode.j
mov dword ptr [ebp-14h],edx ;StNode2.j
mov eax,dword ptr [ebp-1Ch] ;StTempNode.k
mov dword ptr [ebp-10h],eax ;StNode2.k
|