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 ;extern _OPENSSL_ia32cap_P
21 L$
_aesni_encrypt_begin:
23 mov edx,DWORD [12+esp]
25 mov ecx,DWORD [240+edx]
36 jnz NEAR L
$000enc
1_loop
_1
46 L$
_aesni_decrypt_begin:
48 mov edx,DWORD [12+esp]
50 mov ecx,DWORD [240+edx]
61 jnz NEAR L
$001dec1_loop
_2
76 lea edx,[32+ecx*1+edx]
82 movups xmm1
,[ecx*1+edx]
86 movups xmm0
,[ecx*1+edx-16]
87 jnz NEAR L
$002enc
2_loop
101 lea edx,[32+ecx*1+edx]
107 movups xmm1
,[ecx*1+edx]
111 movups xmm0
,[ecx*1+edx-16]
112 jnz NEAR L
$003dec2_loop
127 lea edx,[32+ecx*1+edx]
134 movups xmm1
,[ecx*1+edx]
139 movups xmm0
,[ecx*1+edx-16]
140 jnz NEAR L
$004enc
3_loop
157 lea edx,[32+ecx*1+edx]
164 movups xmm1
,[ecx*1+edx]
169 movups xmm0
,[ecx*1+edx-16]
170 jnz NEAR L
$005dec3_loop
188 lea edx,[32+ecx*1+edx]
197 movups xmm1
,[ecx*1+edx]
203 movups xmm0
,[ecx*1+edx-16]
204 jnz NEAR L
$006enc
4_loop
224 lea edx,[32+ecx*1+edx]
233 movups xmm1
,[ecx*1+edx]
239 movups xmm0
,[ecx*1+edx-16]
240 jnz NEAR L
$007dec4_loop
262 lea edx,[32+ecx*1+edx]
266 movups xmm0
,[ecx*1+edx]
268 jmp NEAR L
$008_aesni_encrypt6_inner
274 L
$008_aesni_encrypt6_inner
:
278 L$
_aesni_encrypt6_enter:
279 movups xmm1
,[ecx*1+edx]
287 movups xmm0
,[ecx*1+edx-16]
288 jnz NEAR L
$009enc
6_loop
314 lea edx,[32+ecx*1+edx]
318 movups xmm0
,[ecx*1+edx]
320 jmp NEAR L
$010_aesni_decrypt6_inner
326 L
$010_aesni_decrypt6_inner
:
330 L$
_aesni_decrypt6_enter:
331 movups xmm1
,[ecx*1+edx]
339 movups xmm0
,[ecx*1+edx-16]
340 jnz NEAR L
$011dec6_loop
354 global _aesni_ecb_encrypt
357 L$
_aesni_ecb_encrypt_begin:
362 mov esi,DWORD [20+esp]
363 mov edi,DWORD [24+esp]
364 mov eax,DWORD [28+esp]
365 mov edx,DWORD [32+esp]
366 mov ebx,DWORD [36+esp]
369 mov ecx,DWORD [240+edx]
371 jz NEAR L
$013ecb_decrypt
375 jb NEAR L
$014ecb_enc_tail
384 jmp NEAR L
$015ecb_enc_loop
6_enter
401 L
$015ecb_enc_loop
6_enter
:
402 call __aesni_encrypt6
406 jnc NEAR L
$016ecb_enc_loop
6
419 jb NEAR L
$017ecb_enc_one
421 je NEAR L
$018ecb_enc_two
424 jb NEAR L
$019ecb_enc_three
426 je NEAR L
$020ecb_enc_four
429 call __aesni_encrypt6
435 jmp NEAR L
$012ecb_ret
447 jnz NEAR L
$021enc
1_loop
_3
450 jmp NEAR L
$012ecb_ret
453 call __aesni_encrypt2
456 jmp NEAR L
$012ecb_ret
459 call __aesni_encrypt3
463 jmp NEAR L
$012ecb_ret
466 call __aesni_encrypt4
471 jmp NEAR L
$012ecb_ret
477 jb NEAR L
$022ecb_dec_tail
486 jmp NEAR L
$023ecb_dec_loop
6_enter
503 L
$023ecb_dec_loop
6_enter
:
504 call __aesni_decrypt6
508 jnc NEAR L
$024ecb_dec_loop
6
521 jb NEAR L
$025ecb_dec_one
523 je NEAR L
$026ecb_dec_two
526 jb NEAR L
$027ecb_dec_three
528 je NEAR L
$028ecb_dec_four
531 call __aesni_decrypt6
537 jmp NEAR L
$012ecb_ret
549 jnz NEAR L
$029dec1_loop
_4
552 jmp NEAR L
$012ecb_ret
555 call __aesni_decrypt2
558 jmp NEAR L
$012ecb_ret
561 call __aesni_decrypt3
565 jmp NEAR L
$012ecb_ret
568 call __aesni_decrypt4
587 global _aesni_ccm64_encrypt_blocks
589 _aesni_ccm64_encrypt_blocks:
590 L$
_aesni_ccm64_encrypt_blocks_begin:
595 mov esi,DWORD [20+esp]
596 mov edi,DWORD [24+esp]
597 mov eax,DWORD [28+esp]
598 mov edx,DWORD [32+esp]
599 mov ebx,DWORD [36+esp]
600 mov ecx,DWORD [40+esp]
604 mov DWORD [48+esp],ebp
607 mov ecx,DWORD [240+edx]
608 mov DWORD [esp],202182159
609 mov DWORD [4+esp],134810123
610 mov DWORD [8+esp],67438087
611 mov DWORD [12+esp],66051
614 mov DWORD [16+esp],ebx
615 mov DWORD [20+esp],ebp
616 mov DWORD [24+esp],ebp
617 mov DWORD [28+esp],ebp
623 lea edx,[32+ecx*1+edx]
626 L
$030ccm
64_enc_outer
:
635 L
$031ccm
64_enc
2_loop
:
638 movups xmm1
,[ecx*1+edx]
642 movups xmm0
,[ecx*1+edx-16]
643 jnz NEAR L
$031ccm
64_enc
2_loop
656 jnz NEAR L
$030ccm
64_enc_outer
657 mov esp,DWORD [48+esp]
658 mov edi,DWORD [40+esp]
673 global _aesni_ccm64_decrypt_blocks
675 _aesni_ccm64_decrypt_blocks:
676 L$
_aesni_ccm64_decrypt_blocks_begin:
681 mov esi,DWORD [20+esp]
682 mov edi,DWORD [24+esp]
683 mov eax,DWORD [28+esp]
684 mov edx,DWORD [32+esp]
685 mov ebx,DWORD [36+esp]
686 mov ecx,DWORD [40+esp]
690 mov DWORD [48+esp],ebp
693 mov ecx,DWORD [240+edx]
694 mov DWORD [esp],202182159
695 mov DWORD [4+esp],134810123
696 mov DWORD [8+esp],67438087
697 mov DWORD [12+esp],66051
700 mov DWORD [16+esp],ebx
701 mov DWORD [20+esp],ebp
702 mov DWORD [24+esp],ebp
703 mov DWORD [28+esp],ebp
718 jnz NEAR L
$032enc
1_loop
_5
726 lea edx,[32+ebx*1+ebp]
728 jmp NEAR L
$033ccm
64_dec_outer
730 L
$033ccm
64_dec_outer
:
737 jz NEAR L
$034ccm
64_dec_break
745 L
$035ccm
64_dec
2_loop
:
748 movups xmm1
,[ecx*1+edx]
752 movups xmm0
,[ecx*1+edx-16]
753 jnz NEAR L
$035ccm
64_dec
2_loop
761 jmp NEAR L
$033ccm
64_dec_outer
763 L
$034ccm
64_dec_break
:
764 mov ecx,DWORD [240+ebp]
776 jnz NEAR L
$036enc
1_loop
_6
778 mov esp,DWORD [48+esp]
779 mov edi,DWORD [40+esp]
794 global _aesni_ctr32_encrypt_blocks
796 _aesni_ctr32_encrypt_blocks:
797 L$
_aesni_ctr32_encrypt_blocks_begin:
802 mov esi,DWORD [20+esp]
803 mov edi,DWORD [24+esp]
804 mov eax,DWORD [28+esp]
805 mov edx,DWORD [32+esp]
806 mov ebx,DWORD [36+esp]
810 mov DWORD [80+esp],ebp
812 je NEAR L
$037ctr
32_one_shortcut
814 mov DWORD [esp],202182159
815 mov DWORD [4+esp],134810123
816 mov DWORD [8+esp],67438087
817 mov DWORD [12+esp],66051
820 mov DWORD [16+esp],ecx
821 mov DWORD [20+esp],ecx
822 mov DWORD [24+esp],ecx
823 mov DWORD [28+esp],ebp
824 db 102,15,58,22,251,3
825 db 102,15,58,34,253,3
826 mov ecx,DWORD [240+edx]
831 db 102,15,58,34,195,0
833 db 102,15,58,34,205,0
835 db 102,15,58,34,195,1
837 db 102,15,58,34,205,1
839 db 102,15,58,34,195,2
841 db 102,15,58,34,205,2
850 jb NEAR L
$038ctr
32_tail
857 lea edx,[32+ecx*1+edx]
859 jmp NEAR L
$039ctr
32_loop
6
882 call L$_aesni_encrypt6_enter
915 jnc NEAR L
$039ctr
32_loop
6
917 jz NEAR L
$040ctr
32_ret
921 mov ecx,DWORD [240+ebp]
925 jb NEAR L
$041ctr
32_one
928 je NEAR L
$042ctr
32_two
932 jb NEAR L
$043ctr
32_three
935 je NEAR L
$044ctr
32_four
937 call __aesni_encrypt6
953 jmp NEAR L
$040ctr
32_ret
955 L
$037ctr
32_one_shortcut
:
957 mov ecx,DWORD [240+edx]
968 jnz NEAR L
$045enc
1_loop
_7
973 jmp NEAR L
$040ctr
32_ret
976 call __aesni_encrypt2
983 jmp NEAR L
$040ctr
32_ret
986 call __aesni_encrypt3
996 jmp NEAR L
$040ctr
32_ret
999 call __aesni_encrypt4
1001 movups xmm7
,[16+esi]
1002 movups xmm1
,[32+esi]
1004 movups xmm0
,[48+esi]
1008 movups
[16+edi],xmm3
1010 movups
[32+edi],xmm4
1011 movups
[48+edi],xmm5
1018 movdqa
[32+esp],xmm0
1020 movdqa
[48+esp],xmm0
1022 movdqa
[64+esp],xmm0
1024 mov esp,DWORD [80+esp]
1030 global _aesni_xts_encrypt
1033 L$
_aesni_xts_encrypt_begin:
1038 mov edx,DWORD [36+esp]
1039 mov esi,DWORD [40+esp]
1040 mov ecx,DWORD [240+edx]
1043 movups xmm1
,[16+edx]
1047 db 102,15,56,220,209
1051 jnz NEAR L
$046enc
1_loop
_8
1052 db 102,15,56,221,209
1053 mov esi,DWORD [20+esp]
1054 mov edi,DWORD [24+esp]
1055 mov eax,DWORD [28+esp]
1056 mov edx,DWORD [32+esp]
1059 mov ecx,DWORD [240+edx]
1061 mov DWORD [96+esp],135
1062 mov DWORD [100+esp],0
1063 mov DWORD [104+esp],1
1064 mov DWORD [108+esp],0
1065 mov DWORD [112+esp],eax
1066 mov DWORD [116+esp],ebp
1069 movdqa xmm3
,[96+esp]
1075 jc NEAR L
$047xts_enc_short
1079 lea edx,[32+ecx*1+edx]
1080 jmp NEAR L
$048xts_enc_loop6
1092 movdqa
[16+esp],xmm1
1099 movdqa
[32+esp],xmm1
1106 movdqa
[48+esp],xmm1
1112 movdqa
[64+esp],xmm1
1119 movdqu xmm3
,[16+esi]
1121 movdqu xmm4
,[32+esi]
1123 movdqu xmm5
,[48+esi]
1125 movdqu xmm6
,[64+esi]
1127 movdqu xmm1
,[80+esi]
1131 movdqa
[80+esp],xmm7
1133 movups xmm1
,[16+ebp]
1136 db 102,15,56,220,209
1139 db 102,15,56,220,217
1141 movups xmm0
,[32+ebp]
1142 db 102,15,56,220,225
1143 db 102,15,56,220,233
1144 db 102,15,56,220,241
1145 db 102,15,56,220,249
1146 call L$_aesni_encrypt6_enter
1147 movdqa xmm1
,[80+esp]
1154 movups
[16+edi],xmm3
1156 movups
[32+edi],xmm4
1158 movups
[48+edi],xmm5
1160 movups
[64+edi],xmm6
1162 movups
[80+edi],xmm7
1164 movdqa xmm3
,[96+esp]
1171 jnc NEAR L
$048xts_enc_loop6
1172 mov ecx,DWORD [240+ebp]
1177 jz NEAR L
$049xts_enc_done6x
1180 jb NEAR L
$050xts_enc_one
1187 je NEAR L
$051xts_enc_two
1196 jb NEAR L
$052xts_enc_three
1205 movdqa
[16+esp],xmm6
1206 je NEAR L
$053xts_enc_four
1207 movdqa
[32+esp],xmm7
1209 movdqa
[48+esp],xmm1
1214 movdqu xmm3
,[16+esi]
1215 movdqu xmm4
,[32+esi]
1217 movdqu xmm5
,[48+esi]
1219 movdqu xmm6
,[64+esi]
1223 movdqa
[64+esp],xmm7
1225 call __aesni_encrypt6
1226 movaps xmm1
,[64+esp]
1232 movups
[16+edi],xmm3
1234 movups
[32+edi],xmm4
1235 movups
[48+edi],xmm5
1236 movups
[64+edi],xmm6
1238 jmp NEAR L
$054xts_enc_done
1245 movups xmm1
,[16+edx]
1249 db 102,15,56,220,209
1253 jnz NEAR L
$055enc
1_loop
_9
1254 db 102,15,56,221,209
1259 jmp NEAR L
$054xts_enc_done
1264 movups xmm3
,[16+esi]
1268 call __aesni_encrypt2
1272 movups
[16+edi],xmm3
1275 jmp NEAR L
$054xts_enc_done
1280 movups xmm3
,[16+esi]
1281 movups xmm4
,[32+esi]
1286 call __aesni_encrypt3
1291 movups
[16+edi],xmm3
1292 movups
[32+edi],xmm4
1295 jmp NEAR L
$054xts_enc_done
1300 movups xmm3
,[16+esi]
1301 movups xmm4
,[32+esi]
1303 movups xmm5
,[48+esi]
1308 call __aesni_encrypt4
1314 movups
[16+edi],xmm3
1315 movups
[32+edi],xmm4
1316 movups
[48+edi],xmm5
1319 jmp NEAR L
$054xts_enc_done
1321 L
$049xts_enc_done6x
:
1322 mov eax,DWORD [112+esp]
1324 jz NEAR L
$056xts_enc_ret
1326 mov DWORD [112+esp],eax
1327 jmp NEAR L
$057xts_enc_steal
1330 mov eax,DWORD [112+esp]
1333 jz NEAR L
$056xts_enc_ret
1335 mov DWORD [112+esp],eax
1341 movzx ecx,BYTE [esi]
1342 movzx edx,BYTE [edi-16]
1344 mov BYTE [edi-16],cl
1348 jnz NEAR L
$057xts_enc_steal
1349 sub edi,DWORD [112+esp]
1352 movups xmm2
,[edi-16]
1355 movups xmm1
,[16+edx]
1359 db 102,15,56,220,209
1363 jnz NEAR L
$058enc
1_loop
_10
1364 db 102,15,56,221,209
1366 movups
[edi-16],xmm2
1373 movdqa
[16+esp],xmm0
1375 movdqa
[32+esp],xmm0
1377 movdqa
[48+esp],xmm0
1379 movdqa
[64+esp],xmm0
1381 movdqa
[80+esp],xmm0
1382 mov esp,DWORD [116+esp]
1388 global _aesni_xts_decrypt
1391 L$
_aesni_xts_decrypt_begin:
1396 mov edx,DWORD [36+esp]
1397 mov esi,DWORD [40+esp]
1398 mov ecx,DWORD [240+edx]
1401 movups xmm1
,[16+edx]
1405 db 102,15,56,220,209
1409 jnz NEAR L
$059enc
1_loop
_11
1410 db 102,15,56,221,209
1411 mov esi,DWORD [20+esp]
1412 mov edi,DWORD [24+esp]
1413 mov eax,DWORD [28+esp]
1414 mov edx,DWORD [32+esp]
1423 mov DWORD [96+esp],135
1424 mov DWORD [100+esp],0
1425 mov DWORD [104+esp],1
1426 mov DWORD [108+esp],0
1427 mov DWORD [112+esp],eax
1428 mov DWORD [116+esp],ebp
1429 mov ecx,DWORD [240+edx]
1434 movdqa xmm3
,[96+esp]
1438 jc NEAR L
$060xts_dec_short
1442 lea edx,[32+ecx*1+edx]
1443 jmp NEAR L
$061xts_dec_loop6
1455 movdqa
[16+esp],xmm1
1462 movdqa
[32+esp],xmm1
1469 movdqa
[48+esp],xmm1
1475 movdqa
[64+esp],xmm1
1482 movdqu xmm3
,[16+esi]
1484 movdqu xmm4
,[32+esi]
1486 movdqu xmm5
,[48+esi]
1488 movdqu xmm6
,[64+esi]
1490 movdqu xmm1
,[80+esi]
1494 movdqa
[80+esp],xmm7
1496 movups xmm1
,[16+ebp]
1499 db 102,15,56,222,209
1502 db 102,15,56,222,217
1504 movups xmm0
,[32+ebp]
1505 db 102,15,56,222,225
1506 db 102,15,56,222,233
1507 db 102,15,56,222,241
1508 db 102,15,56,222,249
1509 call L$_aesni_decrypt6_enter
1510 movdqa xmm1
,[80+esp]
1517 movups
[16+edi],xmm3
1519 movups
[32+edi],xmm4
1521 movups
[48+edi],xmm5
1523 movups
[64+edi],xmm6
1525 movups
[80+edi],xmm7
1527 movdqa xmm3
,[96+esp]
1534 jnc NEAR L
$061xts_dec_loop6
1535 mov ecx,DWORD [240+ebp]
1540 jz NEAR L
$062xts_dec_done6x
1543 jb NEAR L
$063xts_dec_one
1550 je NEAR L
$064xts_dec_two
1559 jb NEAR L
$065xts_dec_three
1568 movdqa
[16+esp],xmm6
1569 je NEAR L
$066xts_dec_four
1570 movdqa
[32+esp],xmm7
1572 movdqa
[48+esp],xmm1
1577 movdqu xmm3
,[16+esi]
1578 movdqu xmm4
,[32+esi]
1580 movdqu xmm5
,[48+esi]
1582 movdqu xmm6
,[64+esi]
1586 movdqa
[64+esp],xmm7
1588 call __aesni_decrypt6
1589 movaps xmm1
,[64+esp]
1595 movups
[16+edi],xmm3
1597 movups
[32+edi],xmm4
1598 movups
[48+edi],xmm5
1599 movups
[64+edi],xmm6
1601 jmp NEAR L
$067xts_dec_done
1608 movups xmm1
,[16+edx]
1612 db 102,15,56,222,209
1616 jnz NEAR L
$068dec1_loop
_12
1617 db 102,15,56,223,209
1622 jmp NEAR L
$067xts_dec_done
1627 movups xmm3
,[16+esi]
1631 call __aesni_decrypt2
1635 movups
[16+edi],xmm3
1638 jmp NEAR L
$067xts_dec_done
1643 movups xmm3
,[16+esi]
1644 movups xmm4
,[32+esi]
1649 call __aesni_decrypt3
1654 movups
[16+edi],xmm3
1655 movups
[32+edi],xmm4
1658 jmp NEAR L
$067xts_dec_done
1663 movups xmm3
,[16+esi]
1664 movups xmm4
,[32+esi]
1666 movups xmm5
,[48+esi]
1671 call __aesni_decrypt4
1677 movups
[16+edi],xmm3
1678 movups
[32+edi],xmm4
1679 movups
[48+edi],xmm5
1682 jmp NEAR L
$067xts_dec_done
1684 L
$062xts_dec_done6x
:
1685 mov eax,DWORD [112+esp]
1687 jz NEAR L
$069xts_dec_ret
1688 mov DWORD [112+esp],eax
1689 jmp NEAR L
$070xts_dec_only_one_more
1692 mov eax,DWORD [112+esp]
1695 jz NEAR L
$069xts_dec_ret
1697 mov DWORD [112+esp],eax
1700 movdqa xmm3
,[96+esp]
1705 L
$070xts_dec_only_one_more
:
1716 movups xmm1
,[16+edx]
1720 db 102,15,56,222,209
1724 jnz NEAR L
$071dec1_loop
_13
1725 db 102,15,56,223,209
1729 movzx ecx,BYTE [16+esi]
1730 movzx edx,BYTE [edi]
1733 mov BYTE [16+edi],dl
1736 jnz NEAR L
$072xts_dec_steal
1737 sub edi,DWORD [112+esp]
1743 movups xmm1
,[16+edx]
1747 db 102,15,56,222,209
1751 jnz NEAR L
$073dec1_loop
_14
1752 db 102,15,56,223,209
1761 movdqa
[16+esp],xmm0
1763 movdqa
[32+esp],xmm0
1765 movdqa
[48+esp],xmm0
1767 movdqa
[64+esp],xmm0
1769 movdqa
[80+esp],xmm0
1770 mov esp,DWORD [116+esp]
1776 global _aesni_cbc_encrypt
1779 L$
_aesni_cbc_encrypt_begin:
1784 mov esi,DWORD [20+esp]
1786 mov edi,DWORD [24+esp]
1788 mov eax,DWORD [28+esp]
1790 mov edx,DWORD [32+esp]
1791 mov ebp,DWORD [36+esp]
1793 jz NEAR L
$074cbc_abort
1794 cmp DWORD [40+esp],0
1797 mov ecx,DWORD [240+edx]
1799 mov DWORD [16+esp],ebx
1801 je NEAR L
$075cbc_decrypt
1804 jb NEAR L
$076cbc_enc_tail
1806 jmp NEAR L
$077cbc_enc_loop
1812 movups xmm1
,[16+edx]
1817 db 102,15,56,220,209
1821 jnz NEAR L
$078enc
1_loop
_15
1822 db 102,15,56,221,209
1828 jnc NEAR L
$077cbc_enc_loop
1830 jnz NEAR L
$076cbc_enc_tail
1833 jmp NEAR L
$079cbc_ret
1845 jmp NEAR L
$077cbc_enc_loop
1849 jbe NEAR L
$080cbc_dec_tail
1852 jmp NEAR L
$081cbc_dec_loop
6_enter
1858 L
$081cbc_dec_loop
6_enter
:
1860 movdqu xmm3
,[16+esi]
1861 movdqu xmm4
,[32+esi]
1862 movdqu xmm5
,[48+esi]
1863 movdqu xmm6
,[64+esi]
1864 movdqu xmm7
,[80+esi]
1865 call __aesni_decrypt6
1867 movups xmm0
,[16+esi]
1870 movups xmm1
,[32+esi]
1872 movups xmm0
,[48+esi]
1874 movups xmm1
,[64+esi]
1876 movups xmm0
,[80+esi]
1879 movups
[16+edi],xmm3
1881 movups
[32+edi],xmm4
1883 movups
[48+edi],xmm5
1885 movups
[64+edi],xmm6
1888 ja NEAR L
$082cbc_dec_loop
6
1892 jle NEAR L
$083cbc_dec_clear_tail_collected
1899 jbe NEAR L
$084cbc_dec_one
1900 movups xmm3
,[16+esi]
1903 jbe NEAR L
$085cbc_dec_two
1904 movups xmm4
,[32+esi]
1906 jbe NEAR L
$086cbc_dec_three
1907 movups xmm5
,[48+esi]
1909 jbe NEAR L
$087cbc_dec_four
1910 movups xmm6
,[64+esi]
1914 call __aesni_decrypt6
1916 movups xmm0
,[16+esi]
1919 movups xmm1
,[32+esi]
1921 movups xmm0
,[48+esi]
1923 movups xmm7
,[64+esi]
1926 movups
[16+edi],xmm3
1928 movups
[32+edi],xmm4
1930 movups
[48+edi],xmm5
1936 jmp NEAR L
$088cbc_dec_tail_collected
1940 movups xmm1
,[16+edx]
1944 db 102,15,56,222,209
1948 jnz NEAR L
$089dec1_loop
_16
1949 db 102,15,56,223,209
1953 jmp NEAR L
$088cbc_dec_tail_collected
1956 call __aesni_decrypt2
1965 jmp NEAR L
$088cbc_dec_tail_collected
1968 call __aesni_decrypt3
1975 movups
[16+edi],xmm3
1978 movups xmm7
,[32+esi]
1980 jmp NEAR L
$088cbc_dec_tail_collected
1983 call __aesni_decrypt4
1984 movups xmm1
,[16+esi]
1985 movups xmm0
,[32+esi]
1987 movups xmm7
,[48+esi]
1991 movups
[16+edi],xmm3
1994 movups
[32+edi],xmm4
2000 jmp NEAR L
$088cbc_dec_tail_collected
2002 L
$083cbc_dec_clear_tail_collected
:
2007 L
$088cbc_dec_tail_collected
:
2009 jnz NEAR L
$090cbc_dec_tail_partial
2012 jmp NEAR L
$079cbc_ret
2014 L
$090cbc_dec_tail_partial
:
2023 mov esp,DWORD [16+esp]
2024 mov ebp,DWORD [36+esp]
2036 __aesni_set_encrypt_key:
2040 jz NEAR L
$091bad_pointer
2042 jz NEAR L
$091bad_pointer
2046 lea ebx,[(L$key_const
-L
$092pic
)+ebx]
2047 lea ebp,[_OPENSSL_ia32cap_P
]
2050 mov ebp,DWORD [4+ebp]
2054 je NEAR L
$09314rounds
2056 je NEAR L
$09412rounds
2058 jne NEAR L
$095bad_keybits
2062 je NEAR L
$09710rounds_alt
2064 movups
[edx-16],xmm0
2065 db 102,15,58,223,200,1
2066 call L
$098key_128_cold
2067 db 102,15,58,223,200,2
2069 db 102,15,58,223,200,4
2071 db 102,15,58,223,200,8
2073 db 102,15,58,223,200,16
2075 db 102,15,58,223,200,32
2077 db 102,15,58,223,200,64
2079 db 102,15,58,223,200,128
2081 db 102,15,58,223,200,27
2083 db 102,15,58,223,200,54
2086 mov DWORD [80+edx],ecx
2087 jmp NEAR L
$100good_key
2095 shufps xmm4
,xmm0
,140
2097 shufps xmm1
,xmm1
,255
2104 movdqa xmm4
,[32+ebx]
2106 movdqu
[edx-16],xmm0
2109 db 102,15,56,221,196
2120 movdqu
[edx-16],xmm0
2123 jnz NEAR L
$101loop_key128
2124 movdqa xmm4
,[48+ebx]
2126 db 102,15,56,221,196
2139 db 102,15,56,221,196
2148 movdqu
[16+edx],xmm0
2150 mov DWORD [96+edx],ecx
2151 jmp NEAR L
$100good_key
2156 je NEAR L
$10212rounds_alt
2158 movups
[edx-16],xmm0
2159 db 102,15,58,223,202,1
2160 call L
$103key_192a_cold
2161 db 102,15,58,223,202,2
2163 db 102,15,58,223,202,4
2165 db 102,15,58,223,202,8
2167 db 102,15,58,223,202,16
2169 db 102,15,58,223,202,32
2171 db 102,15,58,223,202,64
2173 db 102,15,58,223,202,128
2176 mov DWORD [48+edx],ecx
2177 jmp NEAR L
$100good_key
2189 shufps xmm4
,xmm0
,140
2195 pshufd xmm3
,xmm0
,255
2204 movups
[16+edx],xmm3
2206 jmp NEAR L
$106key_192b_warm
2209 movdqa xmm5
,[16+ebx]
2210 movdqa xmm4
,[32+ebx]
2212 movdqu
[edx-16],xmm0
2217 db 102,15,56,221,212
2227 pshufd xmm3
,xmm0
,255
2233 movdqu
[edx-16],xmm0
2235 jnz NEAR L
$107loop_key192
2237 mov DWORD [32+edx],ecx
2238 jmp NEAR L
$100good_key
2241 movups xmm2
,[16+eax]
2244 je NEAR L
$10814rounds_alt
2246 movups
[edx-32],xmm0
2247 movups
[edx-16],xmm2
2248 db 102,15,58,223,202,1
2249 call L
$109key_256a_cold
2250 db 102,15,58,223,200,1
2252 db 102,15,58,223,202,2
2254 db 102,15,58,223,200,2
2256 db 102,15,58,223,202,4
2258 db 102,15,58,223,200,4
2260 db 102,15,58,223,202,8
2262 db 102,15,58,223,200,8
2264 db 102,15,58,223,202,16
2266 db 102,15,58,223,200,16
2268 db 102,15,58,223,202,32
2270 db 102,15,58,223,200,32
2272 db 102,15,58,223,202,64
2275 mov DWORD [16+edx],ecx
2277 jmp NEAR L
$100good_key
2285 shufps xmm4
,xmm0
,140
2287 shufps xmm1
,xmm1
,255
2296 shufps xmm4
,xmm2
,140
2298 shufps xmm1
,xmm1
,170
2304 movdqa xmm4
,[32+ebx]
2306 movdqu
[edx-32],xmm0
2308 movdqu
[edx-16],xmm2
2311 db 102,15,56,221,212
2323 jz NEAR L
$113done_key
256
2324 pshufd xmm2
,xmm0
,255
2326 db 102,15,56,221,211
2335 movdqu
[16+edx],xmm2
2338 jmp NEAR L
$112loop_key256
2341 mov DWORD [16+edx],ecx
2366 global _aesni_set_encrypt_key
2368 _aesni_set_encrypt_key:
2369 L$
_aesni_set_encrypt_key_begin:
2370 mov eax,DWORD [4+esp]
2371 mov ecx,DWORD [8+esp]
2372 mov edx,DWORD [12+esp]
2373 call __aesni_set_encrypt_key
2375 global _aesni_set_decrypt_key
2377 _aesni_set_decrypt_key:
2378 L$
_aesni_set_decrypt_key_begin:
2379 mov eax,DWORD [4+esp]
2380 mov ecx,DWORD [8+esp]
2381 mov edx,DWORD [12+esp]
2382 call __aesni_set_encrypt_key
2383 mov edx,DWORD [12+esp]
2386 jnz NEAR L
$114dec_key_ret
2387 lea eax,[16+ecx*1+edx]
2394 L
$115dec_key_inverse
:
2397 db 102,15,56,219,192
2398 db 102,15,56,219,201
2401 movups
[16+eax],xmm0
2402 movups
[edx-16],xmm1
2404 ja NEAR L
$115dec_key_inverse
2406 db 102,15,56,219,192
2415 dd 202313229,202313229,202313229,202313229
2416 dd 67569157,67569157,67569157,67569157
2419 db 65,69,83,32,102,111,114,32,73,110,116,101,108,32,65,69
2420 db 83,45,78,73,44,32,67,82,89,80,84,79,71,65,77,83
2421 db 32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115
2422 db 115,108,46,111,114,103,62,0
2424 common _OPENSSL_ia32cap_P
16