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
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
|
IF @Version LT 800
ECHO MASM version 8.00 or later is strongly recommended.
ENDIF
.686
.MODEL FLAT
OPTION DOTNAME
IF @Version LT 800
.text$ SEGMENT PAGE 'CODE'
ELSE
.text$ SEGMENT ALIGN(64) 'CODE'
ENDIF
ALIGN 16
_md5_block_asm_data_order PROC PUBLIC
$L_md5_block_asm_data_order_begin::
push esi
push edi
mov edi,DWORD PTR 12[esp]
mov esi,DWORD PTR 16[esp]
mov ecx,DWORD PTR 20[esp]
push ebp
shl ecx,6
push ebx
add ecx,esi
sub ecx,64
mov eax,DWORD PTR [edi]
push ecx
mov ebx,DWORD PTR 4[edi]
mov ecx,DWORD PTR 8[edi]
mov edx,DWORD PTR 12[edi]
$L000start:
;
; R0 section
mov edi,ecx
mov ebp,DWORD PTR [esi]
; R0 0
xor edi,edx
and edi,ebx
lea eax,DWORD PTR 3614090360[ebp*1+eax]
xor edi,edx
mov ebp,DWORD PTR 4[esi]
add eax,edi
rol eax,7
mov edi,ebx
add eax,ebx
; R0 1
xor edi,ecx
and edi,eax
lea edx,DWORD PTR 3905402710[ebp*1+edx]
xor edi,ecx
mov ebp,DWORD PTR 8[esi]
add edx,edi
rol edx,12
mov edi,eax
add edx,eax
; R0 2
xor edi,ebx
and edi,edx
lea ecx,DWORD PTR 606105819[ebp*1+ecx]
xor edi,ebx
mov ebp,DWORD PTR 12[esi]
add ecx,edi
rol ecx,17
mov edi,edx
add ecx,edx
; R0 3
xor edi,eax
and edi,ecx
lea ebx,DWORD PTR 3250441966[ebp*1+ebx]
xor edi,eax
mov ebp,DWORD PTR 16[esi]
add ebx,edi
rol ebx,22
mov edi,ecx
add ebx,ecx
; R0 4
xor edi,edx
and edi,ebx
lea eax,DWORD PTR 4118548399[ebp*1+eax]
xor edi,edx
mov ebp,DWORD PTR 20[esi]
add eax,edi
rol eax,7
mov edi,ebx
add eax,ebx
; R0 5
xor edi,ecx
and edi,eax
lea edx,DWORD PTR 1200080426[ebp*1+edx]
xor edi,ecx
mov ebp,DWORD PTR 24[esi]
add edx,edi
rol edx,12
mov edi,eax
add edx,eax
; R0 6
xor edi,ebx
and edi,edx
lea ecx,DWORD PTR 2821735955[ebp*1+ecx]
xor edi,ebx
mov ebp,DWORD PTR 28[esi]
add ecx,edi
rol ecx,17
mov edi,edx
add ecx,edx
; R0 7
xor edi,eax
and edi,ecx
lea ebx,DWORD PTR 4249261313[ebp*1+ebx]
xor edi,eax
mov ebp,DWORD PTR 32[esi]
add ebx,edi
rol ebx,22
mov edi,ecx
add ebx,ecx
; R0 8
xor edi,edx
and edi,ebx
lea eax,DWORD PTR 1770035416[ebp*1+eax]
xor edi,edx
mov ebp,DWORD PTR 36[esi]
add eax,edi
rol eax,7
mov edi,ebx
add eax,ebx
; R0 9
xor edi,ecx
and edi,eax
lea edx,DWORD PTR 2336552879[ebp*1+edx]
xor edi,ecx
mov ebp,DWORD PTR 40[esi]
add edx,edi
rol edx,12
mov edi,eax
add edx,eax
; R0 10
xor edi,ebx
and edi,edx
lea ecx,DWORD PTR 4294925233[ebp*1+ecx]
xor edi,ebx
mov ebp,DWORD PTR 44[esi]
add ecx,edi
rol ecx,17
mov edi,edx
add ecx,edx
; R0 11
xor edi,eax
and edi,ecx
lea ebx,DWORD PTR 2304563134[ebp*1+ebx]
xor edi,eax
mov ebp,DWORD PTR 48[esi]
add ebx,edi
rol ebx,22
mov edi,ecx
add ebx,ecx
; R0 12
xor edi,edx
and edi,ebx
lea eax,DWORD PTR 1804603682[ebp*1+eax]
xor edi,edx
mov ebp,DWORD PTR 52[esi]
add eax,edi
rol eax,7
mov edi,ebx
add eax,ebx
; R0 13
xor edi,ecx
and edi,eax
lea edx,DWORD PTR 4254626195[ebp*1+edx]
xor edi,ecx
mov ebp,DWORD PTR 56[esi]
add edx,edi
rol edx,12
mov edi,eax
add edx,eax
; R0 14
xor edi,ebx
and edi,edx
lea ecx,DWORD PTR 2792965006[ebp*1+ecx]
xor edi,ebx
mov ebp,DWORD PTR 60[esi]
add ecx,edi
rol ecx,17
mov edi,edx
add ecx,edx
; R0 15
xor edi,eax
and edi,ecx
lea ebx,DWORD PTR 1236535329[ebp*1+ebx]
xor edi,eax
mov ebp,DWORD PTR 4[esi]
add ebx,edi
rol ebx,22
mov edi,ecx
add ebx,ecx
;
; R1 section
; R1 16
xor edi,ebx
and edi,edx
lea eax,DWORD PTR 4129170786[ebp*1+eax]
xor edi,ecx
mov ebp,DWORD PTR 24[esi]
add eax,edi
mov edi,ebx
rol eax,5
add eax,ebx
; R1 17
xor edi,eax
and edi,ecx
lea edx,DWORD PTR 3225465664[ebp*1+edx]
xor edi,ebx
mov ebp,DWORD PTR 44[esi]
add edx,edi
mov edi,eax
rol edx,9
add edx,eax
; R1 18
xor edi,edx
and edi,ebx
lea ecx,DWORD PTR 643717713[ebp*1+ecx]
xor edi,eax
mov ebp,DWORD PTR [esi]
add ecx,edi
mov edi,edx
rol ecx,14
add ecx,edx
; R1 19
xor edi,ecx
and edi,eax
lea ebx,DWORD PTR 3921069994[ebp*1+ebx]
xor edi,edx
mov ebp,DWORD PTR 20[esi]
add ebx,edi
mov edi,ecx
rol ebx,20
add ebx,ecx
; R1 20
xor edi,ebx
and edi,edx
lea eax,DWORD PTR 3593408605[ebp*1+eax]
xor edi,ecx
mov ebp,DWORD PTR 40[esi]
add eax,edi
mov edi,ebx
rol eax,5
add eax,ebx
; R1 21
xor edi,eax
and edi,ecx
lea edx,DWORD PTR 38016083[ebp*1+edx]
xor edi,ebx
mov ebp,DWORD PTR 60[esi]
add edx,edi
mov edi,eax
rol edx,9
add edx,eax
; R1 22
xor edi,edx
and edi,ebx
lea ecx,DWORD PTR 3634488961[ebp*1+ecx]
xor edi,eax
mov ebp,DWORD PTR 16[esi]
add ecx,edi
mov edi,edx
rol ecx,14
add ecx,edx
; R1 23
xor edi,ecx
and edi,eax
lea ebx,DWORD PTR 3889429448[ebp*1+ebx]
xor edi,edx
mov ebp,DWORD PTR 36[esi]
add ebx,edi
mov edi,ecx
rol ebx,20
add ebx,ecx
; R1 24
xor edi,ebx
and edi,edx
lea eax,DWORD PTR 568446438[ebp*1+eax]
xor edi,ecx
mov ebp,DWORD PTR 56[esi]
add eax,edi
mov edi,ebx
rol eax,5
add eax,ebx
; R1 25
xor edi,eax
and edi,ecx
lea edx,DWORD PTR 3275163606[ebp*1+edx]
xor edi,ebx
mov ebp,DWORD PTR 12[esi]
add edx,edi
mov edi,eax
rol edx,9
add edx,eax
; R1 26
xor edi,edx
and edi,ebx
lea ecx,DWORD PTR 4107603335[ebp*1+ecx]
xor edi,eax
mov ebp,DWORD PTR 32[esi]
add ecx,edi
mov edi,edx
rol ecx,14
add ecx,edx
; R1 27
xor edi,ecx
and edi,eax
lea ebx,DWORD PTR 1163531501[ebp*1+ebx]
xor edi,edx
mov ebp,DWORD PTR 52[esi]
add ebx,edi
mov edi,ecx
rol ebx,20
add ebx,ecx
; R1 28
xor edi,ebx
and edi,edx
lea eax,DWORD PTR 2850285829[ebp*1+eax]
xor edi,ecx
mov ebp,DWORD PTR 8[esi]
add eax,edi
mov edi,ebx
rol eax,5
add eax,ebx
; R1 29
xor edi,eax
and edi,ecx
lea edx,DWORD PTR 4243563512[ebp*1+edx]
xor edi,ebx
mov ebp,DWORD PTR 28[esi]
add edx,edi
mov edi,eax
rol edx,9
add edx,eax
; R1 30
xor edi,edx
and edi,ebx
lea ecx,DWORD PTR 1735328473[ebp*1+ecx]
xor edi,eax
mov ebp,DWORD PTR 48[esi]
add ecx,edi
mov edi,edx
rol ecx,14
add ecx,edx
; R1 31
xor edi,ecx
and edi,eax
lea ebx,DWORD PTR 2368359562[ebp*1+ebx]
xor edi,edx
mov ebp,DWORD PTR 20[esi]
add ebx,edi
mov edi,ecx
rol ebx,20
add ebx,ecx
;
; R2 section
; R2 32
xor edi,edx
xor edi,ebx
lea eax,DWORD PTR 4294588738[ebp*1+eax]
add eax,edi
mov ebp,DWORD PTR 32[esi]
rol eax,4
mov edi,ebx
; R2 33
add eax,ebx
xor edi,ecx
lea edx,DWORD PTR 2272392833[ebp*1+edx]
xor edi,eax
mov ebp,DWORD PTR 44[esi]
add edx,edi
mov edi,eax
rol edx,11
add edx,eax
; R2 34
xor edi,ebx
xor edi,edx
lea ecx,DWORD PTR 1839030562[ebp*1+ecx]
add ecx,edi
mov ebp,DWORD PTR 56[esi]
rol ecx,16
mov edi,edx
; R2 35
add ecx,edx
xor edi,eax
lea ebx,DWORD PTR 4259657740[ebp*1+ebx]
xor edi,ecx
mov ebp,DWORD PTR 4[esi]
add ebx,edi
mov edi,ecx
rol ebx,23
add ebx,ecx
; R2 36
xor edi,edx
xor edi,ebx
lea eax,DWORD PTR 2763975236[ebp*1+eax]
add eax,edi
mov ebp,DWORD PTR 16[esi]
rol eax,4
mov edi,ebx
; R2 37
add eax,ebx
xor edi,ecx
lea edx,DWORD PTR 1272893353[ebp*1+edx]
xor edi,eax
mov ebp,DWORD PTR 28[esi]
add edx,edi
mov edi,eax
rol edx,11
add edx,eax
; R2 38
xor edi,ebx
xor edi,edx
lea ecx,DWORD PTR 4139469664[ebp*1+ecx]
add ecx,edi
mov ebp,DWORD PTR 40[esi]
rol ecx,16
mov edi,edx
; R2 39
add ecx,edx
xor edi,eax
lea ebx,DWORD PTR 3200236656[ebp*1+ebx]
xor edi,ecx
mov ebp,DWORD PTR 52[esi]
add ebx,edi
mov edi,ecx
rol ebx,23
add ebx,ecx
; R2 40
xor edi,edx
xor edi,ebx
lea eax,DWORD PTR 681279174[ebp*1+eax]
add eax,edi
mov ebp,DWORD PTR [esi]
rol eax,4
mov edi,ebx
; R2 41
add eax,ebx
xor edi,ecx
lea edx,DWORD PTR 3936430074[ebp*1+edx]
xor edi,eax
mov ebp,DWORD PTR 12[esi]
add edx,edi
mov edi,eax
rol edx,11
add edx,eax
; R2 42
xor edi,ebx
xor edi,edx
lea ecx,DWORD PTR 3572445317[ebp*1+ecx]
add ecx,edi
mov ebp,DWORD PTR 24[esi]
rol ecx,16
mov edi,edx
; R2 43
add ecx,edx
xor edi,eax
lea ebx,DWORD PTR 76029189[ebp*1+ebx]
xor edi,ecx
mov ebp,DWORD PTR 36[esi]
add ebx,edi
mov edi,ecx
rol ebx,23
add ebx,ecx
; R2 44
xor edi,edx
xor edi,ebx
lea eax,DWORD PTR 3654602809[ebp*1+eax]
add eax,edi
mov ebp,DWORD PTR 48[esi]
rol eax,4
mov edi,ebx
; R2 45
add eax,ebx
xor edi,ecx
lea edx,DWORD PTR 3873151461[ebp*1+edx]
xor edi,eax
mov ebp,DWORD PTR 60[esi]
add edx,edi
mov edi,eax
rol edx,11
add edx,eax
; R2 46
xor edi,ebx
xor edi,edx
lea ecx,DWORD PTR 530742520[ebp*1+ecx]
add ecx,edi
mov ebp,DWORD PTR 8[esi]
rol ecx,16
mov edi,edx
; R2 47
add ecx,edx
xor edi,eax
lea ebx,DWORD PTR 3299628645[ebp*1+ebx]
xor edi,ecx
mov ebp,DWORD PTR [esi]
add ebx,edi
mov edi,-1
rol ebx,23
add ebx,ecx
;
; R3 section
; R3 48
xor edi,edx
or edi,ebx
lea eax,DWORD PTR 4096336452[ebp*1+eax]
xor edi,ecx
mov ebp,DWORD PTR 28[esi]
add eax,edi
mov edi,-1
rol eax,6
xor edi,ecx
add eax,ebx
; R3 49
or edi,eax
lea edx,DWORD PTR 1126891415[ebp*1+edx]
xor edi,ebx
mov ebp,DWORD PTR 56[esi]
add edx,edi
mov edi,-1
rol edx,10
xor edi,ebx
add edx,eax
; R3 50
or edi,edx
lea ecx,DWORD PTR 2878612391[ebp*1+ecx]
xor edi,eax
mov ebp,DWORD PTR 20[esi]
add ecx,edi
mov edi,-1
rol ecx,15
xor edi,eax
add ecx,edx
; R3 51
or edi,ecx
lea ebx,DWORD PTR 4237533241[ebp*1+ebx]
xor edi,edx
mov ebp,DWORD PTR 48[esi]
add ebx,edi
mov edi,-1
rol ebx,21
xor edi,edx
add ebx,ecx
; R3 52
or edi,ebx
lea eax,DWORD PTR 1700485571[ebp*1+eax]
xor edi,ecx
mov ebp,DWORD PTR 12[esi]
add eax,edi
mov edi,-1
rol eax,6
xor edi,ecx
add eax,ebx
; R3 53
or edi,eax
lea edx,DWORD PTR 2399980690[ebp*1+edx]
xor edi,ebx
mov ebp,DWORD PTR 40[esi]
add edx,edi
mov edi,-1
rol edx,10
xor edi,ebx
add edx,eax
; R3 54
or edi,edx
lea ecx,DWORD PTR 4293915773[ebp*1+ecx]
xor edi,eax
mov ebp,DWORD PTR 4[esi]
add ecx,edi
mov edi,-1
rol ecx,15
xor edi,eax
add ecx,edx
; R3 55
or edi,ecx
lea ebx,DWORD PTR 2240044497[ebp*1+ebx]
xor edi,edx
mov ebp,DWORD PTR 32[esi]
add ebx,edi
mov edi,-1
rol ebx,21
xor edi,edx
add ebx,ecx
; R3 56
or edi,ebx
lea eax,DWORD PTR 1873313359[ebp*1+eax]
xor edi,ecx
mov ebp,DWORD PTR 60[esi]
add eax,edi
mov edi,-1
rol eax,6
xor edi,ecx
add eax,ebx
; R3 57
or edi,eax
lea edx,DWORD PTR 4264355552[ebp*1+edx]
xor edi,ebx
mov ebp,DWORD PTR 24[esi]
add edx,edi
mov edi,-1
rol edx,10
xor edi,ebx
add edx,eax
; R3 58
or edi,edx
lea ecx,DWORD PTR 2734768916[ebp*1+ecx]
xor edi,eax
mov ebp,DWORD PTR 52[esi]
add ecx,edi
mov edi,-1
rol ecx,15
xor edi,eax
add ecx,edx
; R3 59
or edi,ecx
lea ebx,DWORD PTR 1309151649[ebp*1+ebx]
xor edi,edx
mov ebp,DWORD PTR 16[esi]
add ebx,edi
mov edi,-1
rol ebx,21
xor edi,edx
add ebx,ecx
; R3 60
or edi,ebx
lea eax,DWORD PTR 4149444226[ebp*1+eax]
xor edi,ecx
mov ebp,DWORD PTR 44[esi]
add eax,edi
mov edi,-1
rol eax,6
xor edi,ecx
add eax,ebx
; R3 61
or edi,eax
lea edx,DWORD PTR 3174756917[ebp*1+edx]
xor edi,ebx
mov ebp,DWORD PTR 8[esi]
add edx,edi
mov edi,-1
rol edx,10
xor edi,ebx
add edx,eax
; R3 62
or edi,edx
lea ecx,DWORD PTR 718787259[ebp*1+ecx]
xor edi,eax
mov ebp,DWORD PTR 36[esi]
add ecx,edi
mov edi,-1
rol ecx,15
xor edi,eax
add ecx,edx
; R3 63
or edi,ecx
lea ebx,DWORD PTR 3951481745[ebp*1+ebx]
xor edi,edx
mov ebp,DWORD PTR 24[esp]
add ebx,edi
add esi,64
rol ebx,21
mov edi,DWORD PTR [ebp]
add ebx,ecx
add eax,edi
mov edi,DWORD PTR 4[ebp]
add ebx,edi
mov edi,DWORD PTR 8[ebp]
add ecx,edi
mov edi,DWORD PTR 12[ebp]
add edx,edi
mov DWORD PTR [ebp],eax
mov DWORD PTR 4[ebp],ebx
mov edi,DWORD PTR [esp]
mov DWORD PTR 8[ebp],ecx
mov DWORD PTR 12[ebp],edx
cmp edi,esi
jae $L000start
pop eax
pop ebx
pop ebp
pop edi
pop esi
ret
_md5_block_asm_data_order ENDP
.text$ ENDS
END
|