1 %ifidn __OUTPUT_FORMAT__
,obj
2 section code use32 class
=code
align=64
3 %elifidn __OUTPUT_FORMAT__
,win32
4 %ifdef __YASM_VERSION_ID__
5 %if __YASM_VERSION_ID__
< 01010000h
6 %error yasm version
1.1.0 or later needed.
8 ; Yasm automatically includes .00 and complains about redefining it.
9 ; https://www.tortall.net/projects/yasm/manual/html/objfmt-win32-safeseh.html
13 section .text code
align=64
17 global _sha1_block_data_order
19 _sha1_block_data_order:
20 L$
_sha1_block_data_order_begin:
25 mov ebp,DWORD [20+esp]
26 mov esi,DWORD [24+esp]
27 mov eax,DWORD [28+esp]
31 mov DWORD [104+esp],eax
32 mov edi,DWORD [16+ebp]
39 mov edx,DWORD [12+esi]
47 mov DWORD [12+esp],edx
48 mov eax,DWORD [16+esi]
49 mov ebx,DWORD [20+esi]
50 mov ecx,DWORD [24+esi]
51 mov edx,DWORD [28+esi]
56 mov DWORD [16+esp],eax
57 mov DWORD [20+esp],ebx
58 mov DWORD [24+esp],ecx
59 mov DWORD [28+esp],edx
60 mov eax,DWORD [32+esi]
61 mov ebx,DWORD [36+esi]
62 mov ecx,DWORD [40+esi]
63 mov edx,DWORD [44+esi]
68 mov DWORD [32+esp],eax
69 mov DWORD [36+esp],ebx
70 mov DWORD [40+esp],ecx
71 mov DWORD [44+esp],edx
72 mov eax,DWORD [48+esi]
73 mov ebx,DWORD [52+esi]
74 mov ecx,DWORD [56+esi]
75 mov edx,DWORD [60+esi]
80 mov DWORD [48+esp],eax
81 mov DWORD [52+esp],ebx
82 mov DWORD [56+esp],ecx
83 mov DWORD [60+esp],edx
84 mov DWORD [100+esp],esi
88 mov edx,DWORD [12+ebp]
99 lea ebp,[1518500249+edi*1+ebp]
107 mov edx,DWORD [4+esp]
111 lea ebp,[1518500249+edx*1+ebp]
119 mov ecx,DWORD [8+esp]
123 lea ebp,[1518500249+ecx*1+ebp]
131 mov ebx,DWORD [12+esp]
135 lea ebp,[1518500249+ebx*1+ebp]
143 mov eax,DWORD [16+esp]
147 lea ebp,[1518500249+eax*1+ebp]
155 mov esi,DWORD [20+esp]
159 lea ebp,[1518500249+esi*1+ebp]
167 mov edi,DWORD [24+esp]
171 lea ebp,[1518500249+edi*1+ebp]
179 mov edx,DWORD [28+esp]
183 lea ebp,[1518500249+edx*1+ebp]
191 mov ecx,DWORD [32+esp]
195 lea ebp,[1518500249+ecx*1+ebp]
203 mov ebx,DWORD [36+esp]
207 lea ebp,[1518500249+ebx*1+ebp]
215 mov eax,DWORD [40+esp]
219 lea ebp,[1518500249+eax*1+ebp]
227 mov esi,DWORD [44+esp]
231 lea ebp,[1518500249+esi*1+ebp]
239 mov edi,DWORD [48+esp]
243 lea ebp,[1518500249+edi*1+ebp]
251 mov edx,DWORD [52+esp]
255 lea ebp,[1518500249+edx*1+ebp]
263 mov ecx,DWORD [56+esp]
267 lea ebp,[1518500249+ecx*1+ebp]
275 mov ebx,DWORD [60+esp]
279 lea ebp,[1518500249+ebx*1+ebp]
284 xor ebx,DWORD [8+esp]
286 xor ebx,DWORD [32+esp]
288 xor ebx,DWORD [52+esp]
296 lea ebx,[1518500249+eax*1+ebx]
297 mov eax,DWORD [4+esp]
301 xor eax,DWORD [12+esp]
303 xor eax,DWORD [36+esp]
305 xor eax,DWORD [56+esp]
311 mov DWORD [4+esp],eax
313 lea eax,[1518500249+esi*1+eax]
314 mov esi,DWORD [8+esp]
318 xor esi,DWORD [16+esp]
320 xor esi,DWORD [40+esp]
322 xor esi,DWORD [60+esp]
328 mov DWORD [8+esp],esi
330 lea esi,[1518500249+edi*1+esi]
331 mov edi,DWORD [12+esp]
335 xor edi,DWORD [20+esp]
337 xor edi,DWORD [44+esp]
345 mov DWORD [12+esp],edi
347 lea edi,[1518500249+edx*1+edi]
348 mov edx,DWORD [16+esp]
352 xor edx,DWORD [24+esp]
354 xor edx,DWORD [48+esp]
356 xor edx,DWORD [4+esp]
362 mov DWORD [16+esp],edx
363 lea edx,[1859775393+ecx*1+edx]
364 mov ecx,DWORD [20+esp]
368 xor ecx,DWORD [28+esp]
370 xor ecx,DWORD [52+esp]
372 xor ecx,DWORD [8+esp]
378 mov DWORD [20+esp],ecx
379 lea ecx,[1859775393+ebx*1+ecx]
380 mov ebx,DWORD [24+esp]
384 xor ebx,DWORD [32+esp]
386 xor ebx,DWORD [56+esp]
388 xor ebx,DWORD [12+esp]
394 mov DWORD [24+esp],ebx
395 lea ebx,[1859775393+eax*1+ebx]
396 mov eax,DWORD [28+esp]
400 xor eax,DWORD [36+esp]
402 xor eax,DWORD [60+esp]
404 xor eax,DWORD [16+esp]
410 mov DWORD [28+esp],eax
411 lea eax,[1859775393+esi*1+eax]
412 mov esi,DWORD [32+esp]
416 xor esi,DWORD [40+esp]
420 xor esi,DWORD [20+esp]
426 mov DWORD [32+esp],esi
427 lea esi,[1859775393+edi*1+esi]
428 mov edi,DWORD [36+esp]
432 xor edi,DWORD [44+esp]
434 xor edi,DWORD [4+esp]
436 xor edi,DWORD [24+esp]
442 mov DWORD [36+esp],edi
443 lea edi,[1859775393+edx*1+edi]
444 mov edx,DWORD [40+esp]
448 xor edx,DWORD [48+esp]
450 xor edx,DWORD [8+esp]
452 xor edx,DWORD [28+esp]
458 mov DWORD [40+esp],edx
459 lea edx,[1859775393+ecx*1+edx]
460 mov ecx,DWORD [44+esp]
464 xor ecx,DWORD [52+esp]
466 xor ecx,DWORD [12+esp]
468 xor ecx,DWORD [32+esp]
474 mov DWORD [44+esp],ecx
475 lea ecx,[1859775393+ebx*1+ecx]
476 mov ebx,DWORD [48+esp]
480 xor ebx,DWORD [56+esp]
482 xor ebx,DWORD [16+esp]
484 xor ebx,DWORD [36+esp]
490 mov DWORD [48+esp],ebx
491 lea ebx,[1859775393+eax*1+ebx]
492 mov eax,DWORD [52+esp]
496 xor eax,DWORD [60+esp]
498 xor eax,DWORD [20+esp]
500 xor eax,DWORD [40+esp]
506 mov DWORD [52+esp],eax
507 lea eax,[1859775393+esi*1+eax]
508 mov esi,DWORD [56+esp]
514 xor esi,DWORD [24+esp]
516 xor esi,DWORD [44+esp]
522 mov DWORD [56+esp],esi
523 lea esi,[1859775393+edi*1+esi]
524 mov edi,DWORD [60+esp]
528 xor edi,DWORD [4+esp]
530 xor edi,DWORD [28+esp]
532 xor edi,DWORD [48+esp]
538 mov DWORD [60+esp],edi
539 lea edi,[1859775393+edx*1+edi]
544 xor edx,DWORD [8+esp]
546 xor edx,DWORD [32+esp]
548 xor edx,DWORD [52+esp]
555 lea edx,[1859775393+ecx*1+edx]
556 mov ecx,DWORD [4+esp]
560 xor ecx,DWORD [12+esp]
562 xor ecx,DWORD [36+esp]
564 xor ecx,DWORD [56+esp]
570 mov DWORD [4+esp],ecx
571 lea ecx,[1859775393+ebx*1+ecx]
572 mov ebx,DWORD [8+esp]
576 xor ebx,DWORD [16+esp]
578 xor ebx,DWORD [40+esp]
580 xor ebx,DWORD [60+esp]
586 mov DWORD [8+esp],ebx
587 lea ebx,[1859775393+eax*1+ebx]
588 mov eax,DWORD [12+esp]
592 xor eax,DWORD [20+esp]
594 xor eax,DWORD [44+esp]
602 mov DWORD [12+esp],eax
603 lea eax,[1859775393+esi*1+eax]
604 mov esi,DWORD [16+esp]
608 xor esi,DWORD [24+esp]
610 xor esi,DWORD [48+esp]
612 xor esi,DWORD [4+esp]
618 mov DWORD [16+esp],esi
619 lea esi,[1859775393+edi*1+esi]
620 mov edi,DWORD [20+esp]
624 xor edi,DWORD [28+esp]
626 xor edi,DWORD [52+esp]
628 xor edi,DWORD [8+esp]
634 mov DWORD [20+esp],edi
635 lea edi,[1859775393+edx*1+edi]
636 mov edx,DWORD [24+esp]
640 xor edx,DWORD [32+esp]
642 xor edx,DWORD [56+esp]
644 xor edx,DWORD [12+esp]
650 mov DWORD [24+esp],edx
651 lea edx,[1859775393+ecx*1+edx]
652 mov ecx,DWORD [28+esp]
656 xor ecx,DWORD [36+esp]
658 xor ecx,DWORD [60+esp]
660 xor ecx,DWORD [16+esp]
666 mov DWORD [28+esp],ecx
667 lea ecx,[1859775393+ebx*1+ecx]
668 mov ebx,DWORD [32+esp]
672 xor ebx,DWORD [40+esp]
676 xor ebx,DWORD [20+esp]
682 mov DWORD [32+esp],ebx
683 lea ebx,[2400959708+ebp*1+ebx]
687 mov eax,DWORD [36+esp]
691 xor eax,DWORD [44+esp]
693 xor eax,DWORD [4+esp]
695 xor eax,DWORD [24+esp]
701 mov DWORD [36+esp],eax
702 lea eax,[2400959708+ebp*1+eax]
706 mov esi,DWORD [40+esp]
710 xor esi,DWORD [48+esp]
712 xor esi,DWORD [8+esp]
714 xor esi,DWORD [28+esp]
720 mov DWORD [40+esp],esi
721 lea esi,[2400959708+ebp*1+esi]
725 mov edi,DWORD [44+esp]
729 xor edi,DWORD [52+esp]
731 xor edi,DWORD [12+esp]
733 xor edi,DWORD [32+esp]
739 mov DWORD [44+esp],edi
740 lea edi,[2400959708+ebp*1+edi]
744 mov edx,DWORD [48+esp]
748 xor edx,DWORD [56+esp]
750 xor edx,DWORD [16+esp]
752 xor edx,DWORD [36+esp]
758 mov DWORD [48+esp],edx
759 lea edx,[2400959708+ebp*1+edx]
763 mov ecx,DWORD [52+esp]
767 xor ecx,DWORD [60+esp]
769 xor ecx,DWORD [20+esp]
771 xor ecx,DWORD [40+esp]
777 mov DWORD [52+esp],ecx
778 lea ecx,[2400959708+ebp*1+ecx]
782 mov ebx,DWORD [56+esp]
788 xor ebx,DWORD [24+esp]
790 xor ebx,DWORD [44+esp]
796 mov DWORD [56+esp],ebx
797 lea ebx,[2400959708+ebp*1+ebx]
801 mov eax,DWORD [60+esp]
805 xor eax,DWORD [4+esp]
807 xor eax,DWORD [28+esp]
809 xor eax,DWORD [48+esp]
815 mov DWORD [60+esp],eax
816 lea eax,[2400959708+ebp*1+eax]
824 xor esi,DWORD [8+esp]
826 xor esi,DWORD [32+esp]
828 xor esi,DWORD [52+esp]
835 lea esi,[2400959708+ebp*1+esi]
839 mov edi,DWORD [4+esp]
843 xor edi,DWORD [12+esp]
845 xor edi,DWORD [36+esp]
847 xor edi,DWORD [56+esp]
853 mov DWORD [4+esp],edi
854 lea edi,[2400959708+ebp*1+edi]
858 mov edx,DWORD [8+esp]
862 xor edx,DWORD [16+esp]
864 xor edx,DWORD [40+esp]
866 xor edx,DWORD [60+esp]
872 mov DWORD [8+esp],edx
873 lea edx,[2400959708+ebp*1+edx]
877 mov ecx,DWORD [12+esp]
881 xor ecx,DWORD [20+esp]
883 xor ecx,DWORD [44+esp]
891 mov DWORD [12+esp],ecx
892 lea ecx,[2400959708+ebp*1+ecx]
896 mov ebx,DWORD [16+esp]
900 xor ebx,DWORD [24+esp]
902 xor ebx,DWORD [48+esp]
904 xor ebx,DWORD [4+esp]
910 mov DWORD [16+esp],ebx
911 lea ebx,[2400959708+ebp*1+ebx]
915 mov eax,DWORD [20+esp]
919 xor eax,DWORD [28+esp]
921 xor eax,DWORD [52+esp]
923 xor eax,DWORD [8+esp]
929 mov DWORD [20+esp],eax
930 lea eax,[2400959708+ebp*1+eax]
934 mov esi,DWORD [24+esp]
938 xor esi,DWORD [32+esp]
940 xor esi,DWORD [56+esp]
942 xor esi,DWORD [12+esp]
948 mov DWORD [24+esp],esi
949 lea esi,[2400959708+ebp*1+esi]
953 mov edi,DWORD [28+esp]
957 xor edi,DWORD [36+esp]
959 xor edi,DWORD [60+esp]
961 xor edi,DWORD [16+esp]
967 mov DWORD [28+esp],edi
968 lea edi,[2400959708+ebp*1+edi]
972 mov edx,DWORD [32+esp]
976 xor edx,DWORD [40+esp]
980 xor edx,DWORD [20+esp]
986 mov DWORD [32+esp],edx
987 lea edx,[2400959708+ebp*1+edx]
991 mov ecx,DWORD [36+esp]
995 xor ecx,DWORD [44+esp]
997 xor ecx,DWORD [4+esp]
999 xor ecx,DWORD [24+esp]
1005 mov DWORD [36+esp],ecx
1006 lea ecx,[2400959708+ebp*1+ecx]
1010 mov ebx,DWORD [40+esp]
1014 xor ebx,DWORD [48+esp]
1016 xor ebx,DWORD [8+esp]
1018 xor ebx,DWORD [28+esp]
1024 mov DWORD [40+esp],ebx
1025 lea ebx,[2400959708+ebp*1+ebx]
1029 mov eax,DWORD [44+esp]
1033 xor eax,DWORD [52+esp]
1035 xor eax,DWORD [12+esp]
1037 xor eax,DWORD [32+esp]
1043 mov DWORD [44+esp],eax
1044 lea eax,[2400959708+ebp*1+eax]
1048 mov esi,DWORD [48+esp]
1052 xor esi,DWORD [56+esp]
1054 xor esi,DWORD [16+esp]
1056 xor esi,DWORD [36+esp]
1062 mov DWORD [48+esp],esi
1063 lea esi,[3395469782+edi*1+esi]
1064 mov edi,DWORD [52+esp]
1068 xor edi,DWORD [60+esp]
1070 xor edi,DWORD [20+esp]
1072 xor edi,DWORD [40+esp]
1078 mov DWORD [52+esp],edi
1079 lea edi,[3395469782+edx*1+edi]
1080 mov edx,DWORD [56+esp]
1086 xor edx,DWORD [24+esp]
1088 xor edx,DWORD [44+esp]
1094 mov DWORD [56+esp],edx
1095 lea edx,[3395469782+ecx*1+edx]
1096 mov ecx,DWORD [60+esp]
1100 xor ecx,DWORD [4+esp]
1102 xor ecx,DWORD [28+esp]
1104 xor ecx,DWORD [48+esp]
1110 mov DWORD [60+esp],ecx
1111 lea ecx,[3395469782+ebx*1+ecx]
1116 xor ebx,DWORD [8+esp]
1118 xor ebx,DWORD [32+esp]
1120 xor ebx,DWORD [52+esp]
1127 lea ebx,[3395469782+eax*1+ebx]
1128 mov eax,DWORD [4+esp]
1132 xor eax,DWORD [12+esp]
1134 xor eax,DWORD [36+esp]
1136 xor eax,DWORD [56+esp]
1142 mov DWORD [4+esp],eax
1143 lea eax,[3395469782+esi*1+eax]
1144 mov esi,DWORD [8+esp]
1148 xor esi,DWORD [16+esp]
1150 xor esi,DWORD [40+esp]
1152 xor esi,DWORD [60+esp]
1158 mov DWORD [8+esp],esi
1159 lea esi,[3395469782+edi*1+esi]
1160 mov edi,DWORD [12+esp]
1164 xor edi,DWORD [20+esp]
1166 xor edi,DWORD [44+esp]
1174 mov DWORD [12+esp],edi
1175 lea edi,[3395469782+edx*1+edi]
1176 mov edx,DWORD [16+esp]
1180 xor edx,DWORD [24+esp]
1182 xor edx,DWORD [48+esp]
1184 xor edx,DWORD [4+esp]
1190 mov DWORD [16+esp],edx
1191 lea edx,[3395469782+ecx*1+edx]
1192 mov ecx,DWORD [20+esp]
1196 xor ecx,DWORD [28+esp]
1198 xor ecx,DWORD [52+esp]
1200 xor ecx,DWORD [8+esp]
1206 mov DWORD [20+esp],ecx
1207 lea ecx,[3395469782+ebx*1+ecx]
1208 mov ebx,DWORD [24+esp]
1212 xor ebx,DWORD [32+esp]
1214 xor ebx,DWORD [56+esp]
1216 xor ebx,DWORD [12+esp]
1222 mov DWORD [24+esp],ebx
1223 lea ebx,[3395469782+eax*1+ebx]
1224 mov eax,DWORD [28+esp]
1228 xor eax,DWORD [36+esp]
1230 xor eax,DWORD [60+esp]
1232 xor eax,DWORD [16+esp]
1238 mov DWORD [28+esp],eax
1239 lea eax,[3395469782+esi*1+eax]
1240 mov esi,DWORD [32+esp]
1244 xor esi,DWORD [40+esp]
1248 xor esi,DWORD [20+esp]
1254 mov DWORD [32+esp],esi
1255 lea esi,[3395469782+edi*1+esi]
1256 mov edi,DWORD [36+esp]
1260 xor edi,DWORD [44+esp]
1262 xor edi,DWORD [4+esp]
1264 xor edi,DWORD [24+esp]
1270 mov DWORD [36+esp],edi
1271 lea edi,[3395469782+edx*1+edi]
1272 mov edx,DWORD [40+esp]
1276 xor edx,DWORD [48+esp]
1278 xor edx,DWORD [8+esp]
1280 xor edx,DWORD [28+esp]
1286 mov DWORD [40+esp],edx
1287 lea edx,[3395469782+ecx*1+edx]
1288 mov ecx,DWORD [44+esp]
1292 xor ecx,DWORD [52+esp]
1294 xor ecx,DWORD [12+esp]
1296 xor ecx,DWORD [32+esp]
1302 mov DWORD [44+esp],ecx
1303 lea ecx,[3395469782+ebx*1+ecx]
1304 mov ebx,DWORD [48+esp]
1308 xor ebx,DWORD [56+esp]
1310 xor ebx,DWORD [16+esp]
1312 xor ebx,DWORD [36+esp]
1318 mov DWORD [48+esp],ebx
1319 lea ebx,[3395469782+eax*1+ebx]
1320 mov eax,DWORD [52+esp]
1324 xor eax,DWORD [60+esp]
1326 xor eax,DWORD [20+esp]
1328 xor eax,DWORD [40+esp]
1334 lea eax,[3395469782+esi*1+eax]
1335 mov esi,DWORD [56+esp]
1341 xor esi,DWORD [24+esp]
1343 xor esi,DWORD [44+esp]
1349 lea esi,[3395469782+edi*1+esi]
1350 mov edi,DWORD [60+esp]
1354 xor edi,DWORD [4+esp]
1356 xor edi,DWORD [28+esp]
1358 xor edi,DWORD [48+esp]
1364 lea edi,[3395469782+edx*1+edi]
1366 mov ebp,DWORD [96+esp]
1367 mov edx,DWORD [100+esp]
1369 add esi,DWORD [4+ebp]
1370 add eax,DWORD [8+ebp]
1371 add ebx,DWORD [12+ebp]
1372 add ecx,DWORD [16+ebp]
1375 mov DWORD [4+ebp],esi
1376 cmp edx,DWORD [104+esp]
1377 mov DWORD [8+ebp],eax
1379 mov DWORD [12+ebp],ebx
1381 mov DWORD [16+ebp],ecx
1389 db 83,72,65,49,32,98,108,111,99,107,32,116,114,97,110,115
1390 db 102,111,114,109,32,102,111,114,32,120,56,54,44,32,67,82
1391 db 89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112
1392 db 114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0