5 section .text code
align=64
8 EXTERN OPENSSL_ia32cap_P
9 global sha256_block_data_order
12 sha256_block_data_order:
13 mov QWORD[8+rsp
],rdi
;WIN64 prologue
16 $L$
SEH_begin_sha256_block_data_order:
22 lea r11
,[OPENSSL_ia32cap_P
]
27 jnz NEAR $L$ssse3_shortcut
39 mov QWORD[((64+0))+rsp
],rdi
40 mov QWORD[((64+8))+rsp
],rsi
41 mov QWORD[((64+16))+rsp
],rdx
42 mov QWORD[((64+24))+rsp
],r11
51 mov r10d
,DWORD[24+rdi
]
52 mov r11d
,DWORD[28+rdi
]
101 mov r12d
,DWORD[4+rsi
]
112 mov DWORD[4+rsp
],r12d
142 mov r12d
,DWORD[8+rsi
]
153 mov DWORD[8+rsp
],r12d
183 mov r12d
,DWORD[12+rsi
]
194 mov DWORD[12+rsp
],r12d
224 mov r12d
,DWORD[16+rsi
]
235 mov DWORD[16+rsp
],r12d
265 mov r12d
,DWORD[20+rsi
]
276 mov DWORD[20+rsp
],r12d
306 mov r12d
,DWORD[24+rsi
]
317 mov DWORD[24+rsp
],r12d
347 mov r12d
,DWORD[28+rsi
]
358 mov DWORD[28+rsp
],r12d
388 mov r12d
,DWORD[32+rsi
]
399 mov DWORD[32+rsp
],r12d
429 mov r12d
,DWORD[36+rsi
]
440 mov DWORD[36+rsp
],r12d
470 mov r12d
,DWORD[40+rsi
]
481 mov DWORD[40+rsp
],r12d
511 mov r12d
,DWORD[44+rsi
]
522 mov DWORD[44+rsp
],r12d
552 mov r12d
,DWORD[48+rsi
]
563 mov DWORD[48+rsp
],r12d
593 mov r12d
,DWORD[52+rsi
]
604 mov DWORD[52+rsp
],r12d
634 mov r12d
,DWORD[56+rsi
]
645 mov DWORD[56+rsp
],r12d
675 mov r12d
,DWORD[60+rsi
]
686 mov DWORD[60+rsp
],r12d
715 jmp NEAR $L$rounds_16_xx
718 mov r13d
,DWORD[4+rsp
]
719 mov r15d
,DWORD[56+rsp
]
736 add r12d
,DWORD[36+rsp
]
778 mov r13d
,DWORD[8+rsp
]
779 mov edi,DWORD[60+rsp
]
796 add r12d
,DWORD[40+rsp
]
798 add r12d
,DWORD[4+rsp
]
809 mov DWORD[4+rsp
],r12d
838 mov r13d
,DWORD[12+rsp
]
856 add r12d
,DWORD[44+rsp
]
858 add r12d
,DWORD[8+rsp
]
869 mov DWORD[8+rsp
],r12d
898 mov r13d
,DWORD[16+rsp
]
916 add r12d
,DWORD[48+rsp
]
918 add r12d
,DWORD[12+rsp
]
929 mov DWORD[12+rsp
],r12d
958 mov r13d
,DWORD[20+rsp
]
959 mov r15d
,DWORD[8+rsp
]
976 add r12d
,DWORD[52+rsp
]
978 add r12d
,DWORD[16+rsp
]
989 mov DWORD[16+rsp
],r12d
1018 mov r13d
,DWORD[24+rsp
]
1019 mov edi,DWORD[12+rsp
]
1036 add r12d
,DWORD[56+rsp
]
1038 add r12d
,DWORD[20+rsp
]
1049 mov DWORD[20+rsp
],r12d
1078 mov r13d
,DWORD[28+rsp
]
1079 mov r15d
,DWORD[16+rsp
]
1096 add r12d
,DWORD[60+rsp
]
1098 add r12d
,DWORD[24+rsp
]
1109 mov DWORD[24+rsp
],r12d
1138 mov r13d
,DWORD[32+rsp
]
1139 mov edi,DWORD[20+rsp
]
1158 add r12d
,DWORD[28+rsp
]
1169 mov DWORD[28+rsp
],r12d
1198 mov r13d
,DWORD[36+rsp
]
1199 mov r15d
,DWORD[24+rsp
]
1216 add r12d
,DWORD[4+rsp
]
1218 add r12d
,DWORD[32+rsp
]
1229 mov DWORD[32+rsp
],r12d
1258 mov r13d
,DWORD[40+rsp
]
1259 mov edi,DWORD[28+rsp
]
1276 add r12d
,DWORD[8+rsp
]
1278 add r12d
,DWORD[36+rsp
]
1289 mov DWORD[36+rsp
],r12d
1318 mov r13d
,DWORD[44+rsp
]
1319 mov r15d
,DWORD[32+rsp
]
1336 add r12d
,DWORD[12+rsp
]
1338 add r12d
,DWORD[40+rsp
]
1349 mov DWORD[40+rsp
],r12d
1378 mov r13d
,DWORD[48+rsp
]
1379 mov edi,DWORD[36+rsp
]
1396 add r12d
,DWORD[16+rsp
]
1398 add r12d
,DWORD[44+rsp
]
1409 mov DWORD[44+rsp
],r12d
1438 mov r13d
,DWORD[52+rsp
]
1439 mov r15d
,DWORD[40+rsp
]
1456 add r12d
,DWORD[20+rsp
]
1458 add r12d
,DWORD[48+rsp
]
1469 mov DWORD[48+rsp
],r12d
1498 mov r13d
,DWORD[56+rsp
]
1499 mov edi,DWORD[44+rsp
]
1516 add r12d
,DWORD[24+rsp
]
1518 add r12d
,DWORD[52+rsp
]
1529 mov DWORD[52+rsp
],r12d
1558 mov r13d
,DWORD[60+rsp
]
1559 mov r15d
,DWORD[48+rsp
]
1576 add r12d
,DWORD[28+rsp
]
1578 add r12d
,DWORD[56+rsp
]
1589 mov DWORD[56+rsp
],r12d
1619 mov edi,DWORD[52+rsp
]
1636 add r12d
,DWORD[32+rsp
]
1638 add r12d
,DWORD[60+rsp
]
1649 mov DWORD[60+rsp
],r12d
1679 jnz NEAR $L$rounds_16_xx
1681 mov rdi
,QWORD[((64+0))+rsp
]
1686 add ebx,DWORD[4+rdi
]
1687 add ecx,DWORD[8+rdi
]
1688 add edx,DWORD[12+rdi
]
1689 add r8d
,DWORD[16+rdi
]
1690 add r9d
,DWORD[20+rdi
]
1691 add r10d
,DWORD[24+rdi
]
1692 add r11d
,DWORD[28+rdi
]
1694 cmp rsi
,QWORD[((64+16))+rsp
]
1697 mov DWORD[4+rdi
],ebx
1698 mov DWORD[8+rdi
],ecx
1699 mov DWORD[12+rdi
],edx
1700 mov DWORD[16+rdi
],r8d
1701 mov DWORD[20+rdi
],r9d
1702 mov DWORD[24+rdi
],r10d
1703 mov DWORD[28+rdi
],r11d
1706 mov rsi
,QWORD[((64+24))+rsp
]
1708 mov r14
,QWORD[8+rsi
]
1709 mov r13
,QWORD[16+rsi
]
1710 mov r12
,QWORD[24+rsi
]
1711 mov rbp
,QWORD[32+rsi
]
1712 mov rbx
,QWORD[40+rsi
]
1715 mov rdi
,QWORD[8+rsp
] ;WIN64 epilogue
1716 mov rsi
,QWORD[16+rsp
]
1717 DB 0F3h
,0C3h
;repret
1718 $L$
SEH_end_sha256_block_data_order:
1722 DD 0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5
1723 DD 0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5
1724 DD 0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5
1725 DD 0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5
1726 DD 0xd807aa98,0x12835b01,0x243185be,0x550c7dc3
1727 DD 0xd807aa98,0x12835b01,0x243185be,0x550c7dc3
1728 DD 0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174
1729 DD 0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174
1730 DD 0xe49b69c1,0xefbe4786,0x0fc19dc6,0x240ca1cc
1731 DD 0xe49b69c1,0xefbe4786,0x0fc19dc6,0x240ca1cc
1732 DD 0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da
1733 DD 0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da
1734 DD 0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7
1735 DD 0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7
1736 DD 0xc6e00bf3,0xd5a79147,0x06ca6351,0x14292967
1737 DD 0xc6e00bf3,0xd5a79147,0x06ca6351,0x14292967
1738 DD 0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13
1739 DD 0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13
1740 DD 0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85
1741 DD 0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85
1742 DD 0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc76c51a3
1743 DD 0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc76c51a3
1744 DD 0xd192e819,0xd6990624,0xf40e3585,0x106aa070
1745 DD 0xd192e819,0xd6990624,0xf40e3585,0x106aa070
1746 DD 0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5
1747 DD 0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5
1748 DD 0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3
1749 DD 0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3
1750 DD 0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208
1751 DD 0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208
1752 DD 0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2
1753 DD 0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2
1755 DD 0x00010203,0x04050607,0x08090a0b,0x0c0d0e0f
1756 DD 0x00010203,0x04050607,0x08090a0b,0x0c0d0e0f
1757 DD 0x03020100,0x0b0a0908,0xffffffff,0xffffffff
1758 DD 0x03020100,0x0b0a0908,0xffffffff,0xffffffff
1759 DD 0xffffffff,0xffffffff,0x03020100,0x0b0a0908
1760 DD 0xffffffff,0xffffffff,0x03020100,0x0b0a0908
1761 DB 83,72,65,50,53,54,32,98,108,111,99,107,32,116,114,97
1762 DB 110,115,102,111,114,109,32,102,111,114,32,120,56,54,95,54
1763 DB 52,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121
1764 DB 32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46
1768 sha256_block_data_order_ssse3:
1769 mov QWORD[8+rsp
],rdi
;WIN64 prologue
1770 mov QWORD[16+rsp
],rsi
1772 $L$
SEH_begin_sha256_block_data_order_ssse3:
1790 mov QWORD[((64+0))+rsp
],rdi
1791 mov QWORD[((64+8))+rsp
],rsi
1792 mov QWORD[((64+16))+rsp
],rdx
1793 mov QWORD[((64+24))+rsp
],r11
1794 movaps XMMWORD
[(64+32)+rsp
],xmm6
1795 movaps XMMWORD
[(64+48)+rsp
],xmm7
1796 movaps XMMWORD
[(64+64)+rsp
],xmm8
1797 movaps XMMWORD
[(64+80)+rsp
],xmm9
1801 mov ebx,DWORD[4+rdi
]
1802 mov ecx,DWORD[8+rdi
]
1803 mov edx,DWORD[12+rdi
]
1804 mov r8d
,DWORD[16+rdi
]
1805 mov r9d
,DWORD[20+rdi
]
1806 mov r10d
,DWORD[24+rdi
]
1807 mov r11d
,DWORD[28+rdi
]
1810 jmp NEAR $L$loop_ssse3
1813 movdqa xmm7
,XMMWORD
[((K256
+512))]
1814 movdqu xmm0
,XMMWORD
[rsi
]
1815 movdqu xmm1
,XMMWORD
[16+rsi
]
1816 movdqu xmm2
,XMMWORD
[32+rsi
]
1818 movdqu xmm3
,XMMWORD
[48+rsi
]
1821 movdqa xmm4
,XMMWORD
[rbp
]
1822 movdqa xmm5
,XMMWORD
[32+rbp
]
1825 movdqa xmm6
,XMMWORD
[64+rbp
]
1827 movdqa xmm7
,XMMWORD
[96+rbp
]
1831 movdqa XMMWORD
[rsp
],xmm4
1833 movdqa XMMWORD
[16+rsp
],xmm5
1835 movdqa XMMWORD
[32+rsp
],xmm6
1837 movdqa XMMWORD
[48+rsp
],xmm7
1839 jmp NEAR $L$ssse3_00_47
1854 DB 102,15,58,15,224,4
1857 DB 102,15,58,15,250,4
1878 pshufd xmm7
,xmm3
,250
1895 add r10d
,DWORD[4+rsp
]
1929 pshufd xmm7
,xmm7
,128
1931 add r9d
,DWORD[8+rsp
]
1965 add r8d
,DWORD[12+rsp
]
1973 movdqa xmm6
,XMMWORD
[rbp
]
1987 movdqa XMMWORD
[rsp
],xmm6
1998 DB 102,15,58,15,225,4
2001 DB 102,15,58,15,251,4
2002 add edx,DWORD[16+rsp
]
2022 pshufd xmm7
,xmm0
,250
2039 add ecx,DWORD[20+rsp
]
2073 pshufd xmm7
,xmm7
,128
2075 add ebx,DWORD[24+rsp
]
2109 add eax,DWORD[28+rsp
]
2117 movdqa xmm6
,XMMWORD
[32+rbp
]
2131 movdqa XMMWORD
[16+rsp
],xmm6
2142 DB 102,15,58,15,226,4
2145 DB 102,15,58,15,248,4
2146 add r11d
,DWORD[32+rsp
]
2166 pshufd xmm7
,xmm1
,250
2183 add r10d
,DWORD[36+rsp
]
2217 pshufd xmm7
,xmm7
,128
2219 add r9d
,DWORD[40+rsp
]
2253 add r8d
,DWORD[44+rsp
]
2261 movdqa xmm6
,XMMWORD
[64+rbp
]
2275 movdqa XMMWORD
[32+rsp
],xmm6
2286 DB 102,15,58,15,227,4
2289 DB 102,15,58,15,249,4
2290 add edx,DWORD[48+rsp
]
2310 pshufd xmm7
,xmm2
,250
2327 add ecx,DWORD[52+rsp
]
2361 pshufd xmm7
,xmm7
,128
2363 add ebx,DWORD[56+rsp
]
2397 add eax,DWORD[60+rsp
]
2405 movdqa xmm6
,XMMWORD
[96+rbp
]
2419 movdqa XMMWORD
[48+rsp
],xmm6
2421 jne NEAR $L$ssse3_00_47
2458 add r10d
,DWORD[4+rsp
]
2484 add r9d
,DWORD[8+rsp
]
2510 add r8d
,DWORD[12+rsp
]
2536 add edx,DWORD[16+rsp
]
2562 add ecx,DWORD[20+rsp
]
2588 add ebx,DWORD[24+rsp
]
2614 add eax,DWORD[28+rsp
]
2640 add r11d
,DWORD[32+rsp
]
2666 add r10d
,DWORD[36+rsp
]
2692 add r9d
,DWORD[40+rsp
]
2718 add r8d
,DWORD[44+rsp
]
2744 add edx,DWORD[48+rsp
]
2770 add ecx,DWORD[52+rsp
]
2796 add ebx,DWORD[56+rsp
]
2822 add eax,DWORD[60+rsp
]
2838 mov rdi
,QWORD[((64+0))+rsp
]
2843 add ebx,DWORD[4+rdi
]
2844 add ecx,DWORD[8+rdi
]
2845 add edx,DWORD[12+rdi
]
2846 add r8d
,DWORD[16+rdi
]
2847 add r9d
,DWORD[20+rdi
]
2848 add r10d
,DWORD[24+rdi
]
2849 add r11d
,DWORD[28+rdi
]
2851 cmp rsi
,QWORD[((64+16))+rsp
]
2854 mov DWORD[4+rdi
],ebx
2855 mov DWORD[8+rdi
],ecx
2856 mov DWORD[12+rdi
],edx
2857 mov DWORD[16+rdi
],r8d
2858 mov DWORD[20+rdi
],r9d
2859 mov DWORD[24+rdi
],r10d
2860 mov DWORD[28+rdi
],r11d
2861 jb NEAR $L$loop_ssse3
2863 mov rsi
,QWORD[((64+24))+rsp
]
2864 movaps xmm6
,XMMWORD
[((64+32))+rsp
]
2865 movaps xmm7
,XMMWORD
[((64+48))+rsp
]
2866 movaps xmm8
,XMMWORD
[((64+64))+rsp
]
2867 movaps xmm9
,XMMWORD
[((64+80))+rsp
]
2869 mov r14
,QWORD[8+rsi
]
2870 mov r13
,QWORD[16+rsi
]
2871 mov r12
,QWORD[24+rsi
]
2872 mov rbp
,QWORD[32+rsi
]
2873 mov rbx
,QWORD[40+rsi
]
2876 mov rdi
,QWORD[8+rsp
] ;WIN64 epilogue
2877 mov rsi
,QWORD[16+rsp
]
2878 DB 0F3h
,0C3h
;repret
2879 $L$
SEH_end_sha256_block_data_order_ssse3:
2880 EXTERN __imp_RtlVirtualUnwind
2895 mov rax
,QWORD[120+r8
]
2896 mov rbx
,QWORD[248+r8
]
2899 mov r11
,QWORD[56+r9
]
2904 jb NEAR $L$in_prologue
2906 mov rax
,QWORD[152+r8
]
2908 mov r10d
,DWORD[4+r11
]
2911 jae NEAR $L$in_prologue
2913 mov rax
,QWORD[((64+24))+rax
]
2916 mov rbx
,QWORD[((-8))+rax
]
2917 mov rbp
,QWORD[((-16))+rax
]
2918 mov r12
,QWORD[((-24))+rax
]
2919 mov r13
,QWORD[((-32))+rax
]
2920 mov r14
,QWORD[((-40))+rax
]
2921 mov r15
,QWORD[((-48))+rax
]
2922 mov QWORD[144+r8
],rbx
2923 mov QWORD[160+r8
],rbp
2924 mov QWORD[216+r8
],r12
2925 mov QWORD[224+r8
],r13
2926 mov QWORD[232+r8
],r14
2927 mov QWORD[240+r8
],r15
2929 lea r10
,[$L
$epilogue
]
2931 jb NEAR $L$in_prologue
2933 lea rsi
,[((64+32))+rsi
]
2939 mov rdi
,QWORD[8+rax
]
2940 mov rsi
,QWORD[16+rax
]
2941 mov QWORD[152+r8
],rax
2942 mov QWORD[168+r8
],rsi
2943 mov QWORD[176+r8
],rdi
2945 mov rdi
,QWORD[40+r9
]
2952 mov rdx
,QWORD[8+rsi
]
2954 mov r9
,QWORD[16+rsi
]
2955 mov r10
,QWORD[40+rsi
]
2958 mov QWORD[32+rsp
],r10
2959 mov QWORD[40+rsp
],r11
2960 mov QWORD[48+rsp
],r12
2961 mov QWORD[56+rsp
],rcx
2962 call QWORD[__imp_RtlVirtualUnwind
]
2975 DB 0F3h
,0C3h
;repret
2977 section .pdata rdata
align=4
2979 DD $L$SEH_begin_sha256_block_data_order wrt ..imagebase
2980 DD $L$SEH_end_sha256_block_data_order wrt ..imagebase
2981 DD $L$SEH_info_sha256_block_data_order wrt ..imagebase
2982 DD $L$SEH_begin_sha256_block_data_order_ssse3 wrt ..imagebase
2983 DD $L$SEH_end_sha256_block_data_order_ssse3 wrt ..imagebase
2984 DD $L$SEH_info_sha256_block_data_order_ssse3 wrt ..imagebase
2985 section .xdata rdata
align=8
2987 $L$
SEH_info_sha256_block_data_order:
2989 DD se_handler wrt ..imagebase
2990 DD $L$prologue wrt ..imagebase
,$L
$epilogue wrt ..imagebase
2991 $L$
SEH_info_sha256_block_data_order_ssse3:
2993 DD se_handler wrt ..imagebase
2994 DD $L$prologue_ssse3 wrt ..imagebase
,$L
$epilogue_ssse
3 wrt ..imagebase