5 section .text code
align=64
28 mov eax,DWORD[240+rdx
]
30 movdqa xmm2
,XMMWORD
[$L$k_ipt
]
32 movdqu xmm5
,XMMWORD
[r9
]
36 movdqa xmm0
,XMMWORD
[(($L$k_ipt
+16))]
41 lea r10
,[$L$k_mc_backward
]
54 movdqa xmm1
,XMMWORD
[((-64))+r10
*1+r11
]
56 movdqa xmm4
,XMMWORD
[r10
*1+r11
]
92 movdqu xmm5
,XMMWORD
[r9
]
97 movdqa xmm4
,XMMWORD
[((-96))+r10
]
98 movdqa xmm0
,XMMWORD
[((-80))+r10
]
102 movdqa xmm1
,XMMWORD
[64+r10
*1+r11
]
117 mov eax,DWORD[240+rdx
]
119 movdqa xmm2
,XMMWORD
[$L$k_dipt
]
123 movdqu xmm5
,XMMWORD
[r9
]
127 movdqa xmm0
,XMMWORD
[(($L$k_dipt
+16))]
133 movdqa xmm5
,XMMWORD
[(($L$k_mc_forward
+48))]
137 jmp NEAR $L
$dec_entry
144 movdqa xmm4
,XMMWORD
[((-32))+r10
]
145 movdqa xmm1
,XMMWORD
[((-16))+r10
]
149 movdqa xmm4
,XMMWORD
[r10
]
151 movdqa xmm1
,XMMWORD
[16+r10
]
157 movdqa xmm4
,XMMWORD
[32+r10
]
159 movdqa xmm1
,XMMWORD
[48+r10
]
165 movdqa xmm4
,XMMWORD
[64+r10
]
167 movdqa xmm1
,XMMWORD
[80+r10
]
174 DB 102,15,58,15,237,12
198 movdqu xmm0
,XMMWORD
[r9
]
203 movdqa xmm4
,XMMWORD
[96+r10
]
206 movdqa xmm0
,XMMWORD
[112+r10
]
207 movdqa xmm2
,XMMWORD
[((-352))+r11
]
221 _vpaes_schedule_core:
228 movdqa xmm8
,XMMWORD
[$L$k_rcon
]
229 movdqu xmm0
,XMMWORD
[rdi
]
234 call _vpaes_schedule_transform
239 jnz NEAR $L$schedule_am_decrypting
242 movdqu XMMWORD
[rdx
],xmm0
243 jmp NEAR $L$schedule_go
245 $L$
schedule_am_decrypting:
247 movdqa xmm1
,XMMWORD
[r10
*1+r8
]
249 movdqu XMMWORD
[rdx
],xmm3
254 ja NEAR $L$schedule_256
255 je NEAR $L$schedule_192
270 call _vpaes_schedule_round
272 jz NEAR $L$schedule_mangle_last
273 call _vpaes_schedule_mangle
274 jmp NEAR $L$oop_schedule_128
293 movdqu xmm0
,XMMWORD
[8+rdi
]
294 call _vpaes_schedule_transform
301 call _vpaes_schedule_round
302 DB 102,15,58,15,198,8
303 call _vpaes_schedule_mangle
304 call _vpaes_schedule_192_smear
305 call _vpaes_schedule_mangle
306 call _vpaes_schedule_round
308 jz NEAR $L$schedule_mangle_last
309 call _vpaes_schedule_mangle
310 call _vpaes_schedule_192_smear
311 jmp NEAR $L$oop_schedule_192
325 movdqu xmm0
,XMMWORD
[16+rdi
]
326 call _vpaes_schedule_transform
330 call _vpaes_schedule_mangle
334 call _vpaes_schedule_round
336 jz NEAR $L$schedule_mangle_last
337 call _vpaes_schedule_mangle
340 pshufd xmm0
,xmm0
,0xFF
343 call _vpaes_schedule_low_round
346 jmp NEAR $L$oop_schedule_256
360 $L$
schedule_mangle_last:
362 lea r11
,[$L$k_deskew
]
364 jnz NEAR $L$schedule_mangle_last_dec
367 movdqa xmm1
,XMMWORD
[r10
*1+r8
]
372 $L$
schedule_mangle_last_dec:
374 pxor xmm0
,XMMWORD
[$L$k_s63
]
375 call _vpaes_schedule_transform
376 movdqu XMMWORD
[rdx
],xmm0
406 _vpaes_schedule_192_smear:
407 pshufd xmm1
,xmm6
,0x80
408 pshufd xmm0
,xmm7
,0xFE
437 _vpaes_schedule_round:
440 DB 102,65,15,58,15,200,15
441 DB 102,69,15,58,15,192,15
445 pshufd xmm0
,xmm0
,0xFF
446 DB 102,15,58,15,192,1
451 _vpaes_schedule_low_round:
459 pxor xmm7
,XMMWORD
[$L$k_s63
]
504 _vpaes_schedule_transform:
509 movdqa xmm2
,XMMWORD
[r11
]
511 movdqa xmm0
,XMMWORD
[16+r11
]
542 _vpaes_schedule_mangle:
544 movdqa xmm5
,XMMWORD
[$L$k_mc_forward
]
546 jnz NEAR $L$schedule_mangle_dec
550 pxor xmm4
,XMMWORD
[$L$k_s63
]
558 jmp NEAR $L$schedule_mangle_both
560 $L$
schedule_mangle_dec:
568 movdqa xmm2
,XMMWORD
[r11
]
570 movdqa xmm3
,XMMWORD
[16+r11
]
575 movdqa xmm2
,XMMWORD
[32+r11
]
578 movdqa xmm3
,XMMWORD
[48+r11
]
583 movdqa xmm2
,XMMWORD
[64+r11
]
586 movdqa xmm3
,XMMWORD
[80+r11
]
591 movdqa xmm2
,XMMWORD
[96+r11
]
594 movdqa xmm3
,XMMWORD
[112+r11
]
600 $L$
schedule_mangle_both:
601 movdqa xmm1
,XMMWORD
[r10
*1+r8
]
605 movdqu XMMWORD
[rdx
],xmm3
612 global vpaes_set_encrypt_key
615 vpaes_set_encrypt_key:
616 mov QWORD[8+rsp
],rdi
;WIN64 prologue
617 mov QWORD[16+rsp
],rsi
619 $L$
SEH_begin_vpaes_set_encrypt_key:
625 lea rsp
,[((-184))+rsp
]
626 movaps XMMWORD
[16+rsp
],xmm6
627 movaps XMMWORD
[32+rsp
],xmm7
628 movaps XMMWORD
[48+rsp
],xmm8
629 movaps XMMWORD
[64+rsp
],xmm9
630 movaps XMMWORD
[80+rsp
],xmm10
631 movaps XMMWORD
[96+rsp
],xmm11
632 movaps XMMWORD
[112+rsp
],xmm12
633 movaps XMMWORD
[128+rsp
],xmm13
634 movaps XMMWORD
[144+rsp
],xmm14
635 movaps XMMWORD
[160+rsp
],xmm15
640 mov DWORD[240+rdx
],eax
644 call _vpaes_schedule_core
645 movaps xmm6
,XMMWORD
[16+rsp
]
646 movaps xmm7
,XMMWORD
[32+rsp
]
647 movaps xmm8
,XMMWORD
[48+rsp
]
648 movaps xmm9
,XMMWORD
[64+rsp
]
649 movaps xmm10
,XMMWORD
[80+rsp
]
650 movaps xmm11
,XMMWORD
[96+rsp
]
651 movaps xmm12
,XMMWORD
[112+rsp
]
652 movaps xmm13
,XMMWORD
[128+rsp
]
653 movaps xmm14
,XMMWORD
[144+rsp
]
654 movaps xmm15
,XMMWORD
[160+rsp
]
658 mov rdi
,QWORD[8+rsp
] ;WIN64 epilogue
659 mov rsi
,QWORD[16+rsp
]
661 $L$
SEH_end_vpaes_set_encrypt_key:
663 global vpaes_set_decrypt_key
666 vpaes_set_decrypt_key:
667 mov QWORD[8+rsp
],rdi
;WIN64 prologue
668 mov QWORD[16+rsp
],rsi
670 $L$
SEH_begin_vpaes_set_decrypt_key:
676 lea rsp
,[((-184))+rsp
]
677 movaps XMMWORD
[16+rsp
],xmm6
678 movaps XMMWORD
[32+rsp
],xmm7
679 movaps XMMWORD
[48+rsp
],xmm8
680 movaps XMMWORD
[64+rsp
],xmm9
681 movaps XMMWORD
[80+rsp
],xmm10
682 movaps XMMWORD
[96+rsp
],xmm11
683 movaps XMMWORD
[112+rsp
],xmm12
684 movaps XMMWORD
[128+rsp
],xmm13
685 movaps XMMWORD
[144+rsp
],xmm14
686 movaps XMMWORD
[160+rsp
],xmm15
691 mov DWORD[240+rdx
],eax
693 lea rdx
,[16+rax
*1+rdx
]
700 call _vpaes_schedule_core
701 movaps xmm6
,XMMWORD
[16+rsp
]
702 movaps xmm7
,XMMWORD
[32+rsp
]
703 movaps xmm8
,XMMWORD
[48+rsp
]
704 movaps xmm9
,XMMWORD
[64+rsp
]
705 movaps xmm10
,XMMWORD
[80+rsp
]
706 movaps xmm11
,XMMWORD
[96+rsp
]
707 movaps xmm12
,XMMWORD
[112+rsp
]
708 movaps xmm13
,XMMWORD
[128+rsp
]
709 movaps xmm14
,XMMWORD
[144+rsp
]
710 movaps xmm15
,XMMWORD
[160+rsp
]
714 mov rdi
,QWORD[8+rsp
] ;WIN64 epilogue
715 mov rsi
,QWORD[16+rsp
]
717 $L$
SEH_end_vpaes_set_decrypt_key:
723 mov QWORD[8+rsp
],rdi
;WIN64 prologue
724 mov QWORD[16+rsp
],rsi
726 $L$
SEH_begin_vpaes_encrypt:
732 lea rsp
,[((-184))+rsp
]
733 movaps XMMWORD
[16+rsp
],xmm6
734 movaps XMMWORD
[32+rsp
],xmm7
735 movaps XMMWORD
[48+rsp
],xmm8
736 movaps XMMWORD
[64+rsp
],xmm9
737 movaps XMMWORD
[80+rsp
],xmm10
738 movaps XMMWORD
[96+rsp
],xmm11
739 movaps XMMWORD
[112+rsp
],xmm12
740 movaps XMMWORD
[128+rsp
],xmm13
741 movaps XMMWORD
[144+rsp
],xmm14
742 movaps XMMWORD
[160+rsp
],xmm15
744 movdqu xmm0
,XMMWORD
[rdi
]
746 call _vpaes_encrypt_core
747 movdqu XMMWORD
[rsi
],xmm0
748 movaps xmm6
,XMMWORD
[16+rsp
]
749 movaps xmm7
,XMMWORD
[32+rsp
]
750 movaps xmm8
,XMMWORD
[48+rsp
]
751 movaps xmm9
,XMMWORD
[64+rsp
]
752 movaps xmm10
,XMMWORD
[80+rsp
]
753 movaps xmm11
,XMMWORD
[96+rsp
]
754 movaps xmm12
,XMMWORD
[112+rsp
]
755 movaps xmm13
,XMMWORD
[128+rsp
]
756 movaps xmm14
,XMMWORD
[144+rsp
]
757 movaps xmm15
,XMMWORD
[160+rsp
]
760 mov rdi
,QWORD[8+rsp
] ;WIN64 epilogue
761 mov rsi
,QWORD[16+rsp
]
763 $L$
SEH_end_vpaes_encrypt:
769 mov QWORD[8+rsp
],rdi
;WIN64 prologue
770 mov QWORD[16+rsp
],rsi
772 $L$
SEH_begin_vpaes_decrypt:
778 lea rsp
,[((-184))+rsp
]
779 movaps XMMWORD
[16+rsp
],xmm6
780 movaps XMMWORD
[32+rsp
],xmm7
781 movaps XMMWORD
[48+rsp
],xmm8
782 movaps XMMWORD
[64+rsp
],xmm9
783 movaps XMMWORD
[80+rsp
],xmm10
784 movaps XMMWORD
[96+rsp
],xmm11
785 movaps XMMWORD
[112+rsp
],xmm12
786 movaps XMMWORD
[128+rsp
],xmm13
787 movaps XMMWORD
[144+rsp
],xmm14
788 movaps XMMWORD
[160+rsp
],xmm15
790 movdqu xmm0
,XMMWORD
[rdi
]
792 call _vpaes_decrypt_core
793 movdqu XMMWORD
[rsi
],xmm0
794 movaps xmm6
,XMMWORD
[16+rsp
]
795 movaps xmm7
,XMMWORD
[32+rsp
]
796 movaps xmm8
,XMMWORD
[48+rsp
]
797 movaps xmm9
,XMMWORD
[64+rsp
]
798 movaps xmm10
,XMMWORD
[80+rsp
]
799 movaps xmm11
,XMMWORD
[96+rsp
]
800 movaps xmm12
,XMMWORD
[112+rsp
]
801 movaps xmm13
,XMMWORD
[128+rsp
]
802 movaps xmm14
,XMMWORD
[144+rsp
]
803 movaps xmm15
,XMMWORD
[160+rsp
]
806 mov rdi
,QWORD[8+rsp
] ;WIN64 epilogue
807 mov rsi
,QWORD[16+rsp
]
809 $L$
SEH_end_vpaes_decrypt:
810 global vpaes_cbc_encrypt
814 mov QWORD[8+rsp
],rdi
;WIN64 prologue
815 mov QWORD[16+rsp
],rsi
817 $L$
SEH_begin_vpaes_cbc_encrypt:
829 lea rsp
,[((-184))+rsp
]
830 movaps XMMWORD
[16+rsp
],xmm6
831 movaps XMMWORD
[32+rsp
],xmm7
832 movaps XMMWORD
[48+rsp
],xmm8
833 movaps XMMWORD
[64+rsp
],xmm9
834 movaps XMMWORD
[80+rsp
],xmm10
835 movaps XMMWORD
[96+rsp
],xmm11
836 movaps XMMWORD
[112+rsp
],xmm12
837 movaps XMMWORD
[128+rsp
],xmm13
838 movaps XMMWORD
[144+rsp
],xmm14
839 movaps XMMWORD
[160+rsp
],xmm15
841 movdqu xmm6
,XMMWORD
[r8
]
845 je NEAR $L
$cbc_dec_loop
846 jmp NEAR $L
$cbc_enc_loop
849 movdqu xmm0
,XMMWORD
[rdi
]
851 call _vpaes_encrypt_core
853 movdqu XMMWORD
[rdi
*1+rsi
],xmm0
856 jnc NEAR $L
$cbc_enc_loop
860 movdqu xmm0
,XMMWORD
[rdi
]
862 call _vpaes_decrypt_core
865 movdqu XMMWORD
[rdi
*1+rsi
],xmm0
868 jnc NEAR $L
$cbc_dec_loop
870 movdqu XMMWORD
[r8
],xmm6
871 movaps xmm6
,XMMWORD
[16+rsp
]
872 movaps xmm7
,XMMWORD
[32+rsp
]
873 movaps xmm8
,XMMWORD
[48+rsp
]
874 movaps xmm9
,XMMWORD
[64+rsp
]
875 movaps xmm10
,XMMWORD
[80+rsp
]
876 movaps xmm11
,XMMWORD
[96+rsp
]
877 movaps xmm12
,XMMWORD
[112+rsp
]
878 movaps xmm13
,XMMWORD
[128+rsp
]
879 movaps xmm14
,XMMWORD
[144+rsp
]
880 movaps xmm15
,XMMWORD
[160+rsp
]
884 mov rdi
,QWORD[8+rsp
] ;WIN64 epilogue
885 mov rsi
,QWORD[16+rsp
]
887 $L$
SEH_end_vpaes_cbc_encrypt:
898 movdqa xmm10
,XMMWORD
[((-32))+r10
]
899 movdqa xmm11
,XMMWORD
[((-16))+r10
]
900 movdqa xmm9
,XMMWORD
[r10
]
901 movdqa xmm13
,XMMWORD
[48+r10
]
902 movdqa xmm12
,XMMWORD
[64+r10
]
903 movdqa xmm15
,XMMWORD
[80+r10
]
904 movdqa xmm14
,XMMWORD
[96+r10
]
916 DQ 0x0E05060F0D080180,0x040703090A0B0C02
917 DQ 0x01040A060F0B0780,0x030D0E0C02050809
920 DQ 0x0F0F0F0F0F0F0F0F,0x0F0F0F0F0F0F0F0F
923 DQ 0xC2B2E8985A2A7000,0xCABAE09052227808
924 DQ 0x4C01307D317C4D00,0xCD80B1FCB0FDCC81
927 DQ 0xB19BE18FCB503E00,0xA5DF7A6E142AF544
928 DQ 0x3618D415FAE22300,0x3BF7CCC10D2ED9EF
930 DQ 0xE27A93C60B712400,0x5EB7E955BC982FCD
931 DQ 0x69EB88400AE12900,0xC2A163C8AB82234A
933 DQ 0xD0D26D176FBDC700,0x15AABF7AC502A878
934 DQ 0xCFE474A55FBB6A00,0x8E1E90D1412B35FA
937 DQ 0x0407060500030201,0x0C0F0E0D080B0A09
938 DQ 0x080B0A0904070605,0x000302010C0F0E0D
939 DQ 0x0C0F0E0D080B0A09,0x0407060500030201
940 DQ 0x000302010C0F0E0D,0x080B0A0904070605
943 DQ 0x0605040702010003,0x0E0D0C0F0A09080B
944 DQ 0x020100030E0D0C0F,0x0A09080B06050407
945 DQ 0x0E0D0C0F0A09080B,0x0605040702010003
946 DQ 0x0A09080B06050407,0x020100030E0D0C0F
949 DQ 0x0706050403020100,0x0F0E0D0C0B0A0908
950 DQ 0x030E09040F0A0500,0x0B06010C07020D08
951 DQ 0x0F060D040B020900,0x070E050C030A0108
952 DQ 0x0B0E0104070A0D00,0x0306090C0F020508
955 DQ 0x1F8391B9AF9DEEB6,0x702A98084D7C7D81
958 DQ 0x5B5B5B5B5B5B5B5B,0x5B5B5B5B5B5B5B5B
961 DQ 0xFF9F4929D6B66000,0xF7974121DEBE6808
962 DQ 0x01EDBD5150BCEC00,0xE10D5DB1B05C0CE0
965 DQ 0x07E4A34047A4E300,0x1DFEB95A5DBEF91A
966 DQ 0x5F36B5DC83EA6900,0x2841C2ABF49D1E77
973 DQ 0xFEB91A5DA3E44700,0x0740E3A45A1DBEF9
974 DQ 0x41C277F4B5368300,0x5FDC69EAAB289D1E
976 DQ 0x9A4FCA1F8550D500,0x03D653861CC94C99
977 DQ 0x115BEDA7B6FC4A00,0xD993256F7E3482C8
979 DQ 0xD5031CCA1FC9D600,0x53859A4C994F5086
980 DQ 0xA23196054FDC7BE8,0xCD5EF96A20B31487
982 DQ 0xB6116FC87ED9A700,0x4AED933482255BFC
983 DQ 0x4576516227143300,0x8BB89FACE9DAFDCE
990 DQ 0x0F505B040B545F00,0x154A411E114E451A
991 DQ 0x86E383E660056500,0x12771772F491F194
994 DQ 0x851C03539A86D600,0xCAD51F504F994CC9
995 DQ 0xC03B1789ECD74900,0x725E2C9EB2FBA565
997 DQ 0x7D57CCDFE6B1A200,0xF56E9B13882A4439
998 DQ 0x3CE2FAF724C6CB00,0x2931180D15DEEFD3
1000 DQ 0xD022649296B44200,0x602646F6B0F2D404
1001 DQ 0xC19498A6CD596700,0xF3FF0C3E3255AA6B
1003 DQ 0x46F2929626D4D000,0x2242600464B4F6B0
1004 DQ 0x0C55A6CDFFAAC100,0x9467F36B98593E32
1006 DQ 0x1387EA537EF94000,0xC7AA6DB9D4943E2D
1007 DQ 0x12D7560F93441D00,0xCA4B8159D8C58E9C
1008 DB 86,101,99,116,111,114,32,80,101,114,109,117,116,97,116,105
1009 DB 111,110,32,65,69,83,32,102,111,114,32,120,56,54,95,54
1010 DB 52,47,83,83,83,69,51,44,32,77,105,107,101,32,72,97
1011 DB 109,98,117,114,103,32,40,83,116,97,110,102,111,114,100,32
1012 DB 85,110,105,118,101,114,115,105,116,121,41,0
1015 EXTERN __imp_RtlVirtualUnwind
1030 mov rax
,QWORD[120+r8
]
1031 mov rbx
,QWORD[248+r8
]
1034 mov r11
,QWORD[56+r9
]
1039 jb NEAR $L$in_prologue
1041 mov rax
,QWORD[152+r8
]
1043 mov r10d
,DWORD[4+r11
]
1046 jae NEAR $L$in_prologue
1055 mov rdi
,QWORD[8+rax
]
1056 mov rsi
,QWORD[16+rax
]
1057 mov QWORD[152+r8
],rax
1058 mov QWORD[168+r8
],rsi
1059 mov QWORD[176+r8
],rdi
1061 mov rdi
,QWORD[40+r9
]
1068 mov rdx
,QWORD[8+rsi
]
1070 mov r9
,QWORD[16+rsi
]
1071 mov r10
,QWORD[40+rsi
]
1074 mov QWORD[32+rsp
],r10
1075 mov QWORD[40+rsp
],r11
1076 mov QWORD[48+rsp
],r12
1077 mov QWORD[56+rsp
],rcx
1078 call QWORD[__imp_RtlVirtualUnwind
]
1091 DB 0F3h
,0C3h
;repret
1094 section .pdata rdata
align=4
1096 DD $L$SEH_begin_vpaes_set_encrypt_key wrt ..imagebase
1097 DD $L$SEH_end_vpaes_set_encrypt_key wrt ..imagebase
1098 DD $L$SEH_info_vpaes_set_encrypt_key wrt ..imagebase
1100 DD $L$SEH_begin_vpaes_set_decrypt_key wrt ..imagebase
1101 DD $L$SEH_end_vpaes_set_decrypt_key wrt ..imagebase
1102 DD $L$SEH_info_vpaes_set_decrypt_key wrt ..imagebase
1104 DD $L$SEH_begin_vpaes_encrypt wrt ..imagebase
1105 DD $L$SEH_end_vpaes_encrypt wrt ..imagebase
1106 DD $L$SEH_info_vpaes_encrypt wrt ..imagebase
1108 DD $L$SEH_begin_vpaes_decrypt wrt ..imagebase
1109 DD $L$SEH_end_vpaes_decrypt wrt ..imagebase
1110 DD $L$SEH_info_vpaes_decrypt wrt ..imagebase
1112 DD $L$SEH_begin_vpaes_cbc_encrypt wrt ..imagebase
1113 DD $L$SEH_end_vpaes_cbc_encrypt wrt ..imagebase
1114 DD $L$SEH_info_vpaes_cbc_encrypt wrt ..imagebase
1116 section .xdata rdata
align=8
1118 $L$
SEH_info_vpaes_set_encrypt_key:
1120 DD se_handler wrt ..imagebase
1121 DD $L
$enc_key_body wrt ..imagebase
,$L
$enc_key_epilogue wrt ..imagebase
1122 $L$
SEH_info_vpaes_set_decrypt_key:
1124 DD se_handler wrt ..imagebase
1125 DD $L
$dec_key_body wrt ..imagebase
,$L
$dec_key_epilogue wrt ..imagebase
1126 $L$
SEH_info_vpaes_encrypt:
1128 DD se_handler wrt ..imagebase
1129 DD $L
$enc_body wrt ..imagebase
,$L
$enc_epilogue wrt ..imagebase
1130 $L$
SEH_info_vpaes_decrypt:
1132 DD se_handler wrt ..imagebase
1133 DD $L
$dec_body wrt ..imagebase
,$L
$dec_epilogue wrt ..imagebase
1134 $L$
SEH_info_vpaes_cbc_encrypt:
1136 DD se_handler wrt ..imagebase
1137 DD $L
$cbc_body wrt ..imagebase
,$L
$cbc_epilogue wrt ..imagebase