1 %ifidn __OUTPUT_FORMAT__
,obj
2 section code use32 class
=code
align=64
3 %elifidn __OUTPUT_FORMAT__
,win32
4 %ifdef __YASM_VERSION_ID__
5 %if __YASM_VERSION_ID__
< 01010000h
6 %error yasm version
1.1.0 or later needed.
8 ; Yasm automatically includes .00 and complains about redefining it.
9 ; https://www.tortall.net/projects/yasm/manual/html/objfmt-win32-safeseh.html
13 section .text code
align=64
19 dd 218628480,235210255,168496130,67568393
20 dd 252381056,17041926,33884169,51187212
21 dd 252645135,252645135,252645135,252645135
22 dd 1512730624,3266504856,1377990664,3401244816
23 dd 830229760,1275146365,2969422977,3447763452
24 dd 3411033600,2979783055,338359620,2782886510
25 dd 4209124096,907596821,221174255,1006095553
26 dd 191964160,3799684038,3164090317,1589111125
27 dd 182528256,1777043520,2877432650,3265356744
28 dd 1874708224,3503451415,3305285752,363511674
29 dd 1606117888,3487855781,1093350906,2384367825
30 dd 197121,67569157,134941193,202313229
31 dd 67569157,134941193,202313229,197121
32 dd 134941193,202313229,197121,67569157
33 dd 202313229,197121,67569157,134941193
34 dd 33619971,100992007,168364043,235736079
35 dd 235736079,33619971,100992007,168364043
36 dd 168364043,235736079,33619971,100992007
37 dd 100992007,168364043,235736079,33619971
38 dd 50462976,117835012,185207048,252579084
39 dd 252314880,51251460,117574920,184942860
40 dd 184682752,252054788,50987272,118359308
41 dd 118099200,185467140,251790600,50727180
42 dd 2946363062,528716217,1300004225,1881839624
43 dd 1532713819,1532713819,1532713819,1532713819
44 dd 3602276352,4288629033,3737020424,4153884961
45 dd 1354558464,32357713,2958822624,3775749553
46 dd 1201988352,132424512,1572796698,503232858
47 dd 2213177600,1597421020,4103937655,675398315
48 dd 2749646592,4273543773,1511898873,121693092
49 dd 3040248576,1103263732,2871565598,1608280554
50 dd 2236667136,2588920351,482954393,64377734
51 dd 3069987328,291237287,2117370568,3650299247
52 dd 533321216,3573750986,2572112006,1401264716
53 dd 1339849704,2721158661,548607111,3445553514
54 dd 2128193280,3054596040,2183486460,1257083700
55 dd 655635200,1165381986,3923443150,2344132524
56 dd 190078720,256924420,290342170,357187870
57 dd 1610966272,2263057382,4103205268,309794674
58 dd 2592527872,2233205587,1335446729,3402964816
59 dd 3973531904,3225098121,3002836325,1918774430
60 dd 3870401024,2102906079,2284471353,4117666579
61 dd 617007872,1021508343,366931923,691083277
62 dd 2528395776,3491914898,2968704004,1613121270
63 dd 3445188352,3247741094,844474987,4093578302
64 dd 651481088,1190302358,1689581232,574775300
65 dd 4289380608,206939853,2555985458,2489840491
66 dd 2130264064,327674451,3566485037,3349835193
67 dd 2470714624,316102159,3636825756,3393945945
68 db 86,101,99,116,111,114,32,80,101,114,109,117,116,97,116,105
69 db 111,110,32,65,69,83,32,102,111,114,32,120,56,54,47,83
70 db 83,83,69,51,44,32,77,105,107,101,32,72,97,109,98,117
71 db 114,103,32,40,83,116,97,110,102,111,114,100,32,85,110,105
72 db 118,101,114,115,105,116,121,41,0
83 mov eax,DWORD [240+edx]
97 jmp NEAR L
$000enc_entry
107 movdqa xmm1
,[ecx*1+ebx-64]
110 movdqa xmm4
,[ecx*1+ebx]
145 jnz NEAR L
$001enc_loop
147 movdqa xmm0
,[112+ebp]
151 movdqa xmm1
,[64+ecx*1+ebx]
156 __vpaes_decrypt_core:
158 mov eax,DWORD [240+edx]
173 movdqa xmm5
,[176+ebp]
176 lea ecx,[ecx*1+ebx-352]
177 jmp NEAR L
$002dec_entry
207 db 102,15,58,15,237,12
231 jnz NEAR L
$003dec_loop
235 movdqa xmm0
,[112+ebx]
242 __vpaes_schedule_core:
245 movdqa xmm2
,[320+ebp]
249 call __vpaes_schedule_transform
252 jnz NEAR L
$004schedule_am_decrypting
254 jmp NEAR L
$005schedule_go
255 L
$004schedule_am_decrypting
:
256 movdqa xmm1
,[256+ecx*1+ebp]
262 ja NEAR L
$006schedule_256
263 je NEAR L
$007schedule_192
266 L
$009loop_schedule_128
:
267 call __vpaes_schedule_round
269 jz NEAR L
$010schedule_mangle_last
270 call __vpaes_schedule_mangle
271 jmp NEAR L
$009loop_schedule_128
275 call __vpaes_schedule_transform
280 L
$011loop_schedule_192
:
281 call __vpaes_schedule_round
282 db 102,15,58,15,198,8
283 call __vpaes_schedule_mangle
284 call __vpaes_schedule_192_smear
285 call __vpaes_schedule_mangle
286 call __vpaes_schedule_round
288 jz NEAR L
$010schedule_mangle_last
289 call __vpaes_schedule_mangle
290 call __vpaes_schedule_192_smear
291 jmp NEAR L
$011loop_schedule_192
295 call __vpaes_schedule_transform
297 L
$012loop_schedule_256
:
298 call __vpaes_schedule_mangle
300 call __vpaes_schedule_round
302 jz NEAR L
$010schedule_mangle_last
303 call __vpaes_schedule_mangle
307 call L$_vpaes_schedule_low_round
309 jmp NEAR L
$012loop_schedule_256
311 L
$010schedule_mangle_last
:
314 jnz NEAR L
$013schedule_mangle_last_dec
315 movdqa xmm1
,[256+ecx*1+ebp]
319 L
$013schedule_mangle_last_dec
:
322 call __vpaes_schedule_transform
334 __vpaes_schedule_192_smear:
344 __vpaes_schedule_round:
347 db 102,15,58,15,202,15
348 db 102,15,58,15,210,15
351 db 102,15,58,15,192,1
353 L$
_vpaes_schedule_low_round:
391 __vpaes_schedule_transform:
404 __vpaes_schedule_mangle:
406 movdqa xmm5
,[128+ebp]
408 jnz NEAR L
$014schedule_mangle_dec
417 jmp NEAR L
$015schedule_mangle_both
419 L
$014schedule_mangle_dec
:
449 movdqa xmm3
,[112+esi]
453 L
$015schedule_mangle_both
:
454 movdqa xmm1
,[256+ecx*1+ebp]
460 global _vpaes_set_encrypt_key
462 _vpaes_set_encrypt_key:
463 L$
_vpaes_set_encrypt_key_begin:
468 mov esi,DWORD [20+esp]
470 mov eax,DWORD [24+esp]
472 mov edx,DWORD [28+esp]
474 mov DWORD [48+esp],ebx
478 mov DWORD [240+edx],ebx
481 lea ebp,[(L$_vpaes_consts
+0x30-L
$016pic_point
)]
482 call __vpaes_schedule_core
484 mov esp,DWORD [48+esp]
491 global _vpaes_set_decrypt_key
493 _vpaes_set_decrypt_key:
494 L$
_vpaes_set_decrypt_key_begin:
499 mov esi,DWORD [20+esp]
501 mov eax,DWORD [24+esp]
503 mov edx,DWORD [28+esp]
505 mov DWORD [48+esp],ebx
509 mov DWORD [240+edx],ebx
511 lea edx,[16+ebx*1+edx]
517 lea ebp,[(L$_vpaes_consts
+0x30-L
$017pic_point
)]
518 call __vpaes_schedule_core
520 mov esp,DWORD [48+esp]
527 global _vpaes_encrypt
530 L$
_vpaes_encrypt_begin:
535 lea ebp,[(L$_vpaes_consts
+0x30-L
$018pic_point
)]
538 mov esi,DWORD [20+esp]
540 mov edi,DWORD [24+esp]
542 mov edx,DWORD [28+esp]
544 mov DWORD [48+esp],ebx
546 call __vpaes_encrypt_core
548 mov esp,DWORD [48+esp]
554 global _vpaes_decrypt
557 L$
_vpaes_decrypt_begin:
562 lea ebp,[(L$_vpaes_consts
+0x30-L
$019pic_point
)]
565 mov esi,DWORD [20+esp]
567 mov edi,DWORD [24+esp]
569 mov edx,DWORD [28+esp]
571 mov DWORD [48+esp],ebx
573 call __vpaes_decrypt_core
575 mov esp,DWORD [48+esp]
581 global _vpaes_cbc_encrypt
584 L$
_vpaes_cbc_encrypt_begin:
589 mov esi,DWORD [20+esp]
590 mov edi,DWORD [24+esp]
591 mov eax,DWORD [28+esp]
592 mov edx,DWORD [32+esp]
594 jc NEAR L
$020cbc_abort
596 mov ebp,DWORD [36+esp]
598 mov ecx,DWORD [40+esp]
602 mov DWORD [48+esp],ebx
604 mov DWORD [4+esp],edx
605 mov DWORD [8+esp],ebp
607 lea ebp,[(L$_vpaes_consts
+0x30-L
$021pic_point
)]
611 je NEAR L
$022cbc_dec_loop
612 jmp NEAR L
$023cbc_enc_loop
617 call __vpaes_encrypt_core
619 mov edx,DWORD [4+esp]
621 movdqu
[esi*1+ebx],xmm0
624 jnc NEAR L
$023cbc_enc_loop
625 jmp NEAR L
$024cbc_done
631 call __vpaes_decrypt_core
633 mov edx,DWORD [4+esp]
636 movdqu
[esi*1+ebx],xmm0
639 jnc NEAR L
$022cbc_dec_loop
641 mov ebx,DWORD [8+esp]
642 mov esp,DWORD [48+esp]