Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1968 lines
44 KiB

  1. include ksamd64.inc
  2. EXTERNDEF ?Te@rdtable@CryptoPP@@3PA_KA:FAR
  3. EXTERNDEF ?g_cacheLineSize@CryptoPP@@3IA:FAR
  4. EXTERNDEF ?SHA256_K@CryptoPP@@3QBIB:FAR
  5. .CODE
  6. ALIGN 8
  7. Baseline_Add PROC
  8. lea rdx, [rdx+8*rcx]
  9. lea r8, [r8+8*rcx]
  10. lea r9, [r9+8*rcx]
  11. neg rcx ; rcx is negative index
  12. jz $1@Baseline_Add
  13. mov rax,[r8+8*rcx]
  14. add rax,[r9+8*rcx]
  15. mov [rdx+8*rcx],rax
  16. $0@Baseline_Add:
  17. mov rax,[r8+8*rcx+8]
  18. adc rax,[r9+8*rcx+8]
  19. mov [rdx+8*rcx+8],rax
  20. lea rcx,[rcx+2] ; advance index, avoid inc which causes slowdown on Intel Core 2
  21. jrcxz $1@Baseline_Add ; loop until rcx overflows and becomes zero
  22. mov rax,[r8+8*rcx]
  23. adc rax,[r9+8*rcx]
  24. mov [rdx+8*rcx],rax
  25. jmp $0@Baseline_Add
  26. $1@Baseline_Add:
  27. mov rax, 0
  28. adc rax, rax ; store carry into rax (return result register)
  29. ret
  30. Baseline_Add ENDP
  31. ALIGN 8
  32. Baseline_Sub PROC
  33. lea rdx, [rdx+8*rcx]
  34. lea r8, [r8+8*rcx]
  35. lea r9, [r9+8*rcx]
  36. neg rcx ; rcx is negative index
  37. jz $1@Baseline_Sub
  38. mov rax,[r8+8*rcx]
  39. sub rax,[r9+8*rcx]
  40. mov [rdx+8*rcx],rax
  41. $0@Baseline_Sub:
  42. mov rax,[r8+8*rcx+8]
  43. sbb rax,[r9+8*rcx+8]
  44. mov [rdx+8*rcx+8],rax
  45. lea rcx,[rcx+2] ; advance index, avoid inc which causes slowdown on Intel Core 2
  46. jrcxz $1@Baseline_Sub ; loop until rcx overflows and becomes zero
  47. mov rax,[r8+8*rcx]
  48. sbb rax,[r9+8*rcx]
  49. mov [rdx+8*rcx],rax
  50. jmp $0@Baseline_Sub
  51. $1@Baseline_Sub:
  52. mov rax, 0
  53. adc rax, rax ; store carry into rax (return result register)
  54. ret
  55. Baseline_Sub ENDP
  56. ALIGN 8
  57. Rijndael_Enc_AdvancedProcessBlocks PROC FRAME
  58. rex_push_reg rsi
  59. push_reg rdi
  60. push_reg rbx
  61. push_reg r12
  62. .endprolog
  63. mov r8, rcx
  64. mov r11, ?Te@rdtable@CryptoPP@@3PA_KA
  65. mov edi, DWORD PTR [?g_cacheLineSize@CryptoPP@@3IA]
  66. mov rsi, [(r8+16*19)]
  67. mov rax, 16
  68. and rax, rsi
  69. movdqa xmm3, XMMWORD PTR [rdx+16+rax]
  70. movdqa [(r8+16*12)], xmm3
  71. lea rax, [rdx+rax+2*16]
  72. sub rax, rsi
  73. label0:
  74. movdqa xmm0, [rax+rsi]
  75. movdqa XMMWORD PTR [(r8+0)+rsi], xmm0
  76. add rsi, 16
  77. cmp rsi, 16*12
  78. jl label0
  79. movdqa xmm4, [rax+rsi]
  80. movdqa xmm1, [rdx]
  81. mov r12d, [rdx+4*4]
  82. mov ebx, [rdx+5*4]
  83. mov ecx, [rdx+6*4]
  84. mov edx, [rdx+7*4]
  85. xor rax, rax
  86. label9:
  87. mov esi, [r11+rax]
  88. add rax, rdi
  89. mov esi, [r11+rax]
  90. add rax, rdi
  91. mov esi, [r11+rax]
  92. add rax, rdi
  93. mov esi, [r11+rax]
  94. add rax, rdi
  95. cmp rax, 2048
  96. jl label9
  97. lfence
  98. test DWORD PTR [(r8+16*18+8)], 1
  99. jz label8
  100. mov rsi, [(r8+16*14)]
  101. movdqu xmm2, [rsi]
  102. pxor xmm2, xmm1
  103. psrldq xmm1, 14
  104. movd eax, xmm1
  105. mov al, BYTE PTR [rsi+15]
  106. mov r10d, eax
  107. movd eax, xmm2
  108. psrldq xmm2, 4
  109. movd edi, xmm2
  110. psrldq xmm2, 4
  111. movzx esi, al
  112. xor r12d, DWORD PTR [r11+8*rsi+(((0+3) MOD (4))+1)]
  113. movzx esi, ah
  114. xor edx, DWORD PTR [r11+8*rsi+(((1+3) MOD (4))+1)]
  115. shr eax, 16
  116. movzx esi, al
  117. xor ecx, DWORD PTR [r11+8*rsi+(((2+3) MOD (4))+1)]
  118. movzx esi, ah
  119. xor ebx, DWORD PTR [r11+8*rsi+(((3+3) MOD (4))+1)]
  120. mov eax, edi
  121. movd edi, xmm2
  122. psrldq xmm2, 4
  123. movzx esi, al
  124. xor ebx, DWORD PTR [r11+8*rsi+(((0+3) MOD (4))+1)]
  125. movzx esi, ah
  126. xor r12d, DWORD PTR [r11+8*rsi+(((1+3) MOD (4))+1)]
  127. shr eax, 16
  128. movzx esi, al
  129. xor edx, DWORD PTR [r11+8*rsi+(((2+3) MOD (4))+1)]
  130. movzx esi, ah
  131. xor ecx, DWORD PTR [r11+8*rsi+(((3+3) MOD (4))+1)]
  132. mov eax, edi
  133. movd edi, xmm2
  134. movzx esi, al
  135. xor ecx, DWORD PTR [r11+8*rsi+(((0+3) MOD (4))+1)]
  136. movzx esi, ah
  137. xor ebx, DWORD PTR [r11+8*rsi+(((1+3) MOD (4))+1)]
  138. shr eax, 16
  139. movzx esi, al
  140. xor r12d, DWORD PTR [r11+8*rsi+(((2+3) MOD (4))+1)]
  141. movzx esi, ah
  142. xor edx, DWORD PTR [r11+8*rsi+(((3+3) MOD (4))+1)]
  143. mov eax, edi
  144. movzx esi, al
  145. xor edx, DWORD PTR [r11+8*rsi+(((0+3) MOD (4))+1)]
  146. movzx esi, ah
  147. xor ecx, DWORD PTR [r11+8*rsi+(((1+3) MOD (4))+1)]
  148. shr eax, 16
  149. movzx esi, al
  150. xor ebx, DWORD PTR [r11+8*rsi+(((2+3) MOD (4))+1)]
  151. psrldq xmm2, 3
  152. mov eax, [(r8+16*12)+0*4]
  153. mov edi, [(r8+16*12)+2*4]
  154. mov r9d, [(r8+16*12)+3*4]
  155. movzx esi, cl
  156. xor r9d, DWORD PTR [r11+8*rsi+(((3+3) MOD (4))+1)]
  157. movzx esi, bl
  158. xor edi, DWORD PTR [r11+8*rsi+(((3+3) MOD (4))+1)]
  159. movzx esi, bh
  160. xor r9d, DWORD PTR [r11+8*rsi+(((2+3) MOD (4))+1)]
  161. shr ebx, 16
  162. movzx esi, bl
  163. xor eax, DWORD PTR [r11+8*rsi+(((1+3) MOD (4))+1)]
  164. movzx esi, bh
  165. mov ebx, DWORD PTR [r11+8*rsi+(((0+3) MOD (4))+1)]
  166. xor ebx, [(r8+16*12)+1*4]
  167. movzx esi, ch
  168. xor eax, DWORD PTR [r11+8*rsi+(((2+3) MOD (4))+1)]
  169. shr ecx, 16
  170. movzx esi, dl
  171. xor eax, DWORD PTR [r11+8*rsi+(((3+3) MOD (4))+1)]
  172. movzx esi, dh
  173. xor ebx, DWORD PTR [r11+8*rsi+(((2+3) MOD (4))+1)]
  174. shr edx, 16
  175. movzx esi, ch
  176. xor edi, DWORD PTR [r11+8*rsi+(((0+3) MOD (4))+1)]
  177. movzx esi, cl
  178. xor ebx, DWORD PTR [r11+8*rsi+(((1+3) MOD (4))+1)]
  179. movzx esi, dl
  180. xor edi, DWORD PTR [r11+8*rsi+(((1+3) MOD (4))+1)]
  181. movzx esi, dh
  182. xor r9d, DWORD PTR [r11+8*rsi+(((0+3) MOD (4))+1)]
  183. movd ecx, xmm2
  184. mov edx, r12d
  185. mov [(r8+0)+3*4], r9d
  186. mov [(r8+0)+0*4], eax
  187. mov [(r8+0)+1*4], ebx
  188. mov [(r8+0)+2*4], edi
  189. jmp label5
  190. label3:
  191. mov r12d, [(r8+16*12)+0*4]
  192. mov ebx, [(r8+16*12)+1*4]
  193. mov ecx, [(r8+16*12)+2*4]
  194. mov edx, [(r8+16*12)+3*4]
  195. label8:
  196. mov rax, [(r8+16*14)]
  197. movdqu xmm2, [rax]
  198. mov rsi, [(r8+16*14)+8]
  199. movdqu xmm5, [rsi]
  200. pxor xmm2, xmm1
  201. pxor xmm2, xmm5
  202. movd eax, xmm2
  203. psrldq xmm2, 4
  204. movd edi, xmm2
  205. psrldq xmm2, 4
  206. movzx esi, al
  207. xor r12d, DWORD PTR [r11+8*rsi+(((0+3) MOD (4))+1)]
  208. movzx esi, ah
  209. xor edx, DWORD PTR [r11+8*rsi+(((1+3) MOD (4))+1)]
  210. shr eax, 16
  211. movzx esi, al
  212. xor ecx, DWORD PTR [r11+8*rsi+(((2+3) MOD (4))+1)]
  213. movzx esi, ah
  214. xor ebx, DWORD PTR [r11+8*rsi+(((3+3) MOD (4))+1)]
  215. mov eax, edi
  216. movd edi, xmm2
  217. psrldq xmm2, 4
  218. movzx esi, al
  219. xor ebx, DWORD PTR [r11+8*rsi+(((0+3) MOD (4))+1)]
  220. movzx esi, ah
  221. xor r12d, DWORD PTR [r11+8*rsi+(((1+3) MOD (4))+1)]
  222. shr eax, 16
  223. movzx esi, al
  224. xor edx, DWORD PTR [r11+8*rsi+(((2+3) MOD (4))+1)]
  225. movzx esi, ah
  226. xor ecx, DWORD PTR [r11+8*rsi+(((3+3) MOD (4))+1)]
  227. mov eax, edi
  228. movd edi, xmm2
  229. movzx esi, al
  230. xor ecx, DWORD PTR [r11+8*rsi+(((0+3) MOD (4))+1)]
  231. movzx esi, ah
  232. xor ebx, DWORD PTR [r11+8*rsi+(((1+3) MOD (4))+1)]
  233. shr eax, 16
  234. movzx esi, al
  235. xor r12d, DWORD PTR [r11+8*rsi+(((2+3) MOD (4))+1)]
  236. movzx esi, ah
  237. xor edx, DWORD PTR [r11+8*rsi+(((3+3) MOD (4))+1)]
  238. mov eax, edi
  239. movzx esi, al
  240. xor edx, DWORD PTR [r11+8*rsi+(((0+3) MOD (4))+1)]
  241. movzx esi, ah
  242. xor ecx, DWORD PTR [r11+8*rsi+(((1+3) MOD (4))+1)]
  243. shr eax, 16
  244. movzx esi, al
  245. xor ebx, DWORD PTR [r11+8*rsi+(((2+3) MOD (4))+1)]
  246. movzx esi, ah
  247. xor r12d, DWORD PTR [r11+8*rsi+(((3+3) MOD (4))+1)]
  248. mov eax, r12d
  249. add r8, [(r8+16*19)]
  250. add r8, 4*16
  251. jmp label2
  252. label1:
  253. mov ecx, r10d
  254. mov edx, r12d
  255. mov eax, [(r8+0)+0*4]
  256. mov ebx, [(r8+0)+1*4]
  257. xor cl, ch
  258. and rcx, 255
  259. label5:
  260. add r10d, 1
  261. xor edx, DWORD PTR [r11+rcx*8+3]
  262. movzx esi, dl
  263. xor ebx, DWORD PTR [r11+8*rsi+(((3+3) MOD (4))+1)]
  264. movzx esi, dh
  265. mov ecx, DWORD PTR [r11+8*rsi+(((2+3) MOD (4))+1)]
  266. shr edx, 16
  267. xor ecx, [(r8+0)+2*4]
  268. movzx esi, dh
  269. xor eax, DWORD PTR [r11+8*rsi+(((0+3) MOD (4))+1)]
  270. movzx esi, dl
  271. mov edx, DWORD PTR [r11+8*rsi+(((1+3) MOD (4))+1)]
  272. xor edx, [(r8+0)+3*4]
  273. add r8, [(r8+16*19)]
  274. add r8, 3*16
  275. jmp label4
  276. label2:
  277. mov r9d, [(r8+0)-4*16+3*4]
  278. mov edi, [(r8+0)-4*16+2*4]
  279. movzx esi, cl
  280. xor r9d, DWORD PTR [r11+8*rsi+(((3+3) MOD (4))+1)]
  281. mov cl, al
  282. movzx esi, ah
  283. xor edi, DWORD PTR [r11+8*rsi+(((2+3) MOD (4))+1)]
  284. shr eax, 16
  285. movzx esi, bl
  286. xor edi, DWORD PTR [r11+8*rsi+(((3+3) MOD (4))+1)]
  287. movzx esi, bh
  288. xor r9d, DWORD PTR [r11+8*rsi+(((2+3) MOD (4))+1)]
  289. shr ebx, 16
  290. movzx esi, al
  291. xor r9d, DWORD PTR [r11+8*rsi+(((1+3) MOD (4))+1)]
  292. movzx esi, ah
  293. mov eax, DWORD PTR [r11+8*rsi+(((0+3) MOD (4))+1)]
  294. movzx esi, bl
  295. xor eax, DWORD PTR [r11+8*rsi+(((1+3) MOD (4))+1)]
  296. movzx esi, bh
  297. mov ebx, DWORD PTR [r11+8*rsi+(((0+3) MOD (4))+1)]
  298. movzx esi, ch
  299. xor eax, DWORD PTR [r11+8*rsi+(((2+3) MOD (4))+1)]
  300. movzx esi, cl
  301. xor ebx, DWORD PTR [r11+8*rsi+(((3+3) MOD (4))+1)]
  302. shr ecx, 16
  303. movzx esi, dl
  304. xor eax, DWORD PTR [r11+8*rsi+(((3+3) MOD (4))+1)]
  305. movzx esi, dh
  306. xor ebx, DWORD PTR [r11+8*rsi+(((2+3) MOD (4))+1)]
  307. shr edx, 16
  308. movzx esi, ch
  309. xor edi, DWORD PTR [r11+8*rsi+(((0+3) MOD (4))+1)]
  310. movzx esi, cl
  311. xor ebx, DWORD PTR [r11+8*rsi+(((1+3) MOD (4))+1)]
  312. movzx esi, dl
  313. xor edi, DWORD PTR [r11+8*rsi+(((1+3) MOD (4))+1)]
  314. movzx esi, dh
  315. xor r9d, DWORD PTR [r11+8*rsi+(((0+3) MOD (4))+1)]
  316. mov ecx, edi
  317. xor eax, [(r8+0)-4*16+0*4]
  318. xor ebx, [(r8+0)-4*16+1*4]
  319. mov edx, r9d
  320. label4:
  321. mov r9d, [(r8+0)-4*16+7*4]
  322. mov edi, [(r8+0)-4*16+6*4]
  323. movzx esi, cl
  324. xor r9d, DWORD PTR [r11+8*rsi+(((3+3) MOD (4))+1)]
  325. mov cl, al
  326. movzx esi, ah
  327. xor edi, DWORD PTR [r11+8*rsi+(((2+3) MOD (4))+1)]
  328. shr eax, 16
  329. movzx esi, bl
  330. xor edi, DWORD PTR [r11+8*rsi+(((3+3) MOD (4))+1)]
  331. movzx esi, bh
  332. xor r9d, DWORD PTR [r11+8*rsi+(((2+3) MOD (4))+1)]
  333. shr ebx, 16
  334. movzx esi, al
  335. xor r9d, DWORD PTR [r11+8*rsi+(((1+3) MOD (4))+1)]
  336. movzx esi, ah
  337. mov eax, DWORD PTR [r11+8*rsi+(((0+3) MOD (4))+1)]
  338. movzx esi, bl
  339. xor eax, DWORD PTR [r11+8*rsi+(((1+3) MOD (4))+1)]
  340. movzx esi, bh
  341. mov ebx, DWORD PTR [r11+8*rsi+(((0+3) MOD (4))+1)]
  342. movzx esi, ch
  343. xor eax, DWORD PTR [r11+8*rsi+(((2+3) MOD (4))+1)]
  344. movzx esi, cl
  345. xor ebx, DWORD PTR [r11+8*rsi+(((3+3) MOD (4))+1)]
  346. shr ecx, 16
  347. movzx esi, dl
  348. xor eax, DWORD PTR [r11+8*rsi+(((3+3) MOD (4))+1)]
  349. movzx esi, dh
  350. xor ebx, DWORD PTR [r11+8*rsi+(((2+3) MOD (4))+1)]
  351. shr edx, 16
  352. movzx esi, ch
  353. xor edi, DWORD PTR [r11+8*rsi+(((0+3) MOD (4))+1)]
  354. movzx esi, cl
  355. xor ebx, DWORD PTR [r11+8*rsi+(((1+3) MOD (4))+1)]
  356. movzx esi, dl
  357. xor edi, DWORD PTR [r11+8*rsi+(((1+3) MOD (4))+1)]
  358. movzx esi, dh
  359. xor r9d, DWORD PTR [r11+8*rsi+(((0+3) MOD (4))+1)]
  360. mov ecx, edi
  361. xor eax, [(r8+0)-4*16+4*4]
  362. xor ebx, [(r8+0)-4*16+5*4]
  363. mov edx, r9d
  364. add r8, 32
  365. test r8, 255
  366. jnz label2
  367. sub r8, 16*16
  368. movzx esi, ch
  369. movzx edi, BYTE PTR [r11+rsi*8+1]
  370. movzx esi, dl
  371. xor edi, DWORD PTR [r11+rsi*8+0]
  372. mov WORD PTR [(r8+16*13)+2], di
  373. movzx esi, dh
  374. movzx edi, BYTE PTR [r11+rsi*8+1]
  375. movzx esi, al
  376. xor edi, DWORD PTR [r11+rsi*8+0]
  377. mov WORD PTR [(r8+16*13)+6], di
  378. shr edx, 16
  379. movzx esi, ah
  380. movzx edi, BYTE PTR [r11+rsi*8+1]
  381. movzx esi, bl
  382. xor edi, DWORD PTR [r11+rsi*8+0]
  383. mov WORD PTR [(r8+16*13)+10], di
  384. shr eax, 16
  385. movzx esi, bh
  386. movzx edi, BYTE PTR [r11+rsi*8+1]
  387. movzx esi, cl
  388. xor edi, DWORD PTR [r11+rsi*8+0]
  389. mov WORD PTR [(r8+16*13)+14], di
  390. shr ebx, 16
  391. movzx esi, dh
  392. movzx edi, BYTE PTR [r11+rsi*8+1]
  393. movzx esi, al
  394. xor edi, DWORD PTR [r11+rsi*8+0]
  395. mov WORD PTR [(r8+16*13)+12], di
  396. shr ecx, 16
  397. movzx esi, ah
  398. movzx edi, BYTE PTR [r11+rsi*8+1]
  399. movzx esi, bl
  400. xor edi, DWORD PTR [r11+rsi*8+0]
  401. mov WORD PTR [(r8+16*13)+0], di
  402. movzx esi, bh
  403. movzx edi, BYTE PTR [r11+rsi*8+1]
  404. movzx esi, cl
  405. xor edi, DWORD PTR [r11+rsi*8+0]
  406. mov WORD PTR [(r8+16*13)+4], di
  407. movzx esi, ch
  408. movzx edi, BYTE PTR [r11+rsi*8+1]
  409. movzx esi, dl
  410. xor edi, DWORD PTR [r11+rsi*8+0]
  411. mov WORD PTR [(r8+16*13)+8], di
  412. mov rax, [(r8+16*14)+16]
  413. mov rbx, [(r8+16*14)+24]
  414. mov rcx, [(r8+16*18+8)]
  415. sub rcx, 16
  416. movdqu xmm2, [rax]
  417. pxor xmm2, xmm4
  418. movdqa xmm0, [(r8+16*16)+16]
  419. paddq xmm0, [(r8+16*14)+16]
  420. movdqa [(r8+16*14)+16], xmm0
  421. pxor xmm2, [(r8+16*13)]
  422. movdqu [rbx], xmm2
  423. jle label7
  424. mov [(r8+16*18+8)], rcx
  425. test rcx, 1
  426. jnz label1
  427. movdqa xmm0, [(r8+16*16)]
  428. paddq xmm0, [(r8+16*14)]
  429. movdqa [(r8+16*14)], xmm0
  430. jmp label3
  431. label7:
  432. xorps xmm0, xmm0
  433. lea rax, [(r8+0)+7*16]
  434. movaps [rax-7*16], xmm0
  435. movaps [rax-6*16], xmm0
  436. movaps [rax-5*16], xmm0
  437. movaps [rax-4*16], xmm0
  438. movaps [rax-3*16], xmm0
  439. movaps [rax-2*16], xmm0
  440. movaps [rax-1*16], xmm0
  441. movaps [rax+0*16], xmm0
  442. movaps [rax+1*16], xmm0
  443. movaps [rax+2*16], xmm0
  444. movaps [rax+3*16], xmm0
  445. movaps [rax+4*16], xmm0
  446. movaps [rax+5*16], xmm0
  447. movaps [rax+6*16], xmm0
  448. pop r12
  449. pop rbx
  450. pop rdi
  451. pop rsi
  452. ret
  453. Rijndael_Enc_AdvancedProcessBlocks ENDP
  454. ALIGN 8
  455. GCM_AuthenticateBlocks_2K PROC FRAME
  456. rex_push_reg rsi
  457. push_reg rdi
  458. push_reg rbx
  459. .endprolog
  460. mov rsi, r8
  461. mov r11, r9
  462. movdqa xmm0, [rsi]
  463. label0:
  464. movdqu xmm4, [rcx]
  465. pxor xmm0, xmm4
  466. movd ebx, xmm0
  467. mov eax, 0f0f0f0f0h
  468. and eax, ebx
  469. shl ebx, 4
  470. and ebx, 0f0f0f0f0h
  471. movzx edi, ah
  472. movdqa xmm5, XMMWORD PTR [rsi + 32 + 1024 + rdi]
  473. movzx edi, al
  474. movdqa xmm4, XMMWORD PTR [rsi + 32 + 1024 + rdi]
  475. shr eax, 16
  476. movzx edi, ah
  477. movdqa xmm3, XMMWORD PTR [rsi + 32 + 1024 + rdi]
  478. movzx edi, al
  479. movdqa xmm2, XMMWORD PTR [rsi + 32 + 1024 + rdi]
  480. psrldq xmm0, 4
  481. movd eax, xmm0
  482. and eax, 0f0f0f0f0h
  483. movzx edi, bh
  484. pxor xmm5, XMMWORD PTR [rsi + 32 + (1-1)*256 + rdi]
  485. movzx edi, bl
  486. pxor xmm4, XMMWORD PTR [rsi + 32 + (1-1)*256 + rdi]
  487. shr ebx, 16
  488. movzx edi, bh
  489. pxor xmm3, XMMWORD PTR [rsi + 32 + (1-1)*256 + rdi]
  490. movzx edi, bl
  491. pxor xmm2, XMMWORD PTR [rsi + 32 + (1-1)*256 + rdi]
  492. movd ebx, xmm0
  493. shl ebx, 4
  494. and ebx, 0f0f0f0f0h
  495. movzx edi, ah
  496. pxor xmm5, XMMWORD PTR [rsi + 32 + 1024 + 1*256 + rdi]
  497. movzx edi, al
  498. pxor xmm4, XMMWORD PTR [rsi + 32 + 1024 + 1*256 + rdi]
  499. shr eax, 16
  500. movzx edi, ah
  501. pxor xmm3, XMMWORD PTR [rsi + 32 + 1024 + 1*256 + rdi]
  502. movzx edi, al
  503. pxor xmm2, XMMWORD PTR [rsi + 32 + 1024 + 1*256 + rdi]
  504. psrldq xmm0, 4
  505. movd eax, xmm0
  506. and eax, 0f0f0f0f0h
  507. movzx edi, bh
  508. pxor xmm5, XMMWORD PTR [rsi + 32 + (2-1)*256 + rdi]
  509. movzx edi, bl
  510. pxor xmm4, XMMWORD PTR [rsi + 32 + (2-1)*256 + rdi]
  511. shr ebx, 16
  512. movzx edi, bh
  513. pxor xmm3, XMMWORD PTR [rsi + 32 + (2-1)*256 + rdi]
  514. movzx edi, bl
  515. pxor xmm2, XMMWORD PTR [rsi + 32 + (2-1)*256 + rdi]
  516. movd ebx, xmm0
  517. shl ebx, 4
  518. and ebx, 0f0f0f0f0h
  519. movzx edi, ah
  520. pxor xmm5, XMMWORD PTR [rsi + 32 + 1024 + 2*256 + rdi]
  521. movzx edi, al
  522. pxor xmm4, XMMWORD PTR [rsi + 32 + 1024 + 2*256 + rdi]
  523. shr eax, 16
  524. movzx edi, ah
  525. pxor xmm3, XMMWORD PTR [rsi + 32 + 1024 + 2*256 + rdi]
  526. movzx edi, al
  527. pxor xmm2, XMMWORD PTR [rsi + 32 + 1024 + 2*256 + rdi]
  528. psrldq xmm0, 4
  529. movd eax, xmm0
  530. and eax, 0f0f0f0f0h
  531. movzx edi, bh
  532. pxor xmm5, XMMWORD PTR [rsi + 32 + (3-1)*256 + rdi]
  533. movzx edi, bl
  534. pxor xmm4, XMMWORD PTR [rsi + 32 + (3-1)*256 + rdi]
  535. shr ebx, 16
  536. movzx edi, bh
  537. pxor xmm3, XMMWORD PTR [rsi + 32 + (3-1)*256 + rdi]
  538. movzx edi, bl
  539. pxor xmm2, XMMWORD PTR [rsi + 32 + (3-1)*256 + rdi]
  540. movd ebx, xmm0
  541. shl ebx, 4
  542. and ebx, 0f0f0f0f0h
  543. movzx edi, ah
  544. pxor xmm5, XMMWORD PTR [rsi + 32 + 1024 + 3*256 + rdi]
  545. movzx edi, al
  546. pxor xmm4, XMMWORD PTR [rsi + 32 + 1024 + 3*256 + rdi]
  547. shr eax, 16
  548. movzx edi, ah
  549. pxor xmm3, XMMWORD PTR [rsi + 32 + 1024 + 3*256 + rdi]
  550. movzx edi, al
  551. pxor xmm2, XMMWORD PTR [rsi + 32 + 1024 + 3*256 + rdi]
  552. movzx edi, bh
  553. pxor xmm5, XMMWORD PTR [rsi + 32 + 3*256 + rdi]
  554. movzx edi, bl
  555. pxor xmm4, XMMWORD PTR [rsi + 32 + 3*256 + rdi]
  556. shr ebx, 16
  557. movzx edi, bh
  558. pxor xmm3, XMMWORD PTR [rsi + 32 + 3*256 + rdi]
  559. movzx edi, bl
  560. pxor xmm2, XMMWORD PTR [rsi + 32 + 3*256 + rdi]
  561. movdqa xmm0, xmm3
  562. pslldq xmm3, 1
  563. pxor xmm2, xmm3
  564. movdqa xmm1, xmm2
  565. pslldq xmm2, 1
  566. pxor xmm5, xmm2
  567. psrldq xmm0, 15
  568. movd rdi, xmm0
  569. movzx eax, WORD PTR [r11 + rdi*2]
  570. shl eax, 8
  571. movdqa xmm0, xmm5
  572. pslldq xmm5, 1
  573. pxor xmm4, xmm5
  574. psrldq xmm1, 15
  575. movd rdi, xmm1
  576. xor ax, WORD PTR [r11 + rdi*2]
  577. shl eax, 8
  578. psrldq xmm0, 15
  579. movd rdi, xmm0
  580. xor ax, WORD PTR [r11 + rdi*2]
  581. movd xmm0, eax
  582. pxor xmm0, xmm4
  583. add rcx, 16
  584. sub rdx, 1
  585. jnz label0
  586. movdqa [rsi], xmm0
  587. pop rbx
  588. pop rdi
  589. pop rsi
  590. ret
  591. GCM_AuthenticateBlocks_2K ENDP
  592. ALIGN 8
  593. GCM_AuthenticateBlocks_64K PROC FRAME
  594. rex_push_reg rsi
  595. push_reg rdi
  596. .endprolog
  597. mov rsi, r8
  598. movdqa xmm0, [rsi]
  599. label1:
  600. movdqu xmm1, [rcx]
  601. pxor xmm1, xmm0
  602. pxor xmm0, xmm0
  603. movd eax, xmm1
  604. psrldq xmm1, 4
  605. movzx edi, al
  606. add rdi, rdi
  607. pxor xmm0, [rsi + 32 + (0*4+0)*256*16 + rdi*8]
  608. movzx edi, ah
  609. add rdi, rdi
  610. pxor xmm0, [rsi + 32 + (0*4+1)*256*16 + rdi*8]
  611. shr eax, 16
  612. movzx edi, al
  613. add rdi, rdi
  614. pxor xmm0, [rsi + 32 + (0*4+2)*256*16 + rdi*8]
  615. movzx edi, ah
  616. add rdi, rdi
  617. pxor xmm0, [rsi + 32 + (0*4+3)*256*16 + rdi*8]
  618. movd eax, xmm1
  619. psrldq xmm1, 4
  620. movzx edi, al
  621. add rdi, rdi
  622. pxor xmm0, [rsi + 32 + (1*4+0)*256*16 + rdi*8]
  623. movzx edi, ah
  624. add rdi, rdi
  625. pxor xmm0, [rsi + 32 + (1*4+1)*256*16 + rdi*8]
  626. shr eax, 16
  627. movzx edi, al
  628. add rdi, rdi
  629. pxor xmm0, [rsi + 32 + (1*4+2)*256*16 + rdi*8]
  630. movzx edi, ah
  631. add rdi, rdi
  632. pxor xmm0, [rsi + 32 + (1*4+3)*256*16 + rdi*8]
  633. movd eax, xmm1
  634. psrldq xmm1, 4
  635. movzx edi, al
  636. add rdi, rdi
  637. pxor xmm0, [rsi + 32 + (2*4+0)*256*16 + rdi*8]
  638. movzx edi, ah
  639. add rdi, rdi
  640. pxor xmm0, [rsi + 32 + (2*4+1)*256*16 + rdi*8]
  641. shr eax, 16
  642. movzx edi, al
  643. add rdi, rdi
  644. pxor xmm0, [rsi + 32 + (2*4+2)*256*16 + rdi*8]
  645. movzx edi, ah
  646. add rdi, rdi
  647. pxor xmm0, [rsi + 32 + (2*4+3)*256*16 + rdi*8]
  648. movd eax, xmm1
  649. psrldq xmm1, 4
  650. movzx edi, al
  651. add rdi, rdi
  652. pxor xmm0, [rsi + 32 + (3*4+0)*256*16 + rdi*8]
  653. movzx edi, ah
  654. add rdi, rdi
  655. pxor xmm0, [rsi + 32 + (3*4+1)*256*16 + rdi*8]
  656. shr eax, 16
  657. movzx edi, al
  658. add rdi, rdi
  659. pxor xmm0, [rsi + 32 + (3*4+2)*256*16 + rdi*8]
  660. movzx edi, ah
  661. add rdi, rdi
  662. pxor xmm0, [rsi + 32 + (3*4+3)*256*16 + rdi*8]
  663. add rcx, 16
  664. sub rdx, 1
  665. jnz label1
  666. movdqa [rsi], xmm0
  667. pop rdi
  668. pop rsi
  669. ret
  670. GCM_AuthenticateBlocks_64K ENDP
  671. ALIGN 8
  672. X86_SHA256_HashBlocks PROC FRAME
  673. rex_push_reg rsi
  674. push_reg rdi
  675. push_reg rbx
  676. push_reg rbp
  677. alloc_stack(8*4 + 16*4 + 4*8 + 8)
  678. .endprolog
  679. mov rdi, r8
  680. lea rsi, [?SHA256_K@CryptoPP@@3QBIB + 48*4]
  681. mov [rsp+8*4+16*4+1*8], rcx
  682. mov [rsp+8*4+16*4+2*8], rdx
  683. add rdi, rdx
  684. mov [rsp+8*4+16*4+3*8], rdi
  685. movdqa xmm0, XMMWORD PTR [rcx+0*16]
  686. movdqa xmm1, XMMWORD PTR [rcx+1*16]
  687. mov [rsp+8*4+16*4+0*8], rsi
  688. label0:
  689. sub rsi, 48*4
  690. movdqa [rsp+((1024+7-(0+3)) MOD (8))*4], xmm1
  691. movdqa [rsp+((1024+7-(0+7)) MOD (8))*4], xmm0
  692. mov rbx, [rdx+0*8]
  693. bswap rbx
  694. mov [rsp+8*4+((1024+15-(0*(1+1)+1)) MOD (16))*4], rbx
  695. mov rbx, [rdx+1*8]
  696. bswap rbx
  697. mov [rsp+8*4+((1024+15-(1*(1+1)+1)) MOD (16))*4], rbx
  698. mov rbx, [rdx+2*8]
  699. bswap rbx
  700. mov [rsp+8*4+((1024+15-(2*(1+1)+1)) MOD (16))*4], rbx
  701. mov rbx, [rdx+3*8]
  702. bswap rbx
  703. mov [rsp+8*4+((1024+15-(3*(1+1)+1)) MOD (16))*4], rbx
  704. mov rbx, [rdx+4*8]
  705. bswap rbx
  706. mov [rsp+8*4+((1024+15-(4*(1+1)+1)) MOD (16))*4], rbx
  707. mov rbx, [rdx+5*8]
  708. bswap rbx
  709. mov [rsp+8*4+((1024+15-(5*(1+1)+1)) MOD (16))*4], rbx
  710. mov rbx, [rdx+6*8]
  711. bswap rbx
  712. mov [rsp+8*4+((1024+15-(6*(1+1)+1)) MOD (16))*4], rbx
  713. mov rbx, [rdx+7*8]
  714. bswap rbx
  715. mov [rsp+8*4+((1024+15-(7*(1+1)+1)) MOD (16))*4], rbx
  716. mov edi, [rsp+((1024+7-(0+3)) MOD (8))*4]
  717. mov eax, [rsp+((1024+7-(0+6)) MOD (8))*4]
  718. xor eax, [rsp+((1024+7-(0+5)) MOD (8))*4]
  719. mov ecx, [rsp+((1024+7-(0+7)) MOD (8))*4]
  720. mov edx, [rsp+((1024+7-(0+2)) MOD (8))*4]
  721. xor edx, [rsp+((1024+7-(0+1)) MOD (8))*4]
  722. and edx, edi
  723. xor edx, [rsp+((1024+7-(0+1)) MOD (8))*4]
  724. mov ebp, edi
  725. ror edi, 6
  726. ror ebp, 25
  727. add edx, [rsi+(0)*4]
  728. add edx, [rsp+8*4+((1024+15-(0)) MOD (16))*4]
  729. add edx, [rsp+((1024+7-(0)) MOD (8))*4]
  730. xor ebp, edi
  731. ror edi, 5
  732. xor ebp, edi
  733. add edx, ebp
  734. mov ebx, ecx
  735. xor ecx, [rsp+((1024+7-(0+6)) MOD (8))*4]
  736. and eax, ecx
  737. xor eax, [rsp+((1024+7-(0+6)) MOD (8))*4]
  738. mov ebp, ebx
  739. ror ebx, 2
  740. add eax, edx
  741. add edx, [rsp+((1024+7-(0+4)) MOD (8))*4]
  742. mov [rsp+((1024+7-(0+4)) MOD (8))*4], edx
  743. ror ebp, 22
  744. xor ebp, ebx
  745. ror ebx, 11
  746. xor ebp, ebx
  747. add eax, ebp
  748. mov [rsp+((1024+7-(0)) MOD (8))*4], eax
  749. mov edi, [rsp+((1024+7-(1+2)) MOD (8))*4]
  750. xor edi, [rsp+((1024+7-(1+1)) MOD (8))*4]
  751. and edi, edx
  752. xor edi, [rsp+((1024+7-(1+1)) MOD (8))*4]
  753. mov ebp, edx
  754. ror edx, 6
  755. ror ebp, 25
  756. add edi, [rsi+(1)*4]
  757. add edi, [rsp+8*4+((1024+15-(1)) MOD (16))*4]
  758. add edi, [rsp+((1024+7-(1)) MOD (8))*4]
  759. xor ebp, edx
  760. ror edx, 5
  761. xor ebp, edx
  762. add edi, ebp
  763. mov ebx, eax
  764. xor eax, [rsp+((1024+7-(1+6)) MOD (8))*4]
  765. and ecx, eax
  766. xor ecx, [rsp+((1024+7-(1+6)) MOD (8))*4]
  767. mov ebp, ebx
  768. ror ebx, 2
  769. add ecx, edi
  770. add edi, [rsp+((1024+7-(1+4)) MOD (8))*4]
  771. mov [rsp+((1024+7-(1+4)) MOD (8))*4], edi
  772. ror ebp, 22
  773. xor ebp, ebx
  774. ror ebx, 11
  775. xor ebp, ebx
  776. add ecx, ebp
  777. mov [rsp+((1024+7-(1)) MOD (8))*4], ecx
  778. mov edx, [rsp+((1024+7-(2+2)) MOD (8))*4]
  779. xor edx, [rsp+((1024+7-(2+1)) MOD (8))*4]
  780. and edx, edi
  781. xor edx, [rsp+((1024+7-(2+1)) MOD (8))*4]
  782. mov ebp, edi
  783. ror edi, 6
  784. ror ebp, 25
  785. add edx, [rsi+(2)*4]
  786. add edx, [rsp+8*4+((1024+15-(2)) MOD (16))*4]
  787. add edx, [rsp+((1024+7-(2)) MOD (8))*4]
  788. xor ebp, edi
  789. ror edi, 5
  790. xor ebp, edi
  791. add edx, ebp
  792. mov ebx, ecx
  793. xor ecx, [rsp+((1024+7-(2+6)) MOD (8))*4]
  794. and eax, ecx
  795. xor eax, [rsp+((1024+7-(2+6)) MOD (8))*4]
  796. mov ebp, ebx
  797. ror ebx, 2
  798. add eax, edx
  799. add edx, [rsp+((1024+7-(2+4)) MOD (8))*4]
  800. mov [rsp+((1024+7-(2+4)) MOD (8))*4], edx
  801. ror ebp, 22
  802. xor ebp, ebx
  803. ror ebx, 11
  804. xor ebp, ebx
  805. add eax, ebp
  806. mov [rsp+((1024+7-(2)) MOD (8))*4], eax
  807. mov edi, [rsp+((1024+7-(3+2)) MOD (8))*4]
  808. xor edi, [rsp+((1024+7-(3+1)) MOD (8))*4]
  809. and edi, edx
  810. xor edi, [rsp+((1024+7-(3+1)) MOD (8))*4]
  811. mov ebp, edx
  812. ror edx, 6
  813. ror ebp, 25
  814. add edi, [rsi+(3)*4]
  815. add edi, [rsp+8*4+((1024+15-(3)) MOD (16))*4]
  816. add edi, [rsp+((1024+7-(3)) MOD (8))*4]
  817. xor ebp, edx
  818. ror edx, 5
  819. xor ebp, edx
  820. add edi, ebp
  821. mov ebx, eax
  822. xor eax, [rsp+((1024+7-(3+6)) MOD (8))*4]
  823. and ecx, eax
  824. xor ecx, [rsp+((1024+7-(3+6)) MOD (8))*4]
  825. mov ebp, ebx
  826. ror ebx, 2
  827. add ecx, edi
  828. add edi, [rsp+((1024+7-(3+4)) MOD (8))*4]
  829. mov [rsp+((1024+7-(3+4)) MOD (8))*4], edi
  830. ror ebp, 22
  831. xor ebp, ebx
  832. ror ebx, 11
  833. xor ebp, ebx
  834. add ecx, ebp
  835. mov [rsp+((1024+7-(3)) MOD (8))*4], ecx
  836. mov edx, [rsp+((1024+7-(4+2)) MOD (8))*4]
  837. xor edx, [rsp+((1024+7-(4+1)) MOD (8))*4]
  838. and edx, edi
  839. xor edx, [rsp+((1024+7-(4+1)) MOD (8))*4]
  840. mov ebp, edi
  841. ror edi, 6
  842. ror ebp, 25
  843. add edx, [rsi+(4)*4]
  844. add edx, [rsp+8*4+((1024+15-(4)) MOD (16))*4]
  845. add edx, [rsp+((1024+7-(4)) MOD (8))*4]
  846. xor ebp, edi
  847. ror edi, 5
  848. xor ebp, edi
  849. add edx, ebp
  850. mov ebx, ecx
  851. xor ecx, [rsp+((1024+7-(4+6)) MOD (8))*4]
  852. and eax, ecx
  853. xor eax, [rsp+((1024+7-(4+6)) MOD (8))*4]
  854. mov ebp, ebx
  855. ror ebx, 2
  856. add eax, edx
  857. add edx, [rsp+((1024+7-(4+4)) MOD (8))*4]
  858. mov [rsp+((1024+7-(4+4)) MOD (8))*4], edx
  859. ror ebp, 22
  860. xor ebp, ebx
  861. ror ebx, 11
  862. xor ebp, ebx
  863. add eax, ebp
  864. mov [rsp+((1024+7-(4)) MOD (8))*4], eax
  865. mov edi, [rsp+((1024+7-(5+2)) MOD (8))*4]
  866. xor edi, [rsp+((1024+7-(5+1)) MOD (8))*4]
  867. and edi, edx
  868. xor edi, [rsp+((1024+7-(5+1)) MOD (8))*4]
  869. mov ebp, edx
  870. ror edx, 6
  871. ror ebp, 25
  872. add edi, [rsi+(5)*4]
  873. add edi, [rsp+8*4+((1024+15-(5)) MOD (16))*4]
  874. add edi, [rsp+((1024+7-(5)) MOD (8))*4]
  875. xor ebp, edx
  876. ror edx, 5
  877. xor ebp, edx
  878. add edi, ebp
  879. mov ebx, eax
  880. xor eax, [rsp+((1024+7-(5+6)) MOD (8))*4]
  881. and ecx, eax
  882. xor ecx, [rsp+((1024+7-(5+6)) MOD (8))*4]
  883. mov ebp, ebx
  884. ror ebx, 2
  885. add ecx, edi
  886. add edi, [rsp+((1024+7-(5+4)) MOD (8))*4]
  887. mov [rsp+((1024+7-(5+4)) MOD (8))*4], edi
  888. ror ebp, 22
  889. xor ebp, ebx
  890. ror ebx, 11
  891. xor ebp, ebx
  892. add ecx, ebp
  893. mov [rsp+((1024+7-(5)) MOD (8))*4], ecx
  894. mov edx, [rsp+((1024+7-(6+2)) MOD (8))*4]
  895. xor edx, [rsp+((1024+7-(6+1)) MOD (8))*4]
  896. and edx, edi
  897. xor edx, [rsp+((1024+7-(6+1)) MOD (8))*4]
  898. mov ebp, edi
  899. ror edi, 6
  900. ror ebp, 25
  901. add edx, [rsi+(6)*4]
  902. add edx, [rsp+8*4+((1024+15-(6)) MOD (16))*4]
  903. add edx, [rsp+((1024+7-(6)) MOD (8))*4]
  904. xor ebp, edi
  905. ror edi, 5
  906. xor ebp, edi
  907. add edx, ebp
  908. mov ebx, ecx
  909. xor ecx, [rsp+((1024+7-(6+6)) MOD (8))*4]
  910. and eax, ecx
  911. xor eax, [rsp+((1024+7-(6+6)) MOD (8))*4]
  912. mov ebp, ebx
  913. ror ebx, 2
  914. add eax, edx
  915. add edx, [rsp+((1024+7-(6+4)) MOD (8))*4]
  916. mov [rsp+((1024+7-(6+4)) MOD (8))*4], edx
  917. ror ebp, 22
  918. xor ebp, ebx
  919. ror ebx, 11
  920. xor ebp, ebx
  921. add eax, ebp
  922. mov [rsp+((1024+7-(6)) MOD (8))*4], eax
  923. mov edi, [rsp+((1024+7-(7+2)) MOD (8))*4]
  924. xor edi, [rsp+((1024+7-(7+1)) MOD (8))*4]
  925. and edi, edx
  926. xor edi, [rsp+((1024+7-(7+1)) MOD (8))*4]
  927. mov ebp, edx
  928. ror edx, 6
  929. ror ebp, 25
  930. add edi, [rsi+(7)*4]
  931. add edi, [rsp+8*4+((1024+15-(7)) MOD (16))*4]
  932. add edi, [rsp+((1024+7-(7)) MOD (8))*4]
  933. xor ebp, edx
  934. ror edx, 5
  935. xor ebp, edx
  936. add edi, ebp
  937. mov ebx, eax
  938. xor eax, [rsp+((1024+7-(7+6)) MOD (8))*4]
  939. and ecx, eax
  940. xor ecx, [rsp+((1024+7-(7+6)) MOD (8))*4]
  941. mov ebp, ebx
  942. ror ebx, 2
  943. add ecx, edi
  944. add edi, [rsp+((1024+7-(7+4)) MOD (8))*4]
  945. mov [rsp+((1024+7-(7+4)) MOD (8))*4], edi
  946. ror ebp, 22
  947. xor ebp, ebx
  948. ror ebx, 11
  949. xor ebp, ebx
  950. add ecx, ebp
  951. mov [rsp+((1024+7-(7)) MOD (8))*4], ecx
  952. mov edx, [rsp+((1024+7-(8+2)) MOD (8))*4]
  953. xor edx, [rsp+((1024+7-(8+1)) MOD (8))*4]
  954. and edx, edi
  955. xor edx, [rsp+((1024+7-(8+1)) MOD (8))*4]
  956. mov ebp, edi
  957. ror edi, 6
  958. ror ebp, 25
  959. add edx, [rsi+(8)*4]
  960. add edx, [rsp+8*4+((1024+15-(8)) MOD (16))*4]
  961. add edx, [rsp+((1024+7-(8)) MOD (8))*4]
  962. xor ebp, edi
  963. ror edi, 5
  964. xor ebp, edi
  965. add edx, ebp
  966. mov ebx, ecx
  967. xor ecx, [rsp+((1024+7-(8+6)) MOD (8))*4]
  968. and eax, ecx
  969. xor eax, [rsp+((1024+7-(8+6)) MOD (8))*4]
  970. mov ebp, ebx
  971. ror ebx, 2
  972. add eax, edx
  973. add edx, [rsp+((1024+7-(8+4)) MOD (8))*4]
  974. mov [rsp+((1024+7-(8+4)) MOD (8))*4], edx
  975. ror ebp, 22
  976. xor ebp, ebx
  977. ror ebx, 11
  978. xor ebp, ebx
  979. add eax, ebp
  980. mov [rsp+((1024+7-(8)) MOD (8))*4], eax
  981. mov edi, [rsp+((1024+7-(9+2)) MOD (8))*4]
  982. xor edi, [rsp+((1024+7-(9+1)) MOD (8))*4]
  983. and edi, edx
  984. xor edi, [rsp+((1024+7-(9+1)) MOD (8))*4]
  985. mov ebp, edx
  986. ror edx, 6
  987. ror ebp, 25
  988. add edi, [rsi+(9)*4]
  989. add edi, [rsp+8*4+((1024+15-(9)) MOD (16))*4]
  990. add edi, [rsp+((1024+7-(9)) MOD (8))*4]
  991. xor ebp, edx
  992. ror edx, 5
  993. xor ebp, edx
  994. add edi, ebp
  995. mov ebx, eax
  996. xor eax, [rsp+((1024+7-(9+6)) MOD (8))*4]
  997. and ecx, eax
  998. xor ecx, [rsp+((1024+7-(9+6)) MOD (8))*4]
  999. mov ebp, ebx
  1000. ror ebx, 2
  1001. add ecx, edi
  1002. add edi, [rsp+((1024+7-(9+4)) MOD (8))*4]
  1003. mov [rsp+((1024+7-(9+4)) MOD (8))*4], edi
  1004. ror ebp, 22
  1005. xor ebp, ebx
  1006. ror ebx, 11
  1007. xor ebp, ebx
  1008. add ecx, ebp
  1009. mov [rsp+((1024+7-(9)) MOD (8))*4], ecx
  1010. mov edx, [rsp+((1024+7-(10+2)) MOD (8))*4]
  1011. xor edx, [rsp+((1024+7-(10+1)) MOD (8))*4]
  1012. and edx, edi
  1013. xor edx, [rsp+((1024+7-(10+1)) MOD (8))*4]
  1014. mov ebp, edi
  1015. ror edi, 6
  1016. ror ebp, 25
  1017. add edx, [rsi+(10)*4]
  1018. add edx, [rsp+8*4+((1024+15-(10)) MOD (16))*4]
  1019. add edx, [rsp+((1024+7-(10)) MOD (8))*4]
  1020. xor ebp, edi
  1021. ror edi, 5
  1022. xor ebp, edi
  1023. add edx, ebp
  1024. mov ebx, ecx
  1025. xor ecx, [rsp+((1024+7-(10+6)) MOD (8))*4]
  1026. and eax, ecx
  1027. xor eax, [rsp+((1024+7-(10+6)) MOD (8))*4]
  1028. mov ebp, ebx
  1029. ror ebx, 2
  1030. add eax, edx
  1031. add edx, [rsp+((1024+7-(10+4)) MOD (8))*4]
  1032. mov [rsp+((1024+7-(10+4)) MOD (8))*4], edx
  1033. ror ebp, 22
  1034. xor ebp, ebx
  1035. ror ebx, 11
  1036. xor ebp, ebx
  1037. add eax, ebp
  1038. mov [rsp+((1024+7-(10)) MOD (8))*4], eax
  1039. mov edi, [rsp+((1024+7-(11+2)) MOD (8))*4]
  1040. xor edi, [rsp+((1024+7-(11+1)) MOD (8))*4]
  1041. and edi, edx
  1042. xor edi, [rsp+((1024+7-(11+1)) MOD (8))*4]
  1043. mov ebp, edx
  1044. ror edx, 6
  1045. ror ebp, 25
  1046. add edi, [rsi+(11)*4]
  1047. add edi, [rsp+8*4+((1024+15-(11)) MOD (16))*4]
  1048. add edi, [rsp+((1024+7-(11)) MOD (8))*4]
  1049. xor ebp, edx
  1050. ror edx, 5
  1051. xor ebp, edx
  1052. add edi, ebp
  1053. mov ebx, eax
  1054. xor eax, [rsp+((1024+7-(11+6)) MOD (8))*4]
  1055. and ecx, eax
  1056. xor ecx, [rsp+((1024+7-(11+6)) MOD (8))*4]
  1057. mov ebp, ebx
  1058. ror ebx, 2
  1059. add ecx, edi
  1060. add edi, [rsp+((1024+7-(11+4)) MOD (8))*4]
  1061. mov [rsp+((1024+7-(11+4)) MOD (8))*4], edi
  1062. ror ebp, 22
  1063. xor ebp, ebx
  1064. ror ebx, 11
  1065. xor ebp, ebx
  1066. add ecx, ebp
  1067. mov [rsp+((1024+7-(11)) MOD (8))*4], ecx
  1068. mov edx, [rsp+((1024+7-(12+2)) MOD (8))*4]
  1069. xor edx, [rsp+((1024+7-(12+1)) MOD (8))*4]
  1070. and edx, edi
  1071. xor edx, [rsp+((1024+7-(12+1)) MOD (8))*4]
  1072. mov ebp, edi
  1073. ror edi, 6
  1074. ror ebp, 25
  1075. add edx, [rsi+(12)*4]
  1076. add edx, [rsp+8*4+((1024+15-(12)) MOD (16))*4]
  1077. add edx, [rsp+((1024+7-(12)) MOD (8))*4]
  1078. xor ebp, edi
  1079. ror edi, 5
  1080. xor ebp, edi
  1081. add edx, ebp
  1082. mov ebx, ecx
  1083. xor ecx, [rsp+((1024+7-(12+6)) MOD (8))*4]
  1084. and eax, ecx
  1085. xor eax, [rsp+((1024+7-(12+6)) MOD (8))*4]
  1086. mov ebp, ebx
  1087. ror ebx, 2
  1088. add eax, edx
  1089. add edx, [rsp+((1024+7-(12+4)) MOD (8))*4]
  1090. mov [rsp+((1024+7-(12+4)) MOD (8))*4], edx
  1091. ror ebp, 22
  1092. xor ebp, ebx
  1093. ror ebx, 11
  1094. xor ebp, ebx
  1095. add eax, ebp
  1096. mov [rsp+((1024+7-(12)) MOD (8))*4], eax
  1097. mov edi, [rsp+((1024+7-(13+2)) MOD (8))*4]
  1098. xor edi, [rsp+((1024+7-(13+1)) MOD (8))*4]
  1099. and edi, edx
  1100. xor edi, [rsp+((1024+7-(13+1)) MOD (8))*4]
  1101. mov ebp, edx
  1102. ror edx, 6
  1103. ror ebp, 25
  1104. add edi, [rsi+(13)*4]
  1105. add edi, [rsp+8*4+((1024+15-(13)) MOD (16))*4]
  1106. add edi, [rsp+((1024+7-(13)) MOD (8))*4]
  1107. xor ebp, edx
  1108. ror edx, 5
  1109. xor ebp, edx
  1110. add edi, ebp
  1111. mov ebx, eax
  1112. xor eax, [rsp+((1024+7-(13+6)) MOD (8))*4]
  1113. and ecx, eax
  1114. xor ecx, [rsp+((1024+7-(13+6)) MOD (8))*4]
  1115. mov ebp, ebx
  1116. ror ebx, 2
  1117. add ecx, edi
  1118. add edi, [rsp+((1024+7-(13+4)) MOD (8))*4]
  1119. mov [rsp+((1024+7-(13+4)) MOD (8))*4], edi
  1120. ror ebp, 22
  1121. xor ebp, ebx
  1122. ror ebx, 11
  1123. xor ebp, ebx
  1124. add ecx, ebp
  1125. mov [rsp+((1024+7-(13)) MOD (8))*4], ecx
  1126. mov edx, [rsp+((1024+7-(14+2)) MOD (8))*4]
  1127. xor edx, [rsp+((1024+7-(14+1)) MOD (8))*4]
  1128. and edx, edi
  1129. xor edx, [rsp+((1024+7-(14+1)) MOD (8))*4]
  1130. mov ebp, edi
  1131. ror edi, 6
  1132. ror ebp, 25
  1133. add edx, [rsi+(14)*4]
  1134. add edx, [rsp+8*4+((1024+15-(14)) MOD (16))*4]
  1135. add edx, [rsp+((1024+7-(14)) MOD (8))*4]
  1136. xor ebp, edi
  1137. ror edi, 5
  1138. xor ebp, edi
  1139. add edx, ebp
  1140. mov ebx, ecx
  1141. xor ecx, [rsp+((1024+7-(14+6)) MOD (8))*4]
  1142. and eax, ecx
  1143. xor eax, [rsp+((1024+7-(14+6)) MOD (8))*4]
  1144. mov ebp, ebx
  1145. ror ebx, 2
  1146. add eax, edx
  1147. add edx, [rsp+((1024+7-(14+4)) MOD (8))*4]
  1148. mov [rsp+((1024+7-(14+4)) MOD (8))*4], edx
  1149. ror ebp, 22
  1150. xor ebp, ebx
  1151. ror ebx, 11
  1152. xor ebp, ebx
  1153. add eax, ebp
  1154. mov [rsp+((1024+7-(14)) MOD (8))*4], eax
  1155. mov edi, [rsp+((1024+7-(15+2)) MOD (8))*4]
  1156. xor edi, [rsp+((1024+7-(15+1)) MOD (8))*4]
  1157. and edi, edx
  1158. xor edi, [rsp+((1024+7-(15+1)) MOD (8))*4]
  1159. mov ebp, edx
  1160. ror edx, 6
  1161. ror ebp, 25
  1162. add edi, [rsi+(15)*4]
  1163. add edi, [rsp+8*4+((1024+15-(15)) MOD (16))*4]
  1164. add edi, [rsp+((1024+7-(15)) MOD (8))*4]
  1165. xor ebp, edx
  1166. ror edx, 5
  1167. xor ebp, edx
  1168. add edi, ebp
  1169. mov ebx, eax
  1170. xor eax, [rsp+((1024+7-(15+6)) MOD (8))*4]
  1171. and ecx, eax
  1172. xor ecx, [rsp+((1024+7-(15+6)) MOD (8))*4]
  1173. mov ebp, ebx
  1174. ror ebx, 2
  1175. add ecx, edi
  1176. add edi, [rsp+((1024+7-(15+4)) MOD (8))*4]
  1177. mov [rsp+((1024+7-(15+4)) MOD (8))*4], edi
  1178. ror ebp, 22
  1179. xor ebp, ebx
  1180. ror ebx, 11
  1181. xor ebp, ebx
  1182. add ecx, ebp
  1183. mov [rsp+((1024+7-(15)) MOD (8))*4], ecx
  1184. label1:
  1185. add rsi, 4*16
  1186. mov edx, [rsp+((1024+7-(0+2)) MOD (8))*4]
  1187. xor edx, [rsp+((1024+7-(0+1)) MOD (8))*4]
  1188. and edx, edi
  1189. xor edx, [rsp+((1024+7-(0+1)) MOD (8))*4]
  1190. mov ebp, edi
  1191. ror edi, 6
  1192. ror ebp, 25
  1193. xor ebp, edi
  1194. ror edi, 5
  1195. xor ebp, edi
  1196. add edx, ebp
  1197. mov ebp, [rsp+8*4+((1024+15-((0)-2)) MOD (16))*4]
  1198. mov edi, [rsp+8*4+((1024+15-((0)-15)) MOD (16))*4]
  1199. mov ebx, ebp
  1200. shr ebp, 10
  1201. ror ebx, 17
  1202. xor ebp, ebx
  1203. ror ebx, 2
  1204. xor ebx, ebp
  1205. add ebx, [rsp+8*4+((1024+15-((0)-7)) MOD (16))*4]
  1206. mov ebp, edi
  1207. shr ebp, 3
  1208. ror edi, 7
  1209. add ebx, [rsp+8*4+((1024+15-(0)) MOD (16))*4]
  1210. xor ebp, edi
  1211. add edx, [rsi+(0)*4]
  1212. ror edi, 11
  1213. add edx, [rsp+((1024+7-(0)) MOD (8))*4]
  1214. xor ebp, edi
  1215. add ebp, ebx
  1216. mov [rsp+8*4+((1024+15-(0)) MOD (16))*4], ebp
  1217. add edx, ebp
  1218. mov ebx, ecx
  1219. xor ecx, [rsp+((1024+7-(0+6)) MOD (8))*4]
  1220. and eax, ecx
  1221. xor eax, [rsp+((1024+7-(0+6)) MOD (8))*4]
  1222. mov ebp, ebx
  1223. ror ebx, 2
  1224. add eax, edx
  1225. add edx, [rsp+((1024+7-(0+4)) MOD (8))*4]
  1226. mov [rsp+((1024+7-(0+4)) MOD (8))*4], edx
  1227. ror ebp, 22
  1228. xor ebp, ebx
  1229. ror ebx, 11
  1230. xor ebp, ebx
  1231. add eax, ebp
  1232. mov [rsp+((1024+7-(0)) MOD (8))*4], eax
  1233. mov edi, [rsp+((1024+7-(1+2)) MOD (8))*4]
  1234. xor edi, [rsp+((1024+7-(1+1)) MOD (8))*4]
  1235. and edi, edx
  1236. xor edi, [rsp+((1024+7-(1+1)) MOD (8))*4]
  1237. mov ebp, edx
  1238. ror edx, 6
  1239. ror ebp, 25
  1240. xor ebp, edx
  1241. ror edx, 5
  1242. xor ebp, edx
  1243. add edi, ebp
  1244. mov ebp, [rsp+8*4+((1024+15-((1)-2)) MOD (16))*4]
  1245. mov edx, [rsp+8*4+((1024+15-((1)-15)) MOD (16))*4]
  1246. mov ebx, ebp
  1247. shr ebp, 10
  1248. ror ebx, 17
  1249. xor ebp, ebx
  1250. ror ebx, 2
  1251. xor ebx, ebp
  1252. add ebx, [rsp+8*4+((1024+15-((1)-7)) MOD (16))*4]
  1253. mov ebp, edx
  1254. shr ebp, 3
  1255. ror edx, 7
  1256. add ebx, [rsp+8*4+((1024+15-(1)) MOD (16))*4]
  1257. xor ebp, edx
  1258. add edi, [rsi+(1)*4]
  1259. ror edx, 11
  1260. add edi, [rsp+((1024+7-(1)) MOD (8))*4]
  1261. xor ebp, edx
  1262. add ebp, ebx
  1263. mov [rsp+8*4+((1024+15-(1)) MOD (16))*4], ebp
  1264. add edi, ebp
  1265. mov ebx, eax
  1266. xor eax, [rsp+((1024+7-(1+6)) MOD (8))*4]
  1267. and ecx, eax
  1268. xor ecx, [rsp+((1024+7-(1+6)) MOD (8))*4]
  1269. mov ebp, ebx
  1270. ror ebx, 2
  1271. add ecx, edi
  1272. add edi, [rsp+((1024+7-(1+4)) MOD (8))*4]
  1273. mov [rsp+((1024+7-(1+4)) MOD (8))*4], edi
  1274. ror ebp, 22
  1275. xor ebp, ebx
  1276. ror ebx, 11
  1277. xor ebp, ebx
  1278. add ecx, ebp
  1279. mov [rsp+((1024+7-(1)) MOD (8))*4], ecx
  1280. mov edx, [rsp+((1024+7-(2+2)) MOD (8))*4]
  1281. xor edx, [rsp+((1024+7-(2+1)) MOD (8))*4]
  1282. and edx, edi
  1283. xor edx, [rsp+((1024+7-(2+1)) MOD (8))*4]
  1284. mov ebp, edi
  1285. ror edi, 6
  1286. ror ebp, 25
  1287. xor ebp, edi
  1288. ror edi, 5
  1289. xor ebp, edi
  1290. add edx, ebp
  1291. mov ebp, [rsp+8*4+((1024+15-((2)-2)) MOD (16))*4]
  1292. mov edi, [rsp+8*4+((1024+15-((2)-15)) MOD (16))*4]
  1293. mov ebx, ebp
  1294. shr ebp, 10
  1295. ror ebx, 17
  1296. xor ebp, ebx
  1297. ror ebx, 2
  1298. xor ebx, ebp
  1299. add ebx, [rsp+8*4+((1024+15-((2)-7)) MOD (16))*4]
  1300. mov ebp, edi
  1301. shr ebp, 3
  1302. ror edi, 7
  1303. add ebx, [rsp+8*4+((1024+15-(2)) MOD (16))*4]
  1304. xor ebp, edi
  1305. add edx, [rsi+(2)*4]
  1306. ror edi, 11
  1307. add edx, [rsp+((1024+7-(2)) MOD (8))*4]
  1308. xor ebp, edi
  1309. add ebp, ebx
  1310. mov [rsp+8*4+((1024+15-(2)) MOD (16))*4], ebp
  1311. add edx, ebp
  1312. mov ebx, ecx
  1313. xor ecx, [rsp+((1024+7-(2+6)) MOD (8))*4]
  1314. and eax, ecx
  1315. xor eax, [rsp+((1024+7-(2+6)) MOD (8))*4]
  1316. mov ebp, ebx
  1317. ror ebx, 2
  1318. add eax, edx
  1319. add edx, [rsp+((1024+7-(2+4)) MOD (8))*4]
  1320. mov [rsp+((1024+7-(2+4)) MOD (8))*4], edx
  1321. ror ebp, 22
  1322. xor ebp, ebx
  1323. ror ebx, 11
  1324. xor ebp, ebx
  1325. add eax, ebp
  1326. mov [rsp+((1024+7-(2)) MOD (8))*4], eax
  1327. mov edi, [rsp+((1024+7-(3+2)) MOD (8))*4]
  1328. xor edi, [rsp+((1024+7-(3+1)) MOD (8))*4]
  1329. and edi, edx
  1330. xor edi, [rsp+((1024+7-(3+1)) MOD (8))*4]
  1331. mov ebp, edx
  1332. ror edx, 6
  1333. ror ebp, 25
  1334. xor ebp, edx
  1335. ror edx, 5
  1336. xor ebp, edx
  1337. add edi, ebp
  1338. mov ebp, [rsp+8*4+((1024+15-((3)-2)) MOD (16))*4]
  1339. mov edx, [rsp+8*4+((1024+15-((3)-15)) MOD (16))*4]
  1340. mov ebx, ebp
  1341. shr ebp, 10
  1342. ror ebx, 17
  1343. xor ebp, ebx
  1344. ror ebx, 2
  1345. xor ebx, ebp
  1346. add ebx, [rsp+8*4+((1024+15-((3)-7)) MOD (16))*4]
  1347. mov ebp, edx
  1348. shr ebp, 3
  1349. ror edx, 7
  1350. add ebx, [rsp+8*4+((1024+15-(3)) MOD (16))*4]
  1351. xor ebp, edx
  1352. add edi, [rsi+(3)*4]
  1353. ror edx, 11
  1354. add edi, [rsp+((1024+7-(3)) MOD (8))*4]
  1355. xor ebp, edx
  1356. add ebp, ebx
  1357. mov [rsp+8*4+((1024+15-(3)) MOD (16))*4], ebp
  1358. add edi, ebp
  1359. mov ebx, eax
  1360. xor eax, [rsp+((1024+7-(3+6)) MOD (8))*4]
  1361. and ecx, eax
  1362. xor ecx, [rsp+((1024+7-(3+6)) MOD (8))*4]
  1363. mov ebp, ebx
  1364. ror ebx, 2
  1365. add ecx, edi
  1366. add edi, [rsp+((1024+7-(3+4)) MOD (8))*4]
  1367. mov [rsp+((1024+7-(3+4)) MOD (8))*4], edi
  1368. ror ebp, 22
  1369. xor ebp, ebx
  1370. ror ebx, 11
  1371. xor ebp, ebx
  1372. add ecx, ebp
  1373. mov [rsp+((1024+7-(3)) MOD (8))*4], ecx
  1374. mov edx, [rsp+((1024+7-(4+2)) MOD (8))*4]
  1375. xor edx, [rsp+((1024+7-(4+1)) MOD (8))*4]
  1376. and edx, edi
  1377. xor edx, [rsp+((1024+7-(4+1)) MOD (8))*4]
  1378. mov ebp, edi
  1379. ror edi, 6
  1380. ror ebp, 25
  1381. xor ebp, edi
  1382. ror edi, 5
  1383. xor ebp, edi
  1384. add edx, ebp
  1385. mov ebp, [rsp+8*4+((1024+15-((4)-2)) MOD (16))*4]
  1386. mov edi, [rsp+8*4+((1024+15-((4)-15)) MOD (16))*4]
  1387. mov ebx, ebp
  1388. shr ebp, 10
  1389. ror ebx, 17
  1390. xor ebp, ebx
  1391. ror ebx, 2
  1392. xor ebx, ebp
  1393. add ebx, [rsp+8*4+((1024+15-((4)-7)) MOD (16))*4]
  1394. mov ebp, edi
  1395. shr ebp, 3
  1396. ror edi, 7
  1397. add ebx, [rsp+8*4+((1024+15-(4)) MOD (16))*4]
  1398. xor ebp, edi
  1399. add edx, [rsi+(4)*4]
  1400. ror edi, 11
  1401. add edx, [rsp+((1024+7-(4)) MOD (8))*4]
  1402. xor ebp, edi
  1403. add ebp, ebx
  1404. mov [rsp+8*4+((1024+15-(4)) MOD (16))*4], ebp
  1405. add edx, ebp
  1406. mov ebx, ecx
  1407. xor ecx, [rsp+((1024+7-(4+6)) MOD (8))*4]
  1408. and eax, ecx
  1409. xor eax, [rsp+((1024+7-(4+6)) MOD (8))*4]
  1410. mov ebp, ebx
  1411. ror ebx, 2
  1412. add eax, edx
  1413. add edx, [rsp+((1024+7-(4+4)) MOD (8))*4]
  1414. mov [rsp+((1024+7-(4+4)) MOD (8))*4], edx
  1415. ror ebp, 22
  1416. xor ebp, ebx
  1417. ror ebx, 11
  1418. xor ebp, ebx
  1419. add eax, ebp
  1420. mov [rsp+((1024+7-(4)) MOD (8))*4], eax
  1421. mov edi, [rsp+((1024+7-(5+2)) MOD (8))*4]
  1422. xor edi, [rsp+((1024+7-(5+1)) MOD (8))*4]
  1423. and edi, edx
  1424. xor edi, [rsp+((1024+7-(5+1)) MOD (8))*4]
  1425. mov ebp, edx
  1426. ror edx, 6
  1427. ror ebp, 25
  1428. xor ebp, edx
  1429. ror edx, 5
  1430. xor ebp, edx
  1431. add edi, ebp
  1432. mov ebp, [rsp+8*4+((1024+15-((5)-2)) MOD (16))*4]
  1433. mov edx, [rsp+8*4+((1024+15-((5)-15)) MOD (16))*4]
  1434. mov ebx, ebp
  1435. shr ebp, 10
  1436. ror ebx, 17
  1437. xor ebp, ebx
  1438. ror ebx, 2
  1439. xor ebx, ebp
  1440. add ebx, [rsp+8*4+((1024+15-((5)-7)) MOD (16))*4]
  1441. mov ebp, edx
  1442. shr ebp, 3
  1443. ror edx, 7
  1444. add ebx, [rsp+8*4+((1024+15-(5)) MOD (16))*4]
  1445. xor ebp, edx
  1446. add edi, [rsi+(5)*4]
  1447. ror edx, 11
  1448. add edi, [rsp+((1024+7-(5)) MOD (8))*4]
  1449. xor ebp, edx
  1450. add ebp, ebx
  1451. mov [rsp+8*4+((1024+15-(5)) MOD (16))*4], ebp
  1452. add edi, ebp
  1453. mov ebx, eax
  1454. xor eax, [rsp+((1024+7-(5+6)) MOD (8))*4]
  1455. and ecx, eax
  1456. xor ecx, [rsp+((1024+7-(5+6)) MOD (8))*4]
  1457. mov ebp, ebx
  1458. ror ebx, 2
  1459. add ecx, edi
  1460. add edi, [rsp+((1024+7-(5+4)) MOD (8))*4]
  1461. mov [rsp+((1024+7-(5+4)) MOD (8))*4], edi
  1462. ror ebp, 22
  1463. xor ebp, ebx
  1464. ror ebx, 11
  1465. xor ebp, ebx
  1466. add ecx, ebp
  1467. mov [rsp+((1024+7-(5)) MOD (8))*4], ecx
  1468. mov edx, [rsp+((1024+7-(6+2)) MOD (8))*4]
  1469. xor edx, [rsp+((1024+7-(6+1)) MOD (8))*4]
  1470. and edx, edi
  1471. xor edx, [rsp+((1024+7-(6+1)) MOD (8))*4]
  1472. mov ebp, edi
  1473. ror edi, 6
  1474. ror ebp, 25
  1475. xor ebp, edi
  1476. ror edi, 5
  1477. xor ebp, edi
  1478. add edx, ebp
  1479. mov ebp, [rsp+8*4+((1024+15-((6)-2)) MOD (16))*4]
  1480. mov edi, [rsp+8*4+((1024+15-((6)-15)) MOD (16))*4]
  1481. mov ebx, ebp
  1482. shr ebp, 10
  1483. ror ebx, 17
  1484. xor ebp, ebx
  1485. ror ebx, 2
  1486. xor ebx, ebp
  1487. add ebx, [rsp+8*4+((1024+15-((6)-7)) MOD (16))*4]
  1488. mov ebp, edi
  1489. shr ebp, 3
  1490. ror edi, 7
  1491. add ebx, [rsp+8*4+((1024+15-(6)) MOD (16))*4]
  1492. xor ebp, edi
  1493. add edx, [rsi+(6)*4]
  1494. ror edi, 11
  1495. add edx, [rsp+((1024+7-(6)) MOD (8))*4]
  1496. xor ebp, edi
  1497. add ebp, ebx
  1498. mov [rsp+8*4+((1024+15-(6)) MOD (16))*4], ebp
  1499. add edx, ebp
  1500. mov ebx, ecx
  1501. xor ecx, [rsp+((1024+7-(6+6)) MOD (8))*4]
  1502. and eax, ecx
  1503. xor eax, [rsp+((1024+7-(6+6)) MOD (8))*4]
  1504. mov ebp, ebx
  1505. ror ebx, 2
  1506. add eax, edx
  1507. add edx, [rsp+((1024+7-(6+4)) MOD (8))*4]
  1508. mov [rsp+((1024+7-(6+4)) MOD (8))*4], edx
  1509. ror ebp, 22
  1510. xor ebp, ebx
  1511. ror ebx, 11
  1512. xor ebp, ebx
  1513. add eax, ebp
  1514. mov [rsp+((1024+7-(6)) MOD (8))*4], eax
  1515. mov edi, [rsp+((1024+7-(7+2)) MOD (8))*4]
  1516. xor edi, [rsp+((1024+7-(7+1)) MOD (8))*4]
  1517. and edi, edx
  1518. xor edi, [rsp+((1024+7-(7+1)) MOD (8))*4]
  1519. mov ebp, edx
  1520. ror edx, 6
  1521. ror ebp, 25
  1522. xor ebp, edx
  1523. ror edx, 5
  1524. xor ebp, edx
  1525. add edi, ebp
  1526. mov ebp, [rsp+8*4+((1024+15-((7)-2)) MOD (16))*4]
  1527. mov edx, [rsp+8*4+((1024+15-((7)-15)) MOD (16))*4]
  1528. mov ebx, ebp
  1529. shr ebp, 10
  1530. ror ebx, 17
  1531. xor ebp, ebx
  1532. ror ebx, 2
  1533. xor ebx, ebp
  1534. add ebx, [rsp+8*4+((1024+15-((7)-7)) MOD (16))*4]
  1535. mov ebp, edx
  1536. shr ebp, 3
  1537. ror edx, 7
  1538. add ebx, [rsp+8*4+((1024+15-(7)) MOD (16))*4]
  1539. xor ebp, edx
  1540. add edi, [rsi+(7)*4]
  1541. ror edx, 11
  1542. add edi, [rsp+((1024+7-(7)) MOD (8))*4]
  1543. xor ebp, edx
  1544. add ebp, ebx
  1545. mov [rsp+8*4+((1024+15-(7)) MOD (16))*4], ebp
  1546. add edi, ebp
  1547. mov ebx, eax
  1548. xor eax, [rsp+((1024+7-(7+6)) MOD (8))*4]
  1549. and ecx, eax
  1550. xor ecx, [rsp+((1024+7-(7+6)) MOD (8))*4]
  1551. mov ebp, ebx
  1552. ror ebx, 2
  1553. add ecx, edi
  1554. add edi, [rsp+((1024+7-(7+4)) MOD (8))*4]
  1555. mov [rsp+((1024+7-(7+4)) MOD (8))*4], edi
  1556. ror ebp, 22
  1557. xor ebp, ebx
  1558. ror ebx, 11
  1559. xor ebp, ebx
  1560. add ecx, ebp
  1561. mov [rsp+((1024+7-(7)) MOD (8))*4], ecx
  1562. mov edx, [rsp+((1024+7-(8+2)) MOD (8))*4]
  1563. xor edx, [rsp+((1024+7-(8+1)) MOD (8))*4]
  1564. and edx, edi
  1565. xor edx, [rsp+((1024+7-(8+1)) MOD (8))*4]
  1566. mov ebp, edi
  1567. ror edi, 6
  1568. ror ebp, 25
  1569. xor ebp, edi
  1570. ror edi, 5
  1571. xor ebp, edi
  1572. add edx, ebp
  1573. mov ebp, [rsp+8*4+((1024+15-((8)-2)) MOD (16))*4]
  1574. mov edi, [rsp+8*4+((1024+15-((8)-15)) MOD (16))*4]
  1575. mov ebx, ebp
  1576. shr ebp, 10
  1577. ror ebx, 17
  1578. xor ebp, ebx
  1579. ror ebx, 2
  1580. xor ebx, ebp
  1581. add ebx, [rsp+8*4+((1024+15-((8)-7)) MOD (16))*4]
  1582. mov ebp, edi
  1583. shr ebp, 3
  1584. ror edi, 7
  1585. add ebx, [rsp+8*4+((1024+15-(8)) MOD (16))*4]
  1586. xor ebp, edi
  1587. add edx, [rsi+(8)*4]
  1588. ror edi, 11
  1589. add edx, [rsp+((1024+7-(8)) MOD (8))*4]
  1590. xor ebp, edi
  1591. add ebp, ebx
  1592. mov [rsp+8*4+((1024+15-(8)) MOD (16))*4], ebp
  1593. add edx, ebp
  1594. mov ebx, ecx
  1595. xor ecx, [rsp+((1024+7-(8+6)) MOD (8))*4]
  1596. and eax, ecx
  1597. xor eax, [rsp+((1024+7-(8+6)) MOD (8))*4]
  1598. mov ebp, ebx
  1599. ror ebx, 2
  1600. add eax, edx
  1601. add edx, [rsp+((1024+7-(8+4)) MOD (8))*4]
  1602. mov [rsp+((1024+7-(8+4)) MOD (8))*4], edx
  1603. ror ebp, 22
  1604. xor ebp, ebx
  1605. ror ebx, 11
  1606. xor ebp, ebx
  1607. add eax, ebp
  1608. mov [rsp+((1024+7-(8)) MOD (8))*4], eax
  1609. mov edi, [rsp+((1024+7-(9+2)) MOD (8))*4]
  1610. xor edi, [rsp+((1024+7-(9+1)) MOD (8))*4]
  1611. and edi, edx
  1612. xor edi, [rsp+((1024+7-(9+1)) MOD (8))*4]
  1613. mov ebp, edx
  1614. ror edx, 6
  1615. ror ebp, 25
  1616. xor ebp, edx
  1617. ror edx, 5
  1618. xor ebp, edx
  1619. add edi, ebp
  1620. mov ebp, [rsp+8*4+((1024+15-((9)-2)) MOD (16))*4]
  1621. mov edx, [rsp+8*4+((1024+15-((9)-15)) MOD (16))*4]
  1622. mov ebx, ebp
  1623. shr ebp, 10
  1624. ror ebx, 17
  1625. xor ebp, ebx
  1626. ror ebx, 2
  1627. xor ebx, ebp
  1628. add ebx, [rsp+8*4+((1024+15-((9)-7)) MOD (16))*4]
  1629. mov ebp, edx
  1630. shr ebp, 3
  1631. ror edx, 7
  1632. add ebx, [rsp+8*4+((1024+15-(9)) MOD (16))*4]
  1633. xor ebp, edx
  1634. add edi, [rsi+(9)*4]
  1635. ror edx, 11
  1636. add edi, [rsp+((1024+7-(9)) MOD (8))*4]
  1637. xor ebp, edx
  1638. add ebp, ebx
  1639. mov [rsp+8*4+((1024+15-(9)) MOD (16))*4], ebp
  1640. add edi, ebp
  1641. mov ebx, eax
  1642. xor eax, [rsp+((1024+7-(9+6)) MOD (8))*4]
  1643. and ecx, eax
  1644. xor ecx, [rsp+((1024+7-(9+6)) MOD (8))*4]
  1645. mov ebp, ebx
  1646. ror ebx, 2
  1647. add ecx, edi
  1648. add edi, [rsp+((1024+7-(9+4)) MOD (8))*4]
  1649. mov [rsp+((1024+7-(9+4)) MOD (8))*4], edi
  1650. ror ebp, 22
  1651. xor ebp, ebx
  1652. ror ebx, 11
  1653. xor ebp, ebx
  1654. add ecx, ebp
  1655. mov [rsp+((1024+7-(9)) MOD (8))*4], ecx
  1656. mov edx, [rsp+((1024+7-(10+2)) MOD (8))*4]
  1657. xor edx, [rsp+((1024+7-(10+1)) MOD (8))*4]
  1658. and edx, edi
  1659. xor edx, [rsp+((1024+7-(10+1)) MOD (8))*4]
  1660. mov ebp, edi
  1661. ror edi, 6
  1662. ror ebp, 25
  1663. xor ebp, edi
  1664. ror edi, 5
  1665. xor ebp, edi
  1666. add edx, ebp
  1667. mov ebp, [rsp+8*4+((1024+15-((10)-2)) MOD (16))*4]
  1668. mov edi, [rsp+8*4+((1024+15-((10)-15)) MOD (16))*4]
  1669. mov ebx, ebp
  1670. shr ebp, 10
  1671. ror ebx, 17
  1672. xor ebp, ebx
  1673. ror ebx, 2
  1674. xor ebx, ebp
  1675. add ebx, [rsp+8*4+((1024+15-((10)-7)) MOD (16))*4]
  1676. mov ebp, edi
  1677. shr ebp, 3
  1678. ror edi, 7
  1679. add ebx, [rsp+8*4+((1024+15-(10)) MOD (16))*4]
  1680. xor ebp, edi
  1681. add edx, [rsi+(10)*4]
  1682. ror edi, 11
  1683. add edx, [rsp+((1024+7-(10)) MOD (8))*4]
  1684. xor ebp, edi
  1685. add ebp, ebx
  1686. mov [rsp+8*4+((1024+15-(10)) MOD (16))*4], ebp
  1687. add edx, ebp
  1688. mov ebx, ecx
  1689. xor ecx, [rsp+((1024+7-(10+6)) MOD (8))*4]
  1690. and eax, ecx
  1691. xor eax, [rsp+((1024+7-(10+6)) MOD (8))*4]
  1692. mov ebp, ebx
  1693. ror ebx, 2
  1694. add eax, edx
  1695. add edx, [rsp+((1024+7-(10+4)) MOD (8))*4]
  1696. mov [rsp+((1024+7-(10+4)) MOD (8))*4], edx
  1697. ror ebp, 22
  1698. xor ebp, ebx
  1699. ror ebx, 11
  1700. xor ebp, ebx
  1701. add eax, ebp
  1702. mov [rsp+((1024+7-(10)) MOD (8))*4], eax
  1703. mov edi, [rsp+((1024+7-(11+2)) MOD (8))*4]
  1704. xor edi, [rsp+((1024+7-(11+1)) MOD (8))*4]
  1705. and edi, edx
  1706. xor edi, [rsp+((1024+7-(11+1)) MOD (8))*4]
  1707. mov ebp, edx
  1708. ror edx, 6
  1709. ror ebp, 25
  1710. xor ebp, edx
  1711. ror edx, 5
  1712. xor ebp, edx
  1713. add edi, ebp
  1714. mov ebp, [rsp+8*4+((1024+15-((11)-2)) MOD (16))*4]
  1715. mov edx, [rsp+8*4+((1024+15-((11)-15)) MOD (16))*4]
  1716. mov ebx, ebp
  1717. shr ebp, 10
  1718. ror ebx, 17
  1719. xor ebp, ebx
  1720. ror ebx, 2
  1721. xor ebx, ebp
  1722. add ebx, [rsp+8*4+((1024+15-((11)-7)) MOD (16))*4]
  1723. mov ebp, edx
  1724. shr ebp, 3
  1725. ror edx, 7
  1726. add ebx, [rsp+8*4+((1024+15-(11)) MOD (16))*4]
  1727. xor ebp, edx
  1728. add edi, [rsi+(11)*4]
  1729. ror edx, 11
  1730. add edi, [rsp+((1024+7-(11)) MOD (8))*4]
  1731. xor ebp, edx
  1732. add ebp, ebx
  1733. mov [rsp+8*4+((1024+15-(11)) MOD (16))*4], ebp
  1734. add edi, ebp
  1735. mov ebx, eax
  1736. xor eax, [rsp+((1024+7-(11+6)) MOD (8))*4]
  1737. and ecx, eax
  1738. xor ecx, [rsp+((1024+7-(11+6)) MOD (8))*4]
  1739. mov ebp, ebx
  1740. ror ebx, 2
  1741. add ecx, edi
  1742. add edi, [rsp+((1024+7-(11+4)) MOD (8))*4]
  1743. mov [rsp+((1024+7-(11+4)) MOD (8))*4], edi
  1744. ror ebp, 22
  1745. xor ebp, ebx
  1746. ror ebx, 11
  1747. xor ebp, ebx
  1748. add ecx, ebp
  1749. mov [rsp+((1024+7-(11)) MOD (8))*4], ecx
  1750. mov edx, [rsp+((1024+7-(12+2)) MOD (8))*4]
  1751. xor edx, [rsp+((1024+7-(12+1)) MOD (8))*4]
  1752. and edx, edi
  1753. xor edx, [rsp+((1024+7-(12+1)) MOD (8))*4]
  1754. mov ebp, edi
  1755. ror edi, 6
  1756. ror ebp, 25
  1757. xor ebp, edi
  1758. ror edi, 5
  1759. xor ebp, edi
  1760. add edx, ebp
  1761. mov ebp, [rsp+8*4+((1024+15-((12)-2)) MOD (16))*4]
  1762. mov edi, [rsp+8*4+((1024+15-((12)-15)) MOD (16))*4]
  1763. mov ebx, ebp
  1764. shr ebp, 10
  1765. ror ebx, 17
  1766. xor ebp, ebx
  1767. ror ebx, 2
  1768. xor ebx, ebp
  1769. add ebx, [rsp+8*4+((1024+15-((12)-7)) MOD (16))*4]
  1770. mov ebp, edi
  1771. shr ebp, 3
  1772. ror edi, 7
  1773. add ebx, [rsp+8*4+((1024+15-(12)) MOD (16))*4]
  1774. xor ebp, edi
  1775. add edx, [rsi+(12)*4]
  1776. ror edi, 11
  1777. add edx, [rsp+((1024+7-(12)) MOD (8))*4]
  1778. xor ebp, edi
  1779. add ebp, ebx
  1780. mov [rsp+8*4+((1024+15-(12)) MOD (16))*4], ebp
  1781. add edx, ebp
  1782. mov ebx, ecx
  1783. xor ecx, [rsp+((1024+7-(12+6)) MOD (8))*4]
  1784. and eax, ecx
  1785. xor eax, [rsp+((1024+7-(12+6)) MOD (8))*4]
  1786. mov ebp, ebx
  1787. ror ebx, 2
  1788. add eax, edx
  1789. add edx, [rsp+((1024+7-(12+4)) MOD (8))*4]
  1790. mov [rsp+((1024+7-(12+4)) MOD (8))*4], edx
  1791. ror ebp, 22
  1792. xor ebp, ebx
  1793. ror ebx, 11
  1794. xor ebp, ebx
  1795. add eax, ebp
  1796. mov [rsp+((1024+7-(12)) MOD (8))*4], eax
  1797. mov edi, [rsp+((1024+7-(13+2)) MOD (8))*4]
  1798. xor edi, [rsp+((1024+7-(13+1)) MOD (8))*4]
  1799. and edi, edx
  1800. xor edi, [rsp+((1024+7-(13+1)) MOD (8))*4]
  1801. mov ebp, edx
  1802. ror edx, 6
  1803. ror ebp, 25
  1804. xor ebp, edx
  1805. ror edx, 5
  1806. xor ebp, edx
  1807. add edi, ebp
  1808. mov ebp, [rsp+8*4+((1024+15-((13)-2)) MOD (16))*4]
  1809. mov edx, [rsp+8*4+((1024+15-((13)-15)) MOD (16))*4]
  1810. mov ebx, ebp
  1811. shr ebp, 10
  1812. ror ebx, 17
  1813. xor ebp, ebx
  1814. ror ebx, 2
  1815. xor ebx, ebp
  1816. add ebx, [rsp+8*4+((1024+15-((13)-7)) MOD (16))*4]
  1817. mov ebp, edx
  1818. shr ebp, 3
  1819. ror edx, 7
  1820. add ebx, [rsp+8*4+((1024+15-(13)) MOD (16))*4]
  1821. xor ebp, edx
  1822. add edi, [rsi+(13)*4]
  1823. ror edx, 11
  1824. add edi, [rsp+((1024+7-(13)) MOD (8))*4]
  1825. xor ebp, edx
  1826. add ebp, ebx
  1827. mov [rsp+8*4+((1024+15-(13)) MOD (16))*4], ebp
  1828. add edi, ebp
  1829. mov ebx, eax
  1830. xor eax, [rsp+((1024+7-(13+6)) MOD (8))*4]
  1831. and ecx, eax
  1832. xor ecx, [rsp+((1024+7-(13+6)) MOD (8))*4]
  1833. mov ebp, ebx
  1834. ror ebx, 2
  1835. add ecx, edi
  1836. add edi, [rsp+((1024+7-(13+4)) MOD (8))*4]
  1837. mov [rsp+((1024+7-(13+4)) MOD (8))*4], edi
  1838. ror ebp, 22
  1839. xor ebp, ebx
  1840. ror ebx, 11
  1841. xor ebp, ebx
  1842. add ecx, ebp
  1843. mov [rsp+((1024+7-(13)) MOD (8))*4], ecx
  1844. mov edx, [rsp+((1024+7-(14+2)) MOD (8))*4]
  1845. xor edx, [rsp+((1024+7-(14+1)) MOD (8))*4]
  1846. and edx, edi
  1847. xor edx, [rsp+((1024+7-(14+1)) MOD (8))*4]
  1848. mov ebp, edi
  1849. ror edi, 6
  1850. ror ebp, 25
  1851. xor ebp, edi
  1852. ror edi, 5
  1853. xor ebp, edi
  1854. add edx, ebp
  1855. mov ebp, [rsp+8*4+((1024+15-((14)-2)) MOD (16))*4]
  1856. mov edi, [rsp+8*4+((1024+15-((14)-15)) MOD (16))*4]
  1857. mov ebx, ebp
  1858. shr ebp, 10
  1859. ror ebx, 17
  1860. xor ebp, ebx
  1861. ror ebx, 2
  1862. xor ebx, ebp
  1863. add ebx, [rsp+8*4+((1024+15-((14)-7)) MOD (16))*4]
  1864. mov ebp, edi
  1865. shr ebp, 3
  1866. ror edi, 7
  1867. add ebx, [rsp+8*4+((1024+15-(14)) MOD (16))*4]
  1868. xor ebp, edi
  1869. add edx, [rsi+(14)*4]
  1870. ror edi, 11
  1871. add edx, [rsp+((1024+7-(14)) MOD (8))*4]
  1872. xor ebp, edi
  1873. add ebp, ebx
  1874. mov [rsp+8*4+((1024+15-(14)) MOD (16))*4], ebp
  1875. add edx, ebp
  1876. mov ebx, ecx
  1877. xor ecx, [rsp+((1024+7-(14+6)) MOD (8))*4]
  1878. and eax, ecx
  1879. xor eax, [rsp+((1024+7-(14+6)) MOD (8))*4]
  1880. mov ebp, ebx
  1881. ror ebx, 2
  1882. add eax, edx
  1883. add edx, [rsp+((1024+7-(14+4)) MOD (8))*4]
  1884. mov [rsp+((1024+7-(14+4)) MOD (8))*4], edx
  1885. ror ebp, 22
  1886. xor ebp, ebx
  1887. ror ebx, 11
  1888. xor ebp, ebx
  1889. add eax, ebp
  1890. mov [rsp+((1024+7-(14)) MOD (8))*4], eax
  1891. mov edi, [rsp+((1024+7-(15+2)) MOD (8))*4]
  1892. xor edi, [rsp+((1024+7-(15+1)) MOD (8))*4]
  1893. and edi, edx
  1894. xor edi, [rsp+((1024+7-(15+1)) MOD (8))*4]
  1895. mov ebp, edx
  1896. ror edx, 6
  1897. ror ebp, 25
  1898. xor ebp, edx
  1899. ror edx, 5
  1900. xor ebp, edx
  1901. add edi, ebp
  1902. mov ebp, [rsp+8*4+((1024+15-((15)-2)) MOD (16))*4]
  1903. mov edx, [rsp+8*4+((1024+15-((15)-15)) MOD (16))*4]
  1904. mov ebx, ebp
  1905. shr ebp, 10
  1906. ror ebx, 17
  1907. xor ebp, ebx
  1908. ror ebx, 2
  1909. xor ebx, ebp
  1910. add ebx, [rsp+8*4+((1024+15-((15)-7)) MOD (16))*4]
  1911. mov ebp, edx
  1912. shr ebp, 3
  1913. ror edx, 7
  1914. add ebx, [rsp+8*4+((1024+15-(15)) MOD (16))*4]
  1915. xor ebp, edx
  1916. add edi, [rsi+(15)*4]
  1917. ror edx, 11
  1918. add edi, [rsp+((1024+7-(15)) MOD (8))*4]
  1919. xor ebp, edx
  1920. add ebp, ebx
  1921. mov [rsp+8*4+((1024+15-(15)) MOD (16))*4], ebp
  1922. add edi, ebp
  1923. mov ebx, eax
  1924. xor eax, [rsp+((1024+7-(15+6)) MOD (8))*4]
  1925. and ecx, eax
  1926. xor ecx, [rsp+((1024+7-(15+6)) MOD (8))*4]
  1927. mov ebp, ebx
  1928. ror ebx, 2
  1929. add ecx, edi
  1930. add edi, [rsp+((1024+7-(15+4)) MOD (8))*4]
  1931. mov [rsp+((1024+7-(15+4)) MOD (8))*4], edi
  1932. ror ebp, 22
  1933. xor ebp, ebx
  1934. ror ebx, 11
  1935. xor ebp, ebx
  1936. add ecx, ebp
  1937. mov [rsp+((1024+7-(15)) MOD (8))*4], ecx
  1938. cmp rsi, [rsp+8*4+16*4+0*8]
  1939. jne label1
  1940. mov rcx, [rsp+8*4+16*4+1*8]
  1941. movdqa xmm1, XMMWORD PTR [rcx+1*16]
  1942. movdqa xmm0, XMMWORD PTR [rcx+0*16]
  1943. paddd xmm1, [rsp+((1024+7-(0+3)) MOD (8))*4]
  1944. paddd xmm0, [rsp+((1024+7-(0+7)) MOD (8))*4]
  1945. movdqa [rcx+1*16], xmm1
  1946. movdqa [rcx+0*16], xmm0
  1947. mov rdx, [rsp+8*4+16*4+2*8]
  1948. add rdx, 64
  1949. mov [rsp+8*4+16*4+2*8], rdx
  1950. cmp rdx, [rsp+8*4+16*4+3*8]
  1951. jne label0
  1952. add rsp, 8*4 + 16*4 + 4*8 + 8
  1953. pop rbp
  1954. pop rbx
  1955. pop rdi
  1956. pop rsi
  1957. ret
  1958. X86_SHA256_HashBlocks ENDP
  1959. _TEXT ENDS
  1960. END