• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; This file is generated from a similarly-named Perl script in the BoringSSL
2; source tree. Do not edit by hand.
3
4default	rel
5%define XMMWORD
6%define YMMWORD
7%define ZMMWORD
8
9%ifdef BORINGSSL_PREFIX
10%include "boringssl_prefix_symbols_nasm.inc"
11%endif
12section	.text code align=64
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31ALIGN	16
32_vpaes_encrypt_core:
33
34	mov	r9,rdx
35	mov	r11,16
36	mov	eax,DWORD[240+rdx]
37	movdqa	xmm1,xmm9
38	movdqa	xmm2,XMMWORD[$L$k_ipt]
39	pandn	xmm1,xmm0
40	movdqu	xmm5,XMMWORD[r9]
41	psrld	xmm1,4
42	pand	xmm0,xmm9
43DB	102,15,56,0,208
44	movdqa	xmm0,XMMWORD[(($L$k_ipt+16))]
45DB	102,15,56,0,193
46	pxor	xmm2,xmm5
47	add	r9,16
48	pxor	xmm0,xmm2
49	lea	r10,[$L$k_mc_backward]
50	jmp	NEAR $L$enc_entry
51
52ALIGN	16
53$L$enc_loop:
54
55	movdqa	xmm4,xmm13
56	movdqa	xmm0,xmm12
57DB	102,15,56,0,226
58DB	102,15,56,0,195
59	pxor	xmm4,xmm5
60	movdqa	xmm5,xmm15
61	pxor	xmm0,xmm4
62	movdqa	xmm1,XMMWORD[((-64))+r10*1+r11]
63DB	102,15,56,0,234
64	movdqa	xmm4,XMMWORD[r10*1+r11]
65	movdqa	xmm2,xmm14
66DB	102,15,56,0,211
67	movdqa	xmm3,xmm0
68	pxor	xmm2,xmm5
69DB	102,15,56,0,193
70	add	r9,16
71	pxor	xmm0,xmm2
72DB	102,15,56,0,220
73	add	r11,16
74	pxor	xmm3,xmm0
75DB	102,15,56,0,193
76	and	r11,0x30
77	sub	rax,1
78	pxor	xmm0,xmm3
79
80$L$enc_entry:
81
82	movdqa	xmm1,xmm9
83	movdqa	xmm5,xmm11
84	pandn	xmm1,xmm0
85	psrld	xmm1,4
86	pand	xmm0,xmm9
87DB	102,15,56,0,232
88	movdqa	xmm3,xmm10
89	pxor	xmm0,xmm1
90DB	102,15,56,0,217
91	movdqa	xmm4,xmm10
92	pxor	xmm3,xmm5
93DB	102,15,56,0,224
94	movdqa	xmm2,xmm10
95	pxor	xmm4,xmm5
96DB	102,15,56,0,211
97	movdqa	xmm3,xmm10
98	pxor	xmm2,xmm0
99DB	102,15,56,0,220
100	movdqu	xmm5,XMMWORD[r9]
101	pxor	xmm3,xmm1
102	jnz	NEAR $L$enc_loop
103
104
105	movdqa	xmm4,XMMWORD[((-96))+r10]
106	movdqa	xmm0,XMMWORD[((-80))+r10]
107DB	102,15,56,0,226
108	pxor	xmm4,xmm5
109DB	102,15,56,0,195
110	movdqa	xmm1,XMMWORD[64+r10*1+r11]
111	pxor	xmm0,xmm4
112DB	102,15,56,0,193
113	DB	0F3h,0C3h		;repret
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147ALIGN	16
148_vpaes_encrypt_core_2x:
149
150	mov	r9,rdx
151	mov	r11,16
152	mov	eax,DWORD[240+rdx]
153	movdqa	xmm1,xmm9
154	movdqa	xmm7,xmm9
155	movdqa	xmm2,XMMWORD[$L$k_ipt]
156	movdqa	xmm8,xmm2
157	pandn	xmm1,xmm0
158	pandn	xmm7,xmm6
159	movdqu	xmm5,XMMWORD[r9]
160
161	psrld	xmm1,4
162	psrld	xmm7,4
163	pand	xmm0,xmm9
164	pand	xmm6,xmm9
165DB	102,15,56,0,208
166DB	102,68,15,56,0,198
167	movdqa	xmm0,XMMWORD[(($L$k_ipt+16))]
168	movdqa	xmm6,xmm0
169DB	102,15,56,0,193
170DB	102,15,56,0,247
171	pxor	xmm2,xmm5
172	pxor	xmm8,xmm5
173	add	r9,16
174	pxor	xmm0,xmm2
175	pxor	xmm6,xmm8
176	lea	r10,[$L$k_mc_backward]
177	jmp	NEAR $L$enc2x_entry
178
179ALIGN	16
180$L$enc2x_loop:
181
182	movdqa	xmm4,XMMWORD[$L$k_sb1]
183	movdqa	xmm0,XMMWORD[(($L$k_sb1+16))]
184	movdqa	xmm12,xmm4
185	movdqa	xmm6,xmm0
186DB	102,15,56,0,226
187DB	102,69,15,56,0,224
188DB	102,15,56,0,195
189DB	102,65,15,56,0,243
190	pxor	xmm4,xmm5
191	pxor	xmm12,xmm5
192	movdqa	xmm5,XMMWORD[$L$k_sb2]
193	movdqa	xmm13,xmm5
194	pxor	xmm0,xmm4
195	pxor	xmm6,xmm12
196	movdqa	xmm1,XMMWORD[((-64))+r10*1+r11]
197
198DB	102,15,56,0,234
199DB	102,69,15,56,0,232
200	movdqa	xmm4,XMMWORD[r10*1+r11]
201
202	movdqa	xmm2,XMMWORD[(($L$k_sb2+16))]
203	movdqa	xmm8,xmm2
204DB	102,15,56,0,211
205DB	102,69,15,56,0,195
206	movdqa	xmm3,xmm0
207	movdqa	xmm11,xmm6
208	pxor	xmm2,xmm5
209	pxor	xmm8,xmm13
210DB	102,15,56,0,193
211DB	102,15,56,0,241
212	add	r9,16
213	pxor	xmm0,xmm2
214	pxor	xmm6,xmm8
215DB	102,15,56,0,220
216DB	102,68,15,56,0,220
217	add	r11,16
218	pxor	xmm3,xmm0
219	pxor	xmm11,xmm6
220DB	102,15,56,0,193
221DB	102,15,56,0,241
222	and	r11,0x30
223	sub	rax,1
224	pxor	xmm0,xmm3
225	pxor	xmm6,xmm11
226
227$L$enc2x_entry:
228
229	movdqa	xmm1,xmm9
230	movdqa	xmm7,xmm9
231	movdqa	xmm5,XMMWORD[(($L$k_inv+16))]
232	movdqa	xmm13,xmm5
233	pandn	xmm1,xmm0
234	pandn	xmm7,xmm6
235	psrld	xmm1,4
236	psrld	xmm7,4
237	pand	xmm0,xmm9
238	pand	xmm6,xmm9
239DB	102,15,56,0,232
240DB	102,68,15,56,0,238
241	movdqa	xmm3,xmm10
242	movdqa	xmm11,xmm10
243	pxor	xmm0,xmm1
244	pxor	xmm6,xmm7
245DB	102,15,56,0,217
246DB	102,68,15,56,0,223
247	movdqa	xmm4,xmm10
248	movdqa	xmm12,xmm10
249	pxor	xmm3,xmm5
250	pxor	xmm11,xmm13
251DB	102,15,56,0,224
252DB	102,68,15,56,0,230
253	movdqa	xmm2,xmm10
254	movdqa	xmm8,xmm10
255	pxor	xmm4,xmm5
256	pxor	xmm12,xmm13
257DB	102,15,56,0,211
258DB	102,69,15,56,0,195
259	movdqa	xmm3,xmm10
260	movdqa	xmm11,xmm10
261	pxor	xmm2,xmm0
262	pxor	xmm8,xmm6
263DB	102,15,56,0,220
264DB	102,69,15,56,0,220
265	movdqu	xmm5,XMMWORD[r9]
266
267	pxor	xmm3,xmm1
268	pxor	xmm11,xmm7
269	jnz	NEAR $L$enc2x_loop
270
271
272	movdqa	xmm4,XMMWORD[((-96))+r10]
273	movdqa	xmm0,XMMWORD[((-80))+r10]
274	movdqa	xmm12,xmm4
275	movdqa	xmm6,xmm0
276DB	102,15,56,0,226
277DB	102,69,15,56,0,224
278	pxor	xmm4,xmm5
279	pxor	xmm12,xmm5
280DB	102,15,56,0,195
281DB	102,65,15,56,0,243
282	movdqa	xmm1,XMMWORD[64+r10*1+r11]
283
284	pxor	xmm0,xmm4
285	pxor	xmm6,xmm12
286DB	102,15,56,0,193
287DB	102,15,56,0,241
288	DB	0F3h,0C3h		;repret
289
290
291
292
293
294
295
296
297
298ALIGN	16
299_vpaes_decrypt_core:
300
301	mov	r9,rdx
302	mov	eax,DWORD[240+rdx]
303	movdqa	xmm1,xmm9
304	movdqa	xmm2,XMMWORD[$L$k_dipt]
305	pandn	xmm1,xmm0
306	mov	r11,rax
307	psrld	xmm1,4
308	movdqu	xmm5,XMMWORD[r9]
309	shl	r11,4
310	pand	xmm0,xmm9
311DB	102,15,56,0,208
312	movdqa	xmm0,XMMWORD[(($L$k_dipt+16))]
313	xor	r11,0x30
314	lea	r10,[$L$k_dsbd]
315DB	102,15,56,0,193
316	and	r11,0x30
317	pxor	xmm2,xmm5
318	movdqa	xmm5,XMMWORD[(($L$k_mc_forward+48))]
319	pxor	xmm0,xmm2
320	add	r9,16
321	add	r11,r10
322	jmp	NEAR $L$dec_entry
323
324ALIGN	16
325$L$dec_loop:
326
327
328
329	movdqa	xmm4,XMMWORD[((-32))+r10]
330	movdqa	xmm1,XMMWORD[((-16))+r10]
331DB	102,15,56,0,226
332DB	102,15,56,0,203
333	pxor	xmm0,xmm4
334	movdqa	xmm4,XMMWORD[r10]
335	pxor	xmm0,xmm1
336	movdqa	xmm1,XMMWORD[16+r10]
337
338DB	102,15,56,0,226
339DB	102,15,56,0,197
340DB	102,15,56,0,203
341	pxor	xmm0,xmm4
342	movdqa	xmm4,XMMWORD[32+r10]
343	pxor	xmm0,xmm1
344	movdqa	xmm1,XMMWORD[48+r10]
345
346DB	102,15,56,0,226
347DB	102,15,56,0,197
348DB	102,15,56,0,203
349	pxor	xmm0,xmm4
350	movdqa	xmm4,XMMWORD[64+r10]
351	pxor	xmm0,xmm1
352	movdqa	xmm1,XMMWORD[80+r10]
353
354DB	102,15,56,0,226
355DB	102,15,56,0,197
356DB	102,15,56,0,203
357	pxor	xmm0,xmm4
358	add	r9,16
359DB	102,15,58,15,237,12
360	pxor	xmm0,xmm1
361	sub	rax,1
362
363$L$dec_entry:
364
365	movdqa	xmm1,xmm9
366	pandn	xmm1,xmm0
367	movdqa	xmm2,xmm11
368	psrld	xmm1,4
369	pand	xmm0,xmm9
370DB	102,15,56,0,208
371	movdqa	xmm3,xmm10
372	pxor	xmm0,xmm1
373DB	102,15,56,0,217
374	movdqa	xmm4,xmm10
375	pxor	xmm3,xmm2
376DB	102,15,56,0,224
377	pxor	xmm4,xmm2
378	movdqa	xmm2,xmm10
379DB	102,15,56,0,211
380	movdqa	xmm3,xmm10
381	pxor	xmm2,xmm0
382DB	102,15,56,0,220
383	movdqu	xmm0,XMMWORD[r9]
384	pxor	xmm3,xmm1
385	jnz	NEAR $L$dec_loop
386
387
388	movdqa	xmm4,XMMWORD[96+r10]
389DB	102,15,56,0,226
390	pxor	xmm4,xmm0
391	movdqa	xmm0,XMMWORD[112+r10]
392	movdqa	xmm2,XMMWORD[((-352))+r11]
393DB	102,15,56,0,195
394	pxor	xmm0,xmm4
395DB	102,15,56,0,194
396	DB	0F3h,0C3h		;repret
397
398
399
400
401
402
403
404
405
406ALIGN	16
407_vpaes_schedule_core:
408
409
410
411
412
413
414	call	_vpaes_preheat
415	movdqa	xmm8,XMMWORD[$L$k_rcon]
416	movdqu	xmm0,XMMWORD[rdi]
417
418
419	movdqa	xmm3,xmm0
420	lea	r11,[$L$k_ipt]
421	call	_vpaes_schedule_transform
422	movdqa	xmm7,xmm0
423
424	lea	r10,[$L$k_sr]
425	test	rcx,rcx
426	jnz	NEAR $L$schedule_am_decrypting
427
428
429	movdqu	XMMWORD[rdx],xmm0
430	jmp	NEAR $L$schedule_go
431
432$L$schedule_am_decrypting:
433
434	movdqa	xmm1,XMMWORD[r10*1+r8]
435DB	102,15,56,0,217
436	movdqu	XMMWORD[rdx],xmm3
437	xor	r8,0x30
438
439$L$schedule_go:
440	cmp	esi,192
441	ja	NEAR $L$schedule_256
442	je	NEAR $L$schedule_192
443
444
445
446
447
448
449
450
451
452
453$L$schedule_128:
454	mov	esi,10
455
456$L$oop_schedule_128:
457	call	_vpaes_schedule_round
458	dec	rsi
459	jz	NEAR $L$schedule_mangle_last
460	call	_vpaes_schedule_mangle
461	jmp	NEAR $L$oop_schedule_128
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478ALIGN	16
479$L$schedule_192:
480	movdqu	xmm0,XMMWORD[8+rdi]
481	call	_vpaes_schedule_transform
482	movdqa	xmm6,xmm0
483	pxor	xmm4,xmm4
484	movhlps	xmm6,xmm4
485	mov	esi,4
486
487$L$oop_schedule_192:
488	call	_vpaes_schedule_round
489DB	102,15,58,15,198,8
490	call	_vpaes_schedule_mangle
491	call	_vpaes_schedule_192_smear
492	call	_vpaes_schedule_mangle
493	call	_vpaes_schedule_round
494	dec	rsi
495	jz	NEAR $L$schedule_mangle_last
496	call	_vpaes_schedule_mangle
497	call	_vpaes_schedule_192_smear
498	jmp	NEAR $L$oop_schedule_192
499
500
501
502
503
504
505
506
507
508
509
510ALIGN	16
511$L$schedule_256:
512	movdqu	xmm0,XMMWORD[16+rdi]
513	call	_vpaes_schedule_transform
514	mov	esi,7
515
516$L$oop_schedule_256:
517	call	_vpaes_schedule_mangle
518	movdqa	xmm6,xmm0
519
520
521	call	_vpaes_schedule_round
522	dec	rsi
523	jz	NEAR $L$schedule_mangle_last
524	call	_vpaes_schedule_mangle
525
526
527	pshufd	xmm0,xmm0,0xFF
528	movdqa	xmm5,xmm7
529	movdqa	xmm7,xmm6
530	call	_vpaes_schedule_low_round
531	movdqa	xmm7,xmm5
532
533	jmp	NEAR $L$oop_schedule_256
534
535
536
537
538
539
540
541
542
543
544
545
546ALIGN	16
547$L$schedule_mangle_last:
548
549	lea	r11,[$L$k_deskew]
550	test	rcx,rcx
551	jnz	NEAR $L$schedule_mangle_last_dec
552
553
554	movdqa	xmm1,XMMWORD[r10*1+r8]
555DB	102,15,56,0,193
556	lea	r11,[$L$k_opt]
557	add	rdx,32
558
559$L$schedule_mangle_last_dec:
560	add	rdx,-16
561	pxor	xmm0,XMMWORD[$L$k_s63]
562	call	_vpaes_schedule_transform
563	movdqu	XMMWORD[rdx],xmm0
564
565
566	pxor	xmm0,xmm0
567	pxor	xmm1,xmm1
568	pxor	xmm2,xmm2
569	pxor	xmm3,xmm3
570	pxor	xmm4,xmm4
571	pxor	xmm5,xmm5
572	pxor	xmm6,xmm6
573	pxor	xmm7,xmm7
574	DB	0F3h,0C3h		;repret
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593ALIGN	16
594_vpaes_schedule_192_smear:
595
596	pshufd	xmm1,xmm6,0x80
597	pshufd	xmm0,xmm7,0xFE
598	pxor	xmm6,xmm1
599	pxor	xmm1,xmm1
600	pxor	xmm6,xmm0
601	movdqa	xmm0,xmm6
602	movhlps	xmm6,xmm1
603	DB	0F3h,0C3h		;repret
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626ALIGN	16
627_vpaes_schedule_round:
628
629
630	pxor	xmm1,xmm1
631DB	102,65,15,58,15,200,15
632DB	102,69,15,58,15,192,15
633	pxor	xmm7,xmm1
634
635
636	pshufd	xmm0,xmm0,0xFF
637DB	102,15,58,15,192,1
638
639
640
641
642_vpaes_schedule_low_round:
643
644	movdqa	xmm1,xmm7
645	pslldq	xmm7,4
646	pxor	xmm7,xmm1
647	movdqa	xmm1,xmm7
648	pslldq	xmm7,8
649	pxor	xmm7,xmm1
650	pxor	xmm7,XMMWORD[$L$k_s63]
651
652
653	movdqa	xmm1,xmm9
654	pandn	xmm1,xmm0
655	psrld	xmm1,4
656	pand	xmm0,xmm9
657	movdqa	xmm2,xmm11
658DB	102,15,56,0,208
659	pxor	xmm0,xmm1
660	movdqa	xmm3,xmm10
661DB	102,15,56,0,217
662	pxor	xmm3,xmm2
663	movdqa	xmm4,xmm10
664DB	102,15,56,0,224
665	pxor	xmm4,xmm2
666	movdqa	xmm2,xmm10
667DB	102,15,56,0,211
668	pxor	xmm2,xmm0
669	movdqa	xmm3,xmm10
670DB	102,15,56,0,220
671	pxor	xmm3,xmm1
672	movdqa	xmm4,xmm13
673DB	102,15,56,0,226
674	movdqa	xmm0,xmm12
675DB	102,15,56,0,195
676	pxor	xmm0,xmm4
677
678
679	pxor	xmm0,xmm7
680	movdqa	xmm7,xmm0
681	DB	0F3h,0C3h		;repret
682
683
684
685
686
687
688
689
690
691
692
693
694
695ALIGN	16
696_vpaes_schedule_transform:
697
698	movdqa	xmm1,xmm9
699	pandn	xmm1,xmm0
700	psrld	xmm1,4
701	pand	xmm0,xmm9
702	movdqa	xmm2,XMMWORD[r11]
703DB	102,15,56,0,208
704	movdqa	xmm0,XMMWORD[16+r11]
705DB	102,15,56,0,193
706	pxor	xmm0,xmm2
707	DB	0F3h,0C3h		;repret
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735ALIGN	16
736_vpaes_schedule_mangle:
737
738	movdqa	xmm4,xmm0
739	movdqa	xmm5,XMMWORD[$L$k_mc_forward]
740	test	rcx,rcx
741	jnz	NEAR $L$schedule_mangle_dec
742
743
744	add	rdx,16
745	pxor	xmm4,XMMWORD[$L$k_s63]
746DB	102,15,56,0,229
747	movdqa	xmm3,xmm4
748DB	102,15,56,0,229
749	pxor	xmm3,xmm4
750DB	102,15,56,0,229
751	pxor	xmm3,xmm4
752
753	jmp	NEAR $L$schedule_mangle_both
754ALIGN	16
755$L$schedule_mangle_dec:
756
757	lea	r11,[$L$k_dksd]
758	movdqa	xmm1,xmm9
759	pandn	xmm1,xmm4
760	psrld	xmm1,4
761	pand	xmm4,xmm9
762
763	movdqa	xmm2,XMMWORD[r11]
764DB	102,15,56,0,212
765	movdqa	xmm3,XMMWORD[16+r11]
766DB	102,15,56,0,217
767	pxor	xmm3,xmm2
768DB	102,15,56,0,221
769
770	movdqa	xmm2,XMMWORD[32+r11]
771DB	102,15,56,0,212
772	pxor	xmm2,xmm3
773	movdqa	xmm3,XMMWORD[48+r11]
774DB	102,15,56,0,217
775	pxor	xmm3,xmm2
776DB	102,15,56,0,221
777
778	movdqa	xmm2,XMMWORD[64+r11]
779DB	102,15,56,0,212
780	pxor	xmm2,xmm3
781	movdqa	xmm3,XMMWORD[80+r11]
782DB	102,15,56,0,217
783	pxor	xmm3,xmm2
784DB	102,15,56,0,221
785
786	movdqa	xmm2,XMMWORD[96+r11]
787DB	102,15,56,0,212
788	pxor	xmm2,xmm3
789	movdqa	xmm3,XMMWORD[112+r11]
790DB	102,15,56,0,217
791	pxor	xmm3,xmm2
792
793	add	rdx,-16
794
795$L$schedule_mangle_both:
796	movdqa	xmm1,XMMWORD[r10*1+r8]
797DB	102,15,56,0,217
798	add	r8,-16
799	and	r8,0x30
800	movdqu	XMMWORD[rdx],xmm3
801	DB	0F3h,0C3h		;repret
802
803
804
805
806
807
808global	vpaes_set_encrypt_key
809
810ALIGN	16
811vpaes_set_encrypt_key:
812	mov	QWORD[8+rsp],rdi	;WIN64 prologue
813	mov	QWORD[16+rsp],rsi
814	mov	rax,rsp
815$L$SEH_begin_vpaes_set_encrypt_key:
816	mov	rdi,rcx
817	mov	rsi,rdx
818	mov	rdx,r8
819
820
821
822%ifdef BORINGSSL_DISPATCH_TEST
823EXTERN	BORINGSSL_function_hit
824	mov	BYTE[((BORINGSSL_function_hit+5))],1
825%endif
826
827	lea	rsp,[((-184))+rsp]
828	movaps	XMMWORD[16+rsp],xmm6
829	movaps	XMMWORD[32+rsp],xmm7
830	movaps	XMMWORD[48+rsp],xmm8
831	movaps	XMMWORD[64+rsp],xmm9
832	movaps	XMMWORD[80+rsp],xmm10
833	movaps	XMMWORD[96+rsp],xmm11
834	movaps	XMMWORD[112+rsp],xmm12
835	movaps	XMMWORD[128+rsp],xmm13
836	movaps	XMMWORD[144+rsp],xmm14
837	movaps	XMMWORD[160+rsp],xmm15
838$L$enc_key_body:
839	mov	eax,esi
840	shr	eax,5
841	add	eax,5
842	mov	DWORD[240+rdx],eax
843
844	mov	ecx,0
845	mov	r8d,0x30
846	call	_vpaes_schedule_core
847	movaps	xmm6,XMMWORD[16+rsp]
848	movaps	xmm7,XMMWORD[32+rsp]
849	movaps	xmm8,XMMWORD[48+rsp]
850	movaps	xmm9,XMMWORD[64+rsp]
851	movaps	xmm10,XMMWORD[80+rsp]
852	movaps	xmm11,XMMWORD[96+rsp]
853	movaps	xmm12,XMMWORD[112+rsp]
854	movaps	xmm13,XMMWORD[128+rsp]
855	movaps	xmm14,XMMWORD[144+rsp]
856	movaps	xmm15,XMMWORD[160+rsp]
857	lea	rsp,[184+rsp]
858$L$enc_key_epilogue:
859	xor	eax,eax
860	mov	rdi,QWORD[8+rsp]	;WIN64 epilogue
861	mov	rsi,QWORD[16+rsp]
862	DB	0F3h,0C3h		;repret
863
864$L$SEH_end_vpaes_set_encrypt_key:
865
866global	vpaes_set_decrypt_key
867
868ALIGN	16
869vpaes_set_decrypt_key:
870	mov	QWORD[8+rsp],rdi	;WIN64 prologue
871	mov	QWORD[16+rsp],rsi
872	mov	rax,rsp
873$L$SEH_begin_vpaes_set_decrypt_key:
874	mov	rdi,rcx
875	mov	rsi,rdx
876	mov	rdx,r8
877
878
879
880	lea	rsp,[((-184))+rsp]
881	movaps	XMMWORD[16+rsp],xmm6
882	movaps	XMMWORD[32+rsp],xmm7
883	movaps	XMMWORD[48+rsp],xmm8
884	movaps	XMMWORD[64+rsp],xmm9
885	movaps	XMMWORD[80+rsp],xmm10
886	movaps	XMMWORD[96+rsp],xmm11
887	movaps	XMMWORD[112+rsp],xmm12
888	movaps	XMMWORD[128+rsp],xmm13
889	movaps	XMMWORD[144+rsp],xmm14
890	movaps	XMMWORD[160+rsp],xmm15
891$L$dec_key_body:
892	mov	eax,esi
893	shr	eax,5
894	add	eax,5
895	mov	DWORD[240+rdx],eax
896	shl	eax,4
897	lea	rdx,[16+rax*1+rdx]
898
899	mov	ecx,1
900	mov	r8d,esi
901	shr	r8d,1
902	and	r8d,32
903	xor	r8d,32
904	call	_vpaes_schedule_core
905	movaps	xmm6,XMMWORD[16+rsp]
906	movaps	xmm7,XMMWORD[32+rsp]
907	movaps	xmm8,XMMWORD[48+rsp]
908	movaps	xmm9,XMMWORD[64+rsp]
909	movaps	xmm10,XMMWORD[80+rsp]
910	movaps	xmm11,XMMWORD[96+rsp]
911	movaps	xmm12,XMMWORD[112+rsp]
912	movaps	xmm13,XMMWORD[128+rsp]
913	movaps	xmm14,XMMWORD[144+rsp]
914	movaps	xmm15,XMMWORD[160+rsp]
915	lea	rsp,[184+rsp]
916$L$dec_key_epilogue:
917	xor	eax,eax
918	mov	rdi,QWORD[8+rsp]	;WIN64 epilogue
919	mov	rsi,QWORD[16+rsp]
920	DB	0F3h,0C3h		;repret
921
922$L$SEH_end_vpaes_set_decrypt_key:
923
924global	vpaes_encrypt
925
926ALIGN	16
927vpaes_encrypt:
928	mov	QWORD[8+rsp],rdi	;WIN64 prologue
929	mov	QWORD[16+rsp],rsi
930	mov	rax,rsp
931$L$SEH_begin_vpaes_encrypt:
932	mov	rdi,rcx
933	mov	rsi,rdx
934	mov	rdx,r8
935
936
937
938%ifdef BORINGSSL_DISPATCH_TEST
939EXTERN	BORINGSSL_function_hit
940	mov	BYTE[((BORINGSSL_function_hit+4))],1
941%endif
942	lea	rsp,[((-184))+rsp]
943	movaps	XMMWORD[16+rsp],xmm6
944	movaps	XMMWORD[32+rsp],xmm7
945	movaps	XMMWORD[48+rsp],xmm8
946	movaps	XMMWORD[64+rsp],xmm9
947	movaps	XMMWORD[80+rsp],xmm10
948	movaps	XMMWORD[96+rsp],xmm11
949	movaps	XMMWORD[112+rsp],xmm12
950	movaps	XMMWORD[128+rsp],xmm13
951	movaps	XMMWORD[144+rsp],xmm14
952	movaps	XMMWORD[160+rsp],xmm15
953$L$enc_body:
954	movdqu	xmm0,XMMWORD[rdi]
955	call	_vpaes_preheat
956	call	_vpaes_encrypt_core
957	movdqu	XMMWORD[rsi],xmm0
958	movaps	xmm6,XMMWORD[16+rsp]
959	movaps	xmm7,XMMWORD[32+rsp]
960	movaps	xmm8,XMMWORD[48+rsp]
961	movaps	xmm9,XMMWORD[64+rsp]
962	movaps	xmm10,XMMWORD[80+rsp]
963	movaps	xmm11,XMMWORD[96+rsp]
964	movaps	xmm12,XMMWORD[112+rsp]
965	movaps	xmm13,XMMWORD[128+rsp]
966	movaps	xmm14,XMMWORD[144+rsp]
967	movaps	xmm15,XMMWORD[160+rsp]
968	lea	rsp,[184+rsp]
969$L$enc_epilogue:
970	mov	rdi,QWORD[8+rsp]	;WIN64 epilogue
971	mov	rsi,QWORD[16+rsp]
972	DB	0F3h,0C3h		;repret
973
974$L$SEH_end_vpaes_encrypt:
975
976global	vpaes_decrypt
977
978ALIGN	16
979vpaes_decrypt:
980	mov	QWORD[8+rsp],rdi	;WIN64 prologue
981	mov	QWORD[16+rsp],rsi
982	mov	rax,rsp
983$L$SEH_begin_vpaes_decrypt:
984	mov	rdi,rcx
985	mov	rsi,rdx
986	mov	rdx,r8
987
988
989
990	lea	rsp,[((-184))+rsp]
991	movaps	XMMWORD[16+rsp],xmm6
992	movaps	XMMWORD[32+rsp],xmm7
993	movaps	XMMWORD[48+rsp],xmm8
994	movaps	XMMWORD[64+rsp],xmm9
995	movaps	XMMWORD[80+rsp],xmm10
996	movaps	XMMWORD[96+rsp],xmm11
997	movaps	XMMWORD[112+rsp],xmm12
998	movaps	XMMWORD[128+rsp],xmm13
999	movaps	XMMWORD[144+rsp],xmm14
1000	movaps	XMMWORD[160+rsp],xmm15
1001$L$dec_body:
1002	movdqu	xmm0,XMMWORD[rdi]
1003	call	_vpaes_preheat
1004	call	_vpaes_decrypt_core
1005	movdqu	XMMWORD[rsi],xmm0
1006	movaps	xmm6,XMMWORD[16+rsp]
1007	movaps	xmm7,XMMWORD[32+rsp]
1008	movaps	xmm8,XMMWORD[48+rsp]
1009	movaps	xmm9,XMMWORD[64+rsp]
1010	movaps	xmm10,XMMWORD[80+rsp]
1011	movaps	xmm11,XMMWORD[96+rsp]
1012	movaps	xmm12,XMMWORD[112+rsp]
1013	movaps	xmm13,XMMWORD[128+rsp]
1014	movaps	xmm14,XMMWORD[144+rsp]
1015	movaps	xmm15,XMMWORD[160+rsp]
1016	lea	rsp,[184+rsp]
1017$L$dec_epilogue:
1018	mov	rdi,QWORD[8+rsp]	;WIN64 epilogue
1019	mov	rsi,QWORD[16+rsp]
1020	DB	0F3h,0C3h		;repret
1021
1022$L$SEH_end_vpaes_decrypt:
1023global	vpaes_cbc_encrypt
1024
1025ALIGN	16
1026vpaes_cbc_encrypt:
1027	mov	QWORD[8+rsp],rdi	;WIN64 prologue
1028	mov	QWORD[16+rsp],rsi
1029	mov	rax,rsp
1030$L$SEH_begin_vpaes_cbc_encrypt:
1031	mov	rdi,rcx
1032	mov	rsi,rdx
1033	mov	rdx,r8
1034	mov	rcx,r9
1035	mov	r8,QWORD[40+rsp]
1036	mov	r9,QWORD[48+rsp]
1037
1038
1039
1040	xchg	rdx,rcx
1041	sub	rcx,16
1042	jc	NEAR $L$cbc_abort
1043	lea	rsp,[((-184))+rsp]
1044	movaps	XMMWORD[16+rsp],xmm6
1045	movaps	XMMWORD[32+rsp],xmm7
1046	movaps	XMMWORD[48+rsp],xmm8
1047	movaps	XMMWORD[64+rsp],xmm9
1048	movaps	XMMWORD[80+rsp],xmm10
1049	movaps	XMMWORD[96+rsp],xmm11
1050	movaps	XMMWORD[112+rsp],xmm12
1051	movaps	XMMWORD[128+rsp],xmm13
1052	movaps	XMMWORD[144+rsp],xmm14
1053	movaps	XMMWORD[160+rsp],xmm15
1054$L$cbc_body:
1055	movdqu	xmm6,XMMWORD[r8]
1056	sub	rsi,rdi
1057	call	_vpaes_preheat
1058	cmp	r9d,0
1059	je	NEAR $L$cbc_dec_loop
1060	jmp	NEAR $L$cbc_enc_loop
1061ALIGN	16
1062$L$cbc_enc_loop:
1063	movdqu	xmm0,XMMWORD[rdi]
1064	pxor	xmm0,xmm6
1065	call	_vpaes_encrypt_core
1066	movdqa	xmm6,xmm0
1067	movdqu	XMMWORD[rdi*1+rsi],xmm0
1068	lea	rdi,[16+rdi]
1069	sub	rcx,16
1070	jnc	NEAR $L$cbc_enc_loop
1071	jmp	NEAR $L$cbc_done
1072ALIGN	16
1073$L$cbc_dec_loop:
1074	movdqu	xmm0,XMMWORD[rdi]
1075	movdqa	xmm7,xmm0
1076	call	_vpaes_decrypt_core
1077	pxor	xmm0,xmm6
1078	movdqa	xmm6,xmm7
1079	movdqu	XMMWORD[rdi*1+rsi],xmm0
1080	lea	rdi,[16+rdi]
1081	sub	rcx,16
1082	jnc	NEAR $L$cbc_dec_loop
1083$L$cbc_done:
1084	movdqu	XMMWORD[r8],xmm6
1085	movaps	xmm6,XMMWORD[16+rsp]
1086	movaps	xmm7,XMMWORD[32+rsp]
1087	movaps	xmm8,XMMWORD[48+rsp]
1088	movaps	xmm9,XMMWORD[64+rsp]
1089	movaps	xmm10,XMMWORD[80+rsp]
1090	movaps	xmm11,XMMWORD[96+rsp]
1091	movaps	xmm12,XMMWORD[112+rsp]
1092	movaps	xmm13,XMMWORD[128+rsp]
1093	movaps	xmm14,XMMWORD[144+rsp]
1094	movaps	xmm15,XMMWORD[160+rsp]
1095	lea	rsp,[184+rsp]
1096$L$cbc_epilogue:
1097$L$cbc_abort:
1098	mov	rdi,QWORD[8+rsp]	;WIN64 epilogue
1099	mov	rsi,QWORD[16+rsp]
1100	DB	0F3h,0C3h		;repret
1101
1102$L$SEH_end_vpaes_cbc_encrypt:
1103global	vpaes_ctr32_encrypt_blocks
1104
1105ALIGN	16
1106vpaes_ctr32_encrypt_blocks:
1107	mov	QWORD[8+rsp],rdi	;WIN64 prologue
1108	mov	QWORD[16+rsp],rsi
1109	mov	rax,rsp
1110$L$SEH_begin_vpaes_ctr32_encrypt_blocks:
1111	mov	rdi,rcx
1112	mov	rsi,rdx
1113	mov	rdx,r8
1114	mov	rcx,r9
1115	mov	r8,QWORD[40+rsp]
1116
1117
1118
1119
1120	xchg	rdx,rcx
1121	test	rcx,rcx
1122	jz	NEAR $L$ctr32_abort
1123	lea	rsp,[((-184))+rsp]
1124	movaps	XMMWORD[16+rsp],xmm6
1125	movaps	XMMWORD[32+rsp],xmm7
1126	movaps	XMMWORD[48+rsp],xmm8
1127	movaps	XMMWORD[64+rsp],xmm9
1128	movaps	XMMWORD[80+rsp],xmm10
1129	movaps	XMMWORD[96+rsp],xmm11
1130	movaps	XMMWORD[112+rsp],xmm12
1131	movaps	XMMWORD[128+rsp],xmm13
1132	movaps	XMMWORD[144+rsp],xmm14
1133	movaps	XMMWORD[160+rsp],xmm15
1134$L$ctr32_body:
1135	movdqu	xmm0,XMMWORD[r8]
1136	movdqa	xmm8,XMMWORD[$L$ctr_add_one]
1137	sub	rsi,rdi
1138	call	_vpaes_preheat
1139	movdqa	xmm6,xmm0
1140	pshufb	xmm6,XMMWORD[$L$rev_ctr]
1141
1142	test	rcx,1
1143	jz	NEAR $L$ctr32_prep_loop
1144
1145
1146
1147	movdqu	xmm7,XMMWORD[rdi]
1148	call	_vpaes_encrypt_core
1149	pxor	xmm0,xmm7
1150	paddd	xmm6,xmm8
1151	movdqu	XMMWORD[rdi*1+rsi],xmm0
1152	sub	rcx,1
1153	lea	rdi,[16+rdi]
1154	jz	NEAR $L$ctr32_done
1155
1156$L$ctr32_prep_loop:
1157
1158
1159	movdqa	xmm14,xmm6
1160	movdqa	xmm15,xmm6
1161	paddd	xmm15,xmm8
1162
1163$L$ctr32_loop:
1164	movdqa	xmm1,XMMWORD[$L$rev_ctr]
1165	movdqa	xmm0,xmm14
1166	movdqa	xmm6,xmm15
1167DB	102,15,56,0,193
1168DB	102,15,56,0,241
1169	call	_vpaes_encrypt_core_2x
1170	movdqu	xmm1,XMMWORD[rdi]
1171	movdqu	xmm2,XMMWORD[16+rdi]
1172	movdqa	xmm3,XMMWORD[$L$ctr_add_two]
1173	pxor	xmm0,xmm1
1174	pxor	xmm6,xmm2
1175	paddd	xmm14,xmm3
1176	paddd	xmm15,xmm3
1177	movdqu	XMMWORD[rdi*1+rsi],xmm0
1178	movdqu	XMMWORD[16+rdi*1+rsi],xmm6
1179	sub	rcx,2
1180	lea	rdi,[32+rdi]
1181	jnz	NEAR $L$ctr32_loop
1182
1183$L$ctr32_done:
1184	movaps	xmm6,XMMWORD[16+rsp]
1185	movaps	xmm7,XMMWORD[32+rsp]
1186	movaps	xmm8,XMMWORD[48+rsp]
1187	movaps	xmm9,XMMWORD[64+rsp]
1188	movaps	xmm10,XMMWORD[80+rsp]
1189	movaps	xmm11,XMMWORD[96+rsp]
1190	movaps	xmm12,XMMWORD[112+rsp]
1191	movaps	xmm13,XMMWORD[128+rsp]
1192	movaps	xmm14,XMMWORD[144+rsp]
1193	movaps	xmm15,XMMWORD[160+rsp]
1194	lea	rsp,[184+rsp]
1195$L$ctr32_epilogue:
1196$L$ctr32_abort:
1197	mov	rdi,QWORD[8+rsp]	;WIN64 epilogue
1198	mov	rsi,QWORD[16+rsp]
1199	DB	0F3h,0C3h		;repret
1200
1201$L$SEH_end_vpaes_ctr32_encrypt_blocks:
1202
1203
1204
1205
1206
1207
1208
1209ALIGN	16
1210_vpaes_preheat:
1211
1212	lea	r10,[$L$k_s0F]
1213	movdqa	xmm10,XMMWORD[((-32))+r10]
1214	movdqa	xmm11,XMMWORD[((-16))+r10]
1215	movdqa	xmm9,XMMWORD[r10]
1216	movdqa	xmm13,XMMWORD[48+r10]
1217	movdqa	xmm12,XMMWORD[64+r10]
1218	movdqa	xmm15,XMMWORD[80+r10]
1219	movdqa	xmm14,XMMWORD[96+r10]
1220	DB	0F3h,0C3h		;repret
1221
1222
1223
1224
1225
1226
1227
1228
1229ALIGN	64
1230_vpaes_consts:
1231$L$k_inv:
1232	DQ	0x0E05060F0D080180,0x040703090A0B0C02
1233	DQ	0x01040A060F0B0780,0x030D0E0C02050809
1234
1235$L$k_s0F:
1236	DQ	0x0F0F0F0F0F0F0F0F,0x0F0F0F0F0F0F0F0F
1237
1238$L$k_ipt:
1239	DQ	0xC2B2E8985A2A7000,0xCABAE09052227808
1240	DQ	0x4C01307D317C4D00,0xCD80B1FCB0FDCC81
1241
1242$L$k_sb1:
1243	DQ	0xB19BE18FCB503E00,0xA5DF7A6E142AF544
1244	DQ	0x3618D415FAE22300,0x3BF7CCC10D2ED9EF
1245$L$k_sb2:
1246	DQ	0xE27A93C60B712400,0x5EB7E955BC982FCD
1247	DQ	0x69EB88400AE12900,0xC2A163C8AB82234A
1248$L$k_sbo:
1249	DQ	0xD0D26D176FBDC700,0x15AABF7AC502A878
1250	DQ	0xCFE474A55FBB6A00,0x8E1E90D1412B35FA
1251
1252$L$k_mc_forward:
1253	DQ	0x0407060500030201,0x0C0F0E0D080B0A09
1254	DQ	0x080B0A0904070605,0x000302010C0F0E0D
1255	DQ	0x0C0F0E0D080B0A09,0x0407060500030201
1256	DQ	0x000302010C0F0E0D,0x080B0A0904070605
1257
1258$L$k_mc_backward:
1259	DQ	0x0605040702010003,0x0E0D0C0F0A09080B
1260	DQ	0x020100030E0D0C0F,0x0A09080B06050407
1261	DQ	0x0E0D0C0F0A09080B,0x0605040702010003
1262	DQ	0x0A09080B06050407,0x020100030E0D0C0F
1263
1264$L$k_sr:
1265	DQ	0x0706050403020100,0x0F0E0D0C0B0A0908
1266	DQ	0x030E09040F0A0500,0x0B06010C07020D08
1267	DQ	0x0F060D040B020900,0x070E050C030A0108
1268	DQ	0x0B0E0104070A0D00,0x0306090C0F020508
1269
1270$L$k_rcon:
1271	DQ	0x1F8391B9AF9DEEB6,0x702A98084D7C7D81
1272
1273$L$k_s63:
1274	DQ	0x5B5B5B5B5B5B5B5B,0x5B5B5B5B5B5B5B5B
1275
1276$L$k_opt:
1277	DQ	0xFF9F4929D6B66000,0xF7974121DEBE6808
1278	DQ	0x01EDBD5150BCEC00,0xE10D5DB1B05C0CE0
1279
1280$L$k_deskew:
1281	DQ	0x07E4A34047A4E300,0x1DFEB95A5DBEF91A
1282	DQ	0x5F36B5DC83EA6900,0x2841C2ABF49D1E77
1283
1284
1285
1286
1287
1288$L$k_dksd:
1289	DQ	0xFEB91A5DA3E44700,0x0740E3A45A1DBEF9
1290	DQ	0x41C277F4B5368300,0x5FDC69EAAB289D1E
1291$L$k_dksb:
1292	DQ	0x9A4FCA1F8550D500,0x03D653861CC94C99
1293	DQ	0x115BEDA7B6FC4A00,0xD993256F7E3482C8
1294$L$k_dkse:
1295	DQ	0xD5031CCA1FC9D600,0x53859A4C994F5086
1296	DQ	0xA23196054FDC7BE8,0xCD5EF96A20B31487
1297$L$k_dks9:
1298	DQ	0xB6116FC87ED9A700,0x4AED933482255BFC
1299	DQ	0x4576516227143300,0x8BB89FACE9DAFDCE
1300
1301
1302
1303
1304
1305$L$k_dipt:
1306	DQ	0x0F505B040B545F00,0x154A411E114E451A
1307	DQ	0x86E383E660056500,0x12771772F491F194
1308
1309$L$k_dsb9:
1310	DQ	0x851C03539A86D600,0xCAD51F504F994CC9
1311	DQ	0xC03B1789ECD74900,0x725E2C9EB2FBA565
1312$L$k_dsbd:
1313	DQ	0x7D57CCDFE6B1A200,0xF56E9B13882A4439
1314	DQ	0x3CE2FAF724C6CB00,0x2931180D15DEEFD3
1315$L$k_dsbb:
1316	DQ	0xD022649296B44200,0x602646F6B0F2D404
1317	DQ	0xC19498A6CD596700,0xF3FF0C3E3255AA6B
1318$L$k_dsbe:
1319	DQ	0x46F2929626D4D000,0x2242600464B4F6B0
1320	DQ	0x0C55A6CDFFAAC100,0x9467F36B98593E32
1321$L$k_dsbo:
1322	DQ	0x1387EA537EF94000,0xC7AA6DB9D4943E2D
1323	DQ	0x12D7560F93441D00,0xCA4B8159D8C58E9C
1324
1325
1326$L$rev_ctr:
1327	DQ	0x0706050403020100,0x0c0d0e0f0b0a0908
1328
1329
1330$L$ctr_add_one:
1331	DQ	0x0000000000000000,0x0000000100000000
1332$L$ctr_add_two:
1333	DQ	0x0000000000000000,0x0000000200000000
1334
1335DB	86,101,99,116,111,114,32,80,101,114,109,117,116,97,116,105
1336DB	111,110,32,65,69,83,32,102,111,114,32,120,56,54,95,54
1337DB	52,47,83,83,83,69,51,44,32,77,105,107,101,32,72,97
1338DB	109,98,117,114,103,32,40,83,116,97,110,102,111,114,100,32
1339DB	85,110,105,118,101,114,115,105,116,121,41,0
1340ALIGN	64
1341
1342EXTERN	__imp_RtlVirtualUnwind
1343
1344ALIGN	16
1345se_handler:
1346	push	rsi
1347	push	rdi
1348	push	rbx
1349	push	rbp
1350	push	r12
1351	push	r13
1352	push	r14
1353	push	r15
1354	pushfq
1355	sub	rsp,64
1356
1357	mov	rax,QWORD[120+r8]
1358	mov	rbx,QWORD[248+r8]
1359
1360	mov	rsi,QWORD[8+r9]
1361	mov	r11,QWORD[56+r9]
1362
1363	mov	r10d,DWORD[r11]
1364	lea	r10,[r10*1+rsi]
1365	cmp	rbx,r10
1366	jb	NEAR $L$in_prologue
1367
1368	mov	rax,QWORD[152+r8]
1369
1370	mov	r10d,DWORD[4+r11]
1371	lea	r10,[r10*1+rsi]
1372	cmp	rbx,r10
1373	jae	NEAR $L$in_prologue
1374
1375	lea	rsi,[16+rax]
1376	lea	rdi,[512+r8]
1377	mov	ecx,20
1378	DD	0xa548f3fc
1379	lea	rax,[184+rax]
1380
1381$L$in_prologue:
1382	mov	rdi,QWORD[8+rax]
1383	mov	rsi,QWORD[16+rax]
1384	mov	QWORD[152+r8],rax
1385	mov	QWORD[168+r8],rsi
1386	mov	QWORD[176+r8],rdi
1387
1388	mov	rdi,QWORD[40+r9]
1389	mov	rsi,r8
1390	mov	ecx,154
1391	DD	0xa548f3fc
1392
1393	mov	rsi,r9
1394	xor	rcx,rcx
1395	mov	rdx,QWORD[8+rsi]
1396	mov	r8,QWORD[rsi]
1397	mov	r9,QWORD[16+rsi]
1398	mov	r10,QWORD[40+rsi]
1399	lea	r11,[56+rsi]
1400	lea	r12,[24+rsi]
1401	mov	QWORD[32+rsp],r10
1402	mov	QWORD[40+rsp],r11
1403	mov	QWORD[48+rsp],r12
1404	mov	QWORD[56+rsp],rcx
1405	call	QWORD[__imp_RtlVirtualUnwind]
1406
1407	mov	eax,1
1408	add	rsp,64
1409	popfq
1410	pop	r15
1411	pop	r14
1412	pop	r13
1413	pop	r12
1414	pop	rbp
1415	pop	rbx
1416	pop	rdi
1417	pop	rsi
1418	DB	0F3h,0C3h		;repret
1419
1420
1421section	.pdata rdata align=4
1422ALIGN	4
1423	DD	$L$SEH_begin_vpaes_set_encrypt_key wrt ..imagebase
1424	DD	$L$SEH_end_vpaes_set_encrypt_key wrt ..imagebase
1425	DD	$L$SEH_info_vpaes_set_encrypt_key wrt ..imagebase
1426
1427	DD	$L$SEH_begin_vpaes_set_decrypt_key wrt ..imagebase
1428	DD	$L$SEH_end_vpaes_set_decrypt_key wrt ..imagebase
1429	DD	$L$SEH_info_vpaes_set_decrypt_key wrt ..imagebase
1430
1431	DD	$L$SEH_begin_vpaes_encrypt wrt ..imagebase
1432	DD	$L$SEH_end_vpaes_encrypt wrt ..imagebase
1433	DD	$L$SEH_info_vpaes_encrypt wrt ..imagebase
1434
1435	DD	$L$SEH_begin_vpaes_decrypt wrt ..imagebase
1436	DD	$L$SEH_end_vpaes_decrypt wrt ..imagebase
1437	DD	$L$SEH_info_vpaes_decrypt wrt ..imagebase
1438
1439	DD	$L$SEH_begin_vpaes_cbc_encrypt wrt ..imagebase
1440	DD	$L$SEH_end_vpaes_cbc_encrypt wrt ..imagebase
1441	DD	$L$SEH_info_vpaes_cbc_encrypt wrt ..imagebase
1442
1443	DD	$L$SEH_begin_vpaes_ctr32_encrypt_blocks wrt ..imagebase
1444	DD	$L$SEH_end_vpaes_ctr32_encrypt_blocks wrt ..imagebase
1445	DD	$L$SEH_info_vpaes_ctr32_encrypt_blocks wrt ..imagebase
1446
1447section	.xdata rdata align=8
1448ALIGN	8
1449$L$SEH_info_vpaes_set_encrypt_key:
1450DB	9,0,0,0
1451	DD	se_handler wrt ..imagebase
1452	DD	$L$enc_key_body wrt ..imagebase,$L$enc_key_epilogue wrt ..imagebase
1453$L$SEH_info_vpaes_set_decrypt_key:
1454DB	9,0,0,0
1455	DD	se_handler wrt ..imagebase
1456	DD	$L$dec_key_body wrt ..imagebase,$L$dec_key_epilogue wrt ..imagebase
1457$L$SEH_info_vpaes_encrypt:
1458DB	9,0,0,0
1459	DD	se_handler wrt ..imagebase
1460	DD	$L$enc_body wrt ..imagebase,$L$enc_epilogue wrt ..imagebase
1461$L$SEH_info_vpaes_decrypt:
1462DB	9,0,0,0
1463	DD	se_handler wrt ..imagebase
1464	DD	$L$dec_body wrt ..imagebase,$L$dec_epilogue wrt ..imagebase
1465$L$SEH_info_vpaes_cbc_encrypt:
1466DB	9,0,0,0
1467	DD	se_handler wrt ..imagebase
1468	DD	$L$cbc_body wrt ..imagebase,$L$cbc_epilogue wrt ..imagebase
1469$L$SEH_info_vpaes_ctr32_encrypt_blocks:
1470DB	9,0,0,0
1471	DD	se_handler wrt ..imagebase
1472	DD	$L$ctr32_body wrt ..imagebase,$L$ctr32_epilogue wrt ..imagebase
1473