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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
|
.486
.model flat
extrn __fltused:near
extrn __ftol:near
public _main
_TEXT segment
_main:
push ebx
push esi
push edi
push ebp
mov ebp,esp
sub esp,60
mov dword ptr (-8)[ebp],0
L2:
mov dword ptr (-4)[ebp],0
L6:
mov edi,dword ptr (-4)[ebp]
mov esi,dword ptr (-8)[ebp]
mov ebx,esi
sal ebx,4
imul esi,esi,1000
lea esi,[edi][esi]
mov dword ptr (_x)[ebx][edi*4],esi
L7:
inc dword ptr (-4)[ebp]
cmp dword ptr (-4)[ebp],4
jl L6
mov edi,dword ptr (-8)[ebp]
mov esi,edi
sal esi,4
lea esi,(_x)[esi]
mov dword ptr (_y)[edi*4],esi
L3:
inc dword ptr (-8)[ebp]
cmp dword ptr (-8)[ebp],3
jl L2
call _f
add esp,0
mov dword ptr (-8)[ebp],0
L10:
mov edi,dword ptr (-8)[ebp]
mov esi,edi
sal esi,4
lea esi,(-60)[ebp][esi]
mov dword ptr (-12)[ebp],esi
mov dword ptr (_y)[edi*4],esi
mov dword ptr (-4)[ebp],0
L14:
mov edi,dword ptr (-4)[ebp]
lea edi,[edi*4]
mov esi,dword ptr (-12)[ebp]
mov ebx,dword ptr (-8)[ebp]
sal ebx,4
mov ebx,dword ptr (_x)[ebx][edi]
mov dword ptr [esi][edi],ebx
L15:
inc dword ptr (-4)[ebp]
cmp dword ptr (-4)[ebp],4
jl L14
L11:
inc dword ptr (-8)[ebp]
cmp dword ptr (-8)[ebp],3
jl L10
lea edi,(_y)
push edi
lea edi,(-60)[ebp]
push edi
call _g
add esp,8
mov eax,0
L1:
mov esp,ebp
pop ebp
pop edi
pop esi
pop ebx
ret
public _f
_f:
push ebx
push esi
push edi
push ebp
mov ebp,esp
sub esp,8
mov dword ptr (-8)[ebp],0
L19:
mov dword ptr (-4)[ebp],0
L23:
mov edi,dword ptr (-4)[ebp]
mov esi,dword ptr (-8)[ebp]
sal esi,4
mov edi,dword ptr (_x)[esi][edi*4]
push edi
lea edi,(L27)
push edi
call _printf
add esp,8
L24:
inc dword ptr (-4)[ebp]
cmp dword ptr (-4)[ebp],4
jl L23
L20:
inc dword ptr (-8)[ebp]
cmp dword ptr (-8)[ebp],3
jl L19
lea edi,(L28)
push edi
call _printf
add esp,4
mov dword ptr (-8)[ebp],0
L29:
mov dword ptr (-4)[ebp],0
L33:
mov edi,dword ptr (-4)[ebp]
mov esi,dword ptr (-8)[ebp]
mov esi,dword ptr (_y)[esi*4]
mov edi,dword ptr [esi][edi*4]
push edi
lea edi,(L27)
push edi
call _printf
add esp,8
L34:
inc dword ptr (-4)[ebp]
cmp dword ptr (-4)[ebp],4
jl L33
L30:
inc dword ptr (-8)[ebp]
cmp dword ptr (-8)[ebp],3
jl L29
lea edi,(L28)
push edi
call _printf
add esp,4
mov eax,0
L18:
mov esp,ebp
pop ebp
pop edi
pop esi
pop ebx
ret
public _g
_g:
push ebx
push esi
push edi
push ebp
mov ebp,esp
sub esp,8
mov dword ptr (-8)[ebp],0
L38:
mov dword ptr (-4)[ebp],0
L42:
mov edi,dword ptr (-4)[ebp]
mov esi,dword ptr (-8)[ebp]
sal esi,4
mov ebx,dword ptr (20)[ebp]
lea esi,[ebx][esi]
mov edi,dword ptr [esi][edi*4]
push edi
lea edi,(L27)
push edi
call _printf
add esp,8
L43:
inc dword ptr (-4)[ebp]
cmp dword ptr (-4)[ebp],4
jl L42
L39:
inc dword ptr (-8)[ebp]
cmp dword ptr (-8)[ebp],3
jl L38
lea edi,(L28)
push edi
call _printf
add esp,4
mov dword ptr (-8)[ebp],0
L46:
mov dword ptr (-4)[ebp],0
L50:
mov edi,dword ptr (-4)[ebp]
mov esi,dword ptr (-8)[ebp]
mov ebx,dword ptr (24)[ebp]
mov esi,dword ptr [ebx][esi*4]
mov edi,dword ptr [esi][edi*4]
push edi
lea edi,(L27)
push edi
call _printf
add esp,8
L51:
inc dword ptr (-4)[ebp]
cmp dword ptr (-4)[ebp],4
jl L50
L47:
inc dword ptr (-8)[ebp]
cmp dword ptr (-8)[ebp],3
jl L46
lea edi,(L28)
push edi
call _printf
add esp,4
mov eax,0
L37:
mov esp,ebp
pop ebp
pop edi
pop esi
pop ebx
ret
_TEXT ends
extrn _printf:near
_TEXT segment
_TEXT ends
_DATA segment
public _y
align 4
_y label byte
db 12 dup (0)
public _x
align 4
_x label byte
db 48 dup (0)
_DATA ends
_TEXT segment
align 1
L28 label byte
db 10
db 0
align 1
L27 label byte
db 32
db 37
db 100
db 0
_TEXT ends
end
|