aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/openssl/asm/windows/crypto/camellia
diff options
context:
space:
mode:
authorDevtools Arcadia <arcadia-devtools@yandex-team.ru>2022-02-07 18:08:42 +0300
committerDevtools Arcadia <arcadia-devtools@mous.vla.yp-c.yandex.net>2022-02-07 18:08:42 +0300
commit1110808a9d39d4b808aef724c861a2e1a38d2a69 (patch)
treee26c9fed0de5d9873cce7e00bc214573dc2195b7 /contrib/libs/openssl/asm/windows/crypto/camellia
downloadydb-1110808a9d39d4b808aef724c861a2e1a38d2a69.tar.gz
intermediate changes
ref:cde9a383711a11544ce7e107a78147fb96cc4029
Diffstat (limited to 'contrib/libs/openssl/asm/windows/crypto/camellia')
-rw-r--r--contrib/libs/openssl/asm/windows/crypto/camellia/cmll-x86.masm2369
-rw-r--r--contrib/libs/openssl/asm/windows/crypto/camellia/cmll-x86_64.masm2164
2 files changed, 4533 insertions, 0 deletions
diff --git a/contrib/libs/openssl/asm/windows/crypto/camellia/cmll-x86.masm b/contrib/libs/openssl/asm/windows/crypto/camellia/cmll-x86.masm
new file mode 100644
index 0000000000..47dc26439c
--- /dev/null
+++ b/contrib/libs/openssl/asm/windows/crypto/camellia/cmll-x86.masm
@@ -0,0 +1,2369 @@
+IF @Version LT 800
+ECHO MASM version 8.00 or later is strongly recommended.
+ENDIF
+.686
+.MODEL FLAT
+OPTION DOTNAME
+IF @Version LT 800
+.text$ SEGMENT PAGE 'CODE'
+ELSE
+.text$ SEGMENT ALIGN(64) 'CODE'
+ENDIF
+ALIGN 16
+_Camellia_EncryptBlock_Rounds PROC PUBLIC
+$L_Camellia_EncryptBlock_Rounds_begin::
+ push ebp
+ push ebx
+ push esi
+ push edi
+ mov eax,DWORD PTR 20[esp]
+ mov esi,DWORD PTR 24[esp]
+ mov edi,DWORD PTR 28[esp]
+ mov ebx,esp
+ sub esp,28
+ and esp,-64
+ lea ecx,DWORD PTR [edi-127]
+ sub ecx,esp
+ neg ecx
+ and ecx,960
+ sub esp,ecx
+ add esp,4
+ shl eax,6
+ lea eax,DWORD PTR [eax*1+edi]
+ mov DWORD PTR 20[esp],ebx
+ mov DWORD PTR 16[esp],eax
+ call $L000pic_point
+$L000pic_point:
+ pop ebp
+ lea ebp,DWORD PTR ($LCamellia_SBOX-$L000pic_point)[ebp]
+ mov eax,DWORD PTR [esi]
+ mov ebx,DWORD PTR 4[esi]
+ mov ecx,DWORD PTR 8[esi]
+ bswap eax
+ mov edx,DWORD PTR 12[esi]
+ bswap ebx
+ bswap ecx
+ bswap edx
+ call __x86_Camellia_encrypt
+ mov esp,DWORD PTR 20[esp]
+ bswap eax
+ mov esi,DWORD PTR 32[esp]
+ bswap ebx
+ bswap ecx
+ bswap edx
+ mov DWORD PTR [esi],eax
+ mov DWORD PTR 4[esi],ebx
+ mov DWORD PTR 8[esi],ecx
+ mov DWORD PTR 12[esi],edx
+ pop edi
+ pop esi
+ pop ebx
+ pop ebp
+ ret
+_Camellia_EncryptBlock_Rounds ENDP
+ALIGN 16
+_Camellia_EncryptBlock PROC PUBLIC
+$L_Camellia_EncryptBlock_begin::
+ mov eax,128
+ sub eax,DWORD PTR 4[esp]
+ mov eax,3
+ adc eax,0
+ mov DWORD PTR 4[esp],eax
+ jmp $L_Camellia_EncryptBlock_Rounds_begin
+_Camellia_EncryptBlock ENDP
+ALIGN 16
+_Camellia_encrypt PROC PUBLIC
+$L_Camellia_encrypt_begin::
+ push ebp
+ push ebx
+ push esi
+ push edi
+ mov esi,DWORD PTR 20[esp]
+ mov edi,DWORD PTR 28[esp]
+ mov ebx,esp
+ sub esp,28
+ and esp,-64
+ mov eax,DWORD PTR 272[edi]
+ lea ecx,DWORD PTR [edi-127]
+ sub ecx,esp
+ neg ecx
+ and ecx,960
+ sub esp,ecx
+ add esp,4
+ shl eax,6
+ lea eax,DWORD PTR [eax*1+edi]
+ mov DWORD PTR 20[esp],ebx
+ mov DWORD PTR 16[esp],eax
+ call $L001pic_point
+$L001pic_point:
+ pop ebp
+ lea ebp,DWORD PTR ($LCamellia_SBOX-$L001pic_point)[ebp]
+ mov eax,DWORD PTR [esi]
+ mov ebx,DWORD PTR 4[esi]
+ mov ecx,DWORD PTR 8[esi]
+ bswap eax
+ mov edx,DWORD PTR 12[esi]
+ bswap ebx
+ bswap ecx
+ bswap edx
+ call __x86_Camellia_encrypt
+ mov esp,DWORD PTR 20[esp]
+ bswap eax
+ mov esi,DWORD PTR 24[esp]
+ bswap ebx
+ bswap ecx
+ bswap edx
+ mov DWORD PTR [esi],eax
+ mov DWORD PTR 4[esi],ebx
+ mov DWORD PTR 8[esi],ecx
+ mov DWORD PTR 12[esi],edx
+ pop edi
+ pop esi
+ pop ebx
+ pop ebp
+ ret
+_Camellia_encrypt ENDP
+ALIGN 16
+__x86_Camellia_encrypt PROC PRIVATE
+ xor eax,DWORD PTR [edi]
+ xor ebx,DWORD PTR 4[edi]
+ xor ecx,DWORD PTR 8[edi]
+ xor edx,DWORD PTR 12[edi]
+ mov esi,DWORD PTR 16[edi]
+ mov DWORD PTR 4[esp],eax
+ mov DWORD PTR 8[esp],ebx
+ mov DWORD PTR 12[esp],ecx
+ mov DWORD PTR 16[esp],edx
+ALIGN 16
+$L002loop:
+ xor eax,esi
+ xor ebx,DWORD PTR 20[edi]
+ movzx esi,ah
+ mov edx,DWORD PTR 2052[esi*8+ebp]
+ movzx esi,al
+ xor edx,DWORD PTR 4[esi*8+ebp]
+ shr eax,16
+ movzx esi,bl
+ mov ecx,DWORD PTR [esi*8+ebp]
+ movzx esi,ah
+ xor edx,DWORD PTR [esi*8+ebp]
+ movzx esi,bh
+ xor ecx,DWORD PTR 4[esi*8+ebp]
+ shr ebx,16
+ movzx eax,al
+ xor edx,DWORD PTR 2048[eax*8+ebp]
+ movzx esi,bh
+ mov eax,DWORD PTR 16[esp]
+ xor ecx,edx
+ ror edx,8
+ xor ecx,DWORD PTR 2048[esi*8+ebp]
+ movzx esi,bl
+ mov ebx,DWORD PTR 12[esp]
+ xor edx,eax
+ xor ecx,DWORD PTR 2052[esi*8+ebp]
+ mov esi,DWORD PTR 24[edi]
+ xor edx,ecx
+ mov DWORD PTR 16[esp],edx
+ xor ecx,ebx
+ mov DWORD PTR 12[esp],ecx
+ xor ecx,esi
+ xor edx,DWORD PTR 28[edi]
+ movzx esi,ch
+ mov ebx,DWORD PTR 2052[esi*8+ebp]
+ movzx esi,cl
+ xor ebx,DWORD PTR 4[esi*8+ebp]
+ shr ecx,16
+ movzx esi,dl
+ mov eax,DWORD PTR [esi*8+ebp]
+ movzx esi,ch
+ xor ebx,DWORD PTR [esi*8+ebp]
+ movzx esi,dh
+ xor eax,DWORD PTR 4[esi*8+ebp]
+ shr edx,16
+ movzx ecx,cl
+ xor ebx,DWORD PTR 2048[ecx*8+ebp]
+ movzx esi,dh
+ mov ecx,DWORD PTR 8[esp]
+ xor eax,ebx
+ ror ebx,8
+ xor eax,DWORD PTR 2048[esi*8+ebp]
+ movzx esi,dl
+ mov edx,DWORD PTR 4[esp]
+ xor ebx,ecx
+ xor eax,DWORD PTR 2052[esi*8+ebp]
+ mov esi,DWORD PTR 32[edi]
+ xor ebx,eax
+ mov DWORD PTR 8[esp],ebx
+ xor eax,edx
+ mov DWORD PTR 4[esp],eax
+ xor eax,esi
+ xor ebx,DWORD PTR 36[edi]
+ movzx esi,ah
+ mov edx,DWORD PTR 2052[esi*8+ebp]
+ movzx esi,al
+ xor edx,DWORD PTR 4[esi*8+ebp]
+ shr eax,16
+ movzx esi,bl
+ mov ecx,DWORD PTR [esi*8+ebp]
+ movzx esi,ah
+ xor edx,DWORD PTR [esi*8+ebp]
+ movzx esi,bh
+ xor ecx,DWORD PTR 4[esi*8+ebp]
+ shr ebx,16
+ movzx eax,al
+ xor edx,DWORD PTR 2048[eax*8+ebp]
+ movzx esi,bh
+ mov eax,DWORD PTR 16[esp]
+ xor ecx,edx
+ ror edx,8
+ xor ecx,DWORD PTR 2048[esi*8+ebp]
+ movzx esi,bl
+ mov ebx,DWORD PTR 12[esp]
+ xor edx,eax
+ xor ecx,DWORD PTR 2052[esi*8+ebp]
+ mov esi,DWORD PTR 40[edi]
+ xor edx,ecx
+ mov DWORD PTR 16[esp],edx
+ xor ecx,ebx
+ mov DWORD PTR 12[esp],ecx
+ xor ecx,esi
+ xor edx,DWORD PTR 44[edi]
+ movzx esi,ch
+ mov ebx,DWORD PTR 2052[esi*8+ebp]
+ movzx esi,cl
+ xor ebx,DWORD PTR 4[esi*8+ebp]
+ shr ecx,16
+ movzx esi,dl
+ mov eax,DWORD PTR [esi*8+ebp]
+ movzx esi,ch
+ xor ebx,DWORD PTR [esi*8+ebp]
+ movzx esi,dh
+ xor eax,DWORD PTR 4[esi*8+ebp]
+ shr edx,16
+ movzx ecx,cl
+ xor ebx,DWORD PTR 2048[ecx*8+ebp]
+ movzx esi,dh
+ mov ecx,DWORD PTR 8[esp]
+ xor eax,ebx
+ ror ebx,8
+ xor eax,DWORD PTR 2048[esi*8+ebp]
+ movzx esi,dl
+ mov edx,DWORD PTR 4[esp]
+ xor ebx,ecx
+ xor eax,DWORD PTR 2052[esi*8+ebp]
+ mov esi,DWORD PTR 48[edi]
+ xor ebx,eax
+ mov DWORD PTR 8[esp],ebx
+ xor eax,edx
+ mov DWORD PTR 4[esp],eax
+ xor eax,esi
+ xor ebx,DWORD PTR 52[edi]
+ movzx esi,ah
+ mov edx,DWORD PTR 2052[esi*8+ebp]
+ movzx esi,al
+ xor edx,DWORD PTR 4[esi*8+ebp]
+ shr eax,16
+ movzx esi,bl
+ mov ecx,DWORD PTR [esi*8+ebp]
+ movzx esi,ah
+ xor edx,DWORD PTR [esi*8+ebp]
+ movzx esi,bh
+ xor ecx,DWORD PTR 4[esi*8+ebp]
+ shr ebx,16
+ movzx eax,al
+ xor edx,DWORD PTR 2048[eax*8+ebp]
+ movzx esi,bh
+ mov eax,DWORD PTR 16[esp]
+ xor ecx,edx
+ ror edx,8
+ xor ecx,DWORD PTR 2048[esi*8+ebp]
+ movzx esi,bl
+ mov ebx,DWORD PTR 12[esp]
+ xor edx,eax
+ xor ecx,DWORD PTR 2052[esi*8+ebp]
+ mov esi,DWORD PTR 56[edi]
+ xor edx,ecx
+ mov DWORD PTR 16[esp],edx
+ xor ecx,ebx
+ mov DWORD PTR 12[esp],ecx
+ xor ecx,esi
+ xor edx,DWORD PTR 60[edi]
+ movzx esi,ch
+ mov ebx,DWORD PTR 2052[esi*8+ebp]
+ movzx esi,cl
+ xor ebx,DWORD PTR 4[esi*8+ebp]
+ shr ecx,16
+ movzx esi,dl
+ mov eax,DWORD PTR [esi*8+ebp]
+ movzx esi,ch
+ xor ebx,DWORD PTR [esi*8+ebp]
+ movzx esi,dh
+ xor eax,DWORD PTR 4[esi*8+ebp]
+ shr edx,16
+ movzx ecx,cl
+ xor ebx,DWORD PTR 2048[ecx*8+ebp]
+ movzx esi,dh
+ mov ecx,DWORD PTR 8[esp]
+ xor eax,ebx
+ ror ebx,8
+ xor eax,DWORD PTR 2048[esi*8+ebp]
+ movzx esi,dl
+ mov edx,DWORD PTR 4[esp]
+ xor ebx,ecx
+ xor eax,DWORD PTR 2052[esi*8+ebp]
+ mov esi,DWORD PTR 64[edi]
+ xor ebx,eax
+ mov DWORD PTR 8[esp],ebx
+ xor eax,edx
+ mov DWORD PTR 4[esp],eax
+ add edi,64
+ cmp edi,DWORD PTR 20[esp]
+ je $L003done
+ and esi,eax
+ mov edx,DWORD PTR 16[esp]
+ rol esi,1
+ mov ecx,edx
+ xor ebx,esi
+ or ecx,DWORD PTR 12[edi]
+ mov DWORD PTR 8[esp],ebx
+ xor ecx,DWORD PTR 12[esp]
+ mov esi,DWORD PTR 4[edi]
+ mov DWORD PTR 12[esp],ecx
+ or esi,ebx
+ and ecx,DWORD PTR 8[edi]
+ xor eax,esi
+ rol ecx,1
+ mov DWORD PTR 4[esp],eax
+ xor edx,ecx
+ mov esi,DWORD PTR 16[edi]
+ mov DWORD PTR 16[esp],edx
+ jmp $L002loop
+ALIGN 8
+$L003done:
+ mov ecx,eax
+ mov edx,ebx
+ mov eax,DWORD PTR 12[esp]
+ mov ebx,DWORD PTR 16[esp]
+ xor eax,esi
+ xor ebx,DWORD PTR 4[edi]
+ xor ecx,DWORD PTR 8[edi]
+ xor edx,DWORD PTR 12[edi]
+ ret
+__x86_Camellia_encrypt ENDP
+ALIGN 16
+_Camellia_DecryptBlock_Rounds PROC PUBLIC
+$L_Camellia_DecryptBlock_Rounds_begin::
+ push ebp
+ push ebx
+ push esi
+ push edi
+ mov eax,DWORD PTR 20[esp]
+ mov esi,DWORD PTR 24[esp]
+ mov edi,DWORD PTR 28[esp]
+ mov ebx,esp
+ sub esp,28
+ and esp,-64
+ lea ecx,DWORD PTR [edi-127]
+ sub ecx,esp
+ neg ecx
+ and ecx,960
+ sub esp,ecx
+ add esp,4
+ shl eax,6
+ mov DWORD PTR 16[esp],edi
+ lea edi,DWORD PTR [eax*1+edi]
+ mov DWORD PTR 20[esp],ebx
+ call $L004pic_point
+$L004pic_point:
+ pop ebp
+ lea ebp,DWORD PTR ($LCamellia_SBOX-$L004pic_point)[ebp]
+ mov eax,DWORD PTR [esi]
+ mov ebx,DWORD PTR 4[esi]
+ mov ecx,DWORD PTR 8[esi]
+ bswap eax
+ mov edx,DWORD PTR 12[esi]
+ bswap ebx
+ bswap ecx
+ bswap edx
+ call __x86_Camellia_decrypt
+ mov esp,DWORD PTR 20[esp]
+ bswap eax
+ mov esi,DWORD PTR 32[esp]
+ bswap ebx
+ bswap ecx
+ bswap edx
+ mov DWORD PTR [esi],eax
+ mov DWORD PTR 4[esi],ebx
+ mov DWORD PTR 8[esi],ecx
+ mov DWORD PTR 12[esi],edx
+ pop edi
+ pop esi
+ pop ebx
+ pop ebp
+ ret
+_Camellia_DecryptBlock_Rounds ENDP
+ALIGN 16
+_Camellia_DecryptBlock PROC PUBLIC
+$L_Camellia_DecryptBlock_begin::
+ mov eax,128
+ sub eax,DWORD PTR 4[esp]
+ mov eax,3
+ adc eax,0
+ mov DWORD PTR 4[esp],eax
+ jmp $L_Camellia_DecryptBlock_Rounds_begin
+_Camellia_DecryptBlock ENDP
+ALIGN 16
+_Camellia_decrypt PROC PUBLIC
+$L_Camellia_decrypt_begin::
+ push ebp
+ push ebx
+ push esi
+ push edi
+ mov esi,DWORD PTR 20[esp]
+ mov edi,DWORD PTR 28[esp]
+ mov ebx,esp
+ sub esp,28
+ and esp,-64
+ mov eax,DWORD PTR 272[edi]
+ lea ecx,DWORD PTR [edi-127]
+ sub ecx,esp
+ neg ecx
+ and ecx,960
+ sub esp,ecx
+ add esp,4
+ shl eax,6
+ mov DWORD PTR 16[esp],edi
+ lea edi,DWORD PTR [eax*1+edi]
+ mov DWORD PTR 20[esp],ebx
+ call $L005pic_point
+$L005pic_point:
+ pop ebp
+ lea ebp,DWORD PTR ($LCamellia_SBOX-$L005pic_point)[ebp]
+ mov eax,DWORD PTR [esi]
+ mov ebx,DWORD PTR 4[esi]
+ mov ecx,DWORD PTR 8[esi]
+ bswap eax
+ mov edx,DWORD PTR 12[esi]
+ bswap ebx
+ bswap ecx
+ bswap edx
+ call __x86_Camellia_decrypt
+ mov esp,DWORD PTR 20[esp]
+ bswap eax
+ mov esi,DWORD PTR 24[esp]
+ bswap ebx
+ bswap ecx
+ bswap edx
+ mov DWORD PTR [esi],eax
+ mov DWORD PTR 4[esi],ebx
+ mov DWORD PTR 8[esi],ecx
+ mov DWORD PTR 12[esi],edx
+ pop edi
+ pop esi
+ pop ebx
+ pop ebp
+ ret
+_Camellia_decrypt ENDP
+ALIGN 16
+__x86_Camellia_decrypt PROC PRIVATE
+ xor eax,DWORD PTR [edi]
+ xor ebx,DWORD PTR 4[edi]
+ xor ecx,DWORD PTR 8[edi]
+ xor edx,DWORD PTR 12[edi]
+ mov esi,DWORD PTR [edi-8]
+ mov DWORD PTR 4[esp],eax
+ mov DWORD PTR 8[esp],ebx
+ mov DWORD PTR 12[esp],ecx
+ mov DWORD PTR 16[esp],edx
+ALIGN 16
+$L006loop:
+ xor eax,esi
+ xor ebx,DWORD PTR [edi-4]
+ movzx esi,ah
+ mov edx,DWORD PTR 2052[esi*8+ebp]
+ movzx esi,al
+ xor edx,DWORD PTR 4[esi*8+ebp]
+ shr eax,16
+ movzx esi,bl
+ mov ecx,DWORD PTR [esi*8+ebp]
+ movzx esi,ah
+ xor edx,DWORD PTR [esi*8+ebp]
+ movzx esi,bh
+ xor ecx,DWORD PTR 4[esi*8+ebp]
+ shr ebx,16
+ movzx eax,al
+ xor edx,DWORD PTR 2048[eax*8+ebp]
+ movzx esi,bh
+ mov eax,DWORD PTR 16[esp]
+ xor ecx,edx
+ ror edx,8
+ xor ecx,DWORD PTR 2048[esi*8+ebp]
+ movzx esi,bl
+ mov ebx,DWORD PTR 12[esp]
+ xor edx,eax
+ xor ecx,DWORD PTR 2052[esi*8+ebp]
+ mov esi,DWORD PTR [edi-16]
+ xor edx,ecx
+ mov DWORD PTR 16[esp],edx
+ xor ecx,ebx
+ mov DWORD PTR 12[esp],ecx
+ xor ecx,esi
+ xor edx,DWORD PTR [edi-12]
+ movzx esi,ch
+ mov ebx,DWORD PTR 2052[esi*8+ebp]
+ movzx esi,cl
+ xor ebx,DWORD PTR 4[esi*8+ebp]
+ shr ecx,16
+ movzx esi,dl
+ mov eax,DWORD PTR [esi*8+ebp]
+ movzx esi,ch
+ xor ebx,DWORD PTR [esi*8+ebp]
+ movzx esi,dh
+ xor eax,DWORD PTR 4[esi*8+ebp]
+ shr edx,16
+ movzx ecx,cl
+ xor ebx,DWORD PTR 2048[ecx*8+ebp]
+ movzx esi,dh
+ mov ecx,DWORD PTR 8[esp]
+ xor eax,ebx
+ ror ebx,8
+ xor eax,DWORD PTR 2048[esi*8+ebp]
+ movzx esi,dl
+ mov edx,DWORD PTR 4[esp]
+ xor ebx,ecx
+ xor eax,DWORD PTR 2052[esi*8+ebp]
+ mov esi,DWORD PTR [edi-24]
+ xor ebx,eax
+ mov DWORD PTR 8[esp],ebx
+ xor eax,edx
+ mov DWORD PTR 4[esp],eax
+ xor eax,esi
+ xor ebx,DWORD PTR [edi-20]
+ movzx esi,ah
+ mov edx,DWORD PTR 2052[esi*8+ebp]
+ movzx esi,al
+ xor edx,DWORD PTR 4[esi*8+ebp]
+ shr eax,16
+ movzx esi,bl
+ mov ecx,DWORD PTR [esi*8+ebp]
+ movzx esi,ah
+ xor edx,DWORD PTR [esi*8+ebp]
+ movzx esi,bh
+ xor ecx,DWORD PTR 4[esi*8+ebp]
+ shr ebx,16
+ movzx eax,al
+ xor edx,DWORD PTR 2048[eax*8+ebp]
+ movzx esi,bh
+ mov eax,DWORD PTR 16[esp]
+ xor ecx,edx
+ ror edx,8
+ xor ecx,DWORD PTR 2048[esi*8+ebp]
+ movzx esi,bl
+ mov ebx,DWORD PTR 12[esp]
+ xor edx,eax
+ xor ecx,DWORD PTR 2052[esi*8+ebp]
+ mov esi,DWORD PTR [edi-32]
+ xor edx,ecx
+ mov DWORD PTR 16[esp],edx
+ xor ecx,ebx
+ mov DWORD PTR 12[esp],ecx
+ xor ecx,esi
+ xor edx,DWORD PTR [edi-28]
+ movzx esi,ch
+ mov ebx,DWORD PTR 2052[esi*8+ebp]
+ movzx esi,cl
+ xor ebx,DWORD PTR 4[esi*8+ebp]
+ shr ecx,16
+ movzx esi,dl
+ mov eax,DWORD PTR [esi*8+ebp]
+ movzx esi,ch
+ xor ebx,DWORD PTR [esi*8+ebp]
+ movzx esi,dh
+ xor eax,DWORD PTR 4[esi*8+ebp]
+ shr edx,16
+ movzx ecx,cl
+ xor ebx,DWORD PTR 2048[ecx*8+ebp]
+ movzx esi,dh
+ mov ecx,DWORD PTR 8[esp]
+ xor eax,ebx
+ ror ebx,8
+ xor eax,DWORD PTR 2048[esi*8+ebp]
+ movzx esi,dl
+ mov edx,DWORD PTR 4[esp]
+ xor ebx,ecx
+ xor eax,DWORD PTR 2052[esi*8+ebp]
+ mov esi,DWORD PTR [edi-40]
+ xor ebx,eax
+ mov DWORD PTR 8[esp],ebx
+ xor eax,edx
+ mov DWORD PTR 4[esp],eax
+ xor eax,esi
+ xor ebx,DWORD PTR [edi-36]
+ movzx esi,ah
+ mov edx,DWORD PTR 2052[esi*8+ebp]
+ movzx esi,al
+ xor edx,DWORD PTR 4[esi*8+ebp]
+ shr eax,16
+ movzx esi,bl
+ mov ecx,DWORD PTR [esi*8+ebp]
+ movzx esi,ah
+ xor edx,DWORD PTR [esi*8+ebp]
+ movzx esi,bh
+ xor ecx,DWORD PTR 4[esi*8+ebp]
+ shr ebx,16
+ movzx eax,al
+ xor edx,DWORD PTR 2048[eax*8+ebp]
+ movzx esi,bh
+ mov eax,DWORD PTR 16[esp]
+ xor ecx,edx
+ ror edx,8
+ xor ecx,DWORD PTR 2048[esi*8+ebp]
+ movzx esi,bl
+ mov ebx,DWORD PTR 12[esp]
+ xor edx,eax
+ xor ecx,DWORD PTR 2052[esi*8+ebp]
+ mov esi,DWORD PTR [edi-48]
+ xor edx,ecx
+ mov DWORD PTR 16[esp],edx
+ xor ecx,ebx
+ mov DWORD PTR 12[esp],ecx
+ xor ecx,esi
+ xor edx,DWORD PTR [edi-44]
+ movzx esi,ch
+ mov ebx,DWORD PTR 2052[esi*8+ebp]
+ movzx esi,cl
+ xor ebx,DWORD PTR 4[esi*8+ebp]
+ shr ecx,16
+ movzx esi,dl
+ mov eax,DWORD PTR [esi*8+ebp]
+ movzx esi,ch
+ xor ebx,DWORD PTR [esi*8+ebp]
+ movzx esi,dh
+ xor eax,DWORD PTR 4[esi*8+ebp]
+ shr edx,16
+ movzx ecx,cl
+ xor ebx,DWORD PTR 2048[ecx*8+ebp]
+ movzx esi,dh
+ mov ecx,DWORD PTR 8[esp]
+ xor eax,ebx
+ ror ebx,8
+ xor eax,DWORD PTR 2048[esi*8+ebp]
+ movzx esi,dl
+ mov edx,DWORD PTR 4[esp]
+ xor ebx,ecx
+ xor eax,DWORD PTR 2052[esi*8+ebp]
+ mov esi,DWORD PTR [edi-56]
+ xor ebx,eax
+ mov DWORD PTR 8[esp],ebx
+ xor eax,edx
+ mov DWORD PTR 4[esp],eax
+ sub edi,64
+ cmp edi,DWORD PTR 20[esp]
+ je $L007done
+ and esi,eax
+ mov edx,DWORD PTR 16[esp]
+ rol esi,1
+ mov ecx,edx
+ xor ebx,esi
+ or ecx,DWORD PTR 4[edi]
+ mov DWORD PTR 8[esp],ebx
+ xor ecx,DWORD PTR 12[esp]
+ mov esi,DWORD PTR 12[edi]
+ mov DWORD PTR 12[esp],ecx
+ or esi,ebx
+ and ecx,DWORD PTR [edi]
+ xor eax,esi
+ rol ecx,1
+ mov DWORD PTR 4[esp],eax
+ xor edx,ecx
+ mov esi,DWORD PTR [edi-8]
+ mov DWORD PTR 16[esp],edx
+ jmp $L006loop
+ALIGN 8
+$L007done:
+ mov ecx,eax
+ mov edx,ebx
+ mov eax,DWORD PTR 12[esp]
+ mov ebx,DWORD PTR 16[esp]
+ xor ecx,esi
+ xor edx,DWORD PTR 12[edi]
+ xor eax,DWORD PTR [edi]
+ xor ebx,DWORD PTR 4[edi]
+ ret
+__x86_Camellia_decrypt ENDP
+ALIGN 16
+_Camellia_Ekeygen PROC PUBLIC
+$L_Camellia_Ekeygen_begin::
+ push ebp
+ push ebx
+ push esi
+ push edi
+ sub esp,16
+ mov ebp,DWORD PTR 36[esp]
+ mov esi,DWORD PTR 40[esp]
+ mov edi,DWORD PTR 44[esp]
+ mov eax,DWORD PTR [esi]
+ mov ebx,DWORD PTR 4[esi]
+ mov ecx,DWORD PTR 8[esi]
+ mov edx,DWORD PTR 12[esi]
+ bswap eax
+ bswap ebx
+ bswap ecx
+ bswap edx
+ mov DWORD PTR [edi],eax
+ mov DWORD PTR 4[edi],ebx
+ mov DWORD PTR 8[edi],ecx
+ mov DWORD PTR 12[edi],edx
+ cmp ebp,128
+ je $L0081st128
+ mov eax,DWORD PTR 16[esi]
+ mov ebx,DWORD PTR 20[esi]
+ cmp ebp,192
+ je $L0091st192
+ mov ecx,DWORD PTR 24[esi]
+ mov edx,DWORD PTR 28[esi]
+ jmp $L0101st256
+ALIGN 4
+$L0091st192:
+ mov ecx,eax
+ mov edx,ebx
+ not ecx
+ not edx
+ALIGN 4
+$L0101st256:
+ bswap eax
+ bswap ebx
+ bswap ecx
+ bswap edx
+ mov DWORD PTR 32[edi],eax
+ mov DWORD PTR 36[edi],ebx
+ mov DWORD PTR 40[edi],ecx
+ mov DWORD PTR 44[edi],edx
+ xor eax,DWORD PTR [edi]
+ xor ebx,DWORD PTR 4[edi]
+ xor ecx,DWORD PTR 8[edi]
+ xor edx,DWORD PTR 12[edi]
+ALIGN 4
+$L0081st128:
+ call $L011pic_point
+$L011pic_point:
+ pop ebp
+ lea ebp,DWORD PTR ($LCamellia_SBOX-$L011pic_point)[ebp]
+ lea edi,DWORD PTR ($LCamellia_SIGMA-$LCamellia_SBOX)[ebp]
+ mov esi,DWORD PTR [edi]
+ mov DWORD PTR [esp],eax
+ mov DWORD PTR 4[esp],ebx
+ mov DWORD PTR 8[esp],ecx
+ mov DWORD PTR 12[esp],edx
+ xor eax,esi
+ xor ebx,DWORD PTR 4[edi]
+ movzx esi,ah
+ mov edx,DWORD PTR 2052[esi*8+ebp]
+ movzx esi,al
+ xor edx,DWORD PTR 4[esi*8+ebp]
+ shr eax,16
+ movzx esi,bl
+ mov ecx,DWORD PTR [esi*8+ebp]
+ movzx esi,ah
+ xor edx,DWORD PTR [esi*8+ebp]
+ movzx esi,bh
+ xor ecx,DWORD PTR 4[esi*8+ebp]
+ shr ebx,16
+ movzx eax,al
+ xor edx,DWORD PTR 2048[eax*8+ebp]
+ movzx esi,bh
+ mov eax,DWORD PTR 12[esp]
+ xor ecx,edx
+ ror edx,8
+ xor ecx,DWORD PTR 2048[esi*8+ebp]
+ movzx esi,bl
+ mov ebx,DWORD PTR 8[esp]
+ xor edx,eax
+ xor ecx,DWORD PTR 2052[esi*8+ebp]
+ mov esi,DWORD PTR 8[edi]
+ xor edx,ecx
+ mov DWORD PTR 12[esp],edx
+ xor ecx,ebx
+ mov DWORD PTR 8[esp],ecx
+ xor ecx,esi
+ xor edx,DWORD PTR 12[edi]
+ movzx esi,ch
+ mov ebx,DWORD PTR 2052[esi*8+ebp]
+ movzx esi,cl
+ xor ebx,DWORD PTR 4[esi*8+ebp]
+ shr ecx,16
+ movzx esi,dl
+ mov eax,DWORD PTR [esi*8+ebp]
+ movzx esi,ch
+ xor ebx,DWORD PTR [esi*8+ebp]
+ movzx esi,dh
+ xor eax,DWORD PTR 4[esi*8+ebp]
+ shr edx,16
+ movzx ecx,cl
+ xor ebx,DWORD PTR 2048[ecx*8+ebp]
+ movzx esi,dh
+ mov ecx,DWORD PTR 4[esp]
+ xor eax,ebx
+ ror ebx,8
+ xor eax,DWORD PTR 2048[esi*8+ebp]
+ movzx esi,dl
+ mov edx,DWORD PTR [esp]
+ xor ebx,ecx
+ xor eax,DWORD PTR 2052[esi*8+ebp]
+ mov esi,DWORD PTR 16[edi]
+ xor ebx,eax
+ mov DWORD PTR 4[esp],ebx
+ xor eax,edx
+ mov DWORD PTR [esp],eax
+ mov ecx,DWORD PTR 8[esp]
+ mov edx,DWORD PTR 12[esp]
+ mov esi,DWORD PTR 44[esp]
+ xor eax,DWORD PTR [esi]
+ xor ebx,DWORD PTR 4[esi]
+ xor ecx,DWORD PTR 8[esi]
+ xor edx,DWORD PTR 12[esi]
+ mov esi,DWORD PTR 16[edi]
+ mov DWORD PTR [esp],eax
+ mov DWORD PTR 4[esp],ebx
+ mov DWORD PTR 8[esp],ecx
+ mov DWORD PTR 12[esp],edx
+ xor eax,esi
+ xor ebx,DWORD PTR 20[edi]
+ movzx esi,ah
+ mov edx,DWORD PTR 2052[esi*8+ebp]
+ movzx esi,al
+ xor edx,DWORD PTR 4[esi*8+ebp]
+ shr eax,16
+ movzx esi,bl
+ mov ecx,DWORD PTR [esi*8+ebp]
+ movzx esi,ah
+ xor edx,DWORD PTR [esi*8+ebp]
+ movzx esi,bh
+ xor ecx,DWORD PTR 4[esi*8+ebp]
+ shr ebx,16
+ movzx eax,al
+ xor edx,DWORD PTR 2048[eax*8+ebp]
+ movzx esi,bh
+ mov eax,DWORD PTR 12[esp]
+ xor ecx,edx
+ ror edx,8
+ xor ecx,DWORD PTR 2048[esi*8+ebp]
+ movzx esi,bl
+ mov ebx,DWORD PTR 8[esp]
+ xor edx,eax
+ xor ecx,DWORD PTR 2052[esi*8+ebp]
+ mov esi,DWORD PTR 24[edi]
+ xor edx,ecx
+ mov DWORD PTR 12[esp],edx
+ xor ecx,ebx
+ mov DWORD PTR 8[esp],ecx
+ xor ecx,esi
+ xor edx,DWORD PTR 28[edi]
+ movzx esi,ch
+ mov ebx,DWORD PTR 2052[esi*8+ebp]
+ movzx esi,cl
+ xor ebx,DWORD PTR 4[esi*8+ebp]
+ shr ecx,16
+ movzx esi,dl
+ mov eax,DWORD PTR [esi*8+ebp]
+ movzx esi,ch
+ xor ebx,DWORD PTR [esi*8+ebp]
+ movzx esi,dh
+ xor eax,DWORD PTR 4[esi*8+ebp]
+ shr edx,16
+ movzx ecx,cl
+ xor ebx,DWORD PTR 2048[ecx*8+ebp]
+ movzx esi,dh
+ mov ecx,DWORD PTR 4[esp]
+ xor eax,ebx
+ ror ebx,8
+ xor eax,DWORD PTR 2048[esi*8+ebp]
+ movzx esi,dl
+ mov edx,DWORD PTR [esp]
+ xor ebx,ecx
+ xor eax,DWORD PTR 2052[esi*8+ebp]
+ mov esi,DWORD PTR 32[edi]
+ xor ebx,eax
+ mov DWORD PTR 4[esp],ebx
+ xor eax,edx
+ mov DWORD PTR [esp],eax
+ mov ecx,DWORD PTR 8[esp]
+ mov edx,DWORD PTR 12[esp]
+ mov esi,DWORD PTR 36[esp]
+ cmp esi,128
+ jne $L0122nd256
+ mov edi,DWORD PTR 44[esp]
+ lea edi,DWORD PTR 128[edi]
+ mov DWORD PTR [edi-112],eax
+ mov DWORD PTR [edi-108],ebx
+ mov DWORD PTR [edi-104],ecx
+ mov DWORD PTR [edi-100],edx
+ mov ebp,eax
+ shl eax,15
+ mov esi,ebx
+ shr esi,17
+ shl ebx,15
+ or eax,esi
+ mov esi,ecx
+ shl ecx,15
+ mov DWORD PTR [edi-80],eax
+ shr esi,17
+ or ebx,esi
+ shr ebp,17
+ mov esi,edx
+ shr esi,17
+ mov DWORD PTR [edi-76],ebx
+ shl edx,15
+ or ecx,esi
+ or edx,ebp
+ mov DWORD PTR [edi-72],ecx
+ mov DWORD PTR [edi-68],edx
+ mov ebp,eax
+ shl eax,15
+ mov esi,ebx
+ shr esi,17
+ shl ebx,15
+ or eax,esi
+ mov esi,ecx
+ shl ecx,15
+ mov DWORD PTR [edi-64],eax
+ shr esi,17
+ or ebx,esi
+ shr ebp,17
+ mov esi,edx
+ shr esi,17
+ mov DWORD PTR [edi-60],ebx
+ shl edx,15
+ or ecx,esi
+ or edx,ebp
+ mov DWORD PTR [edi-56],ecx
+ mov DWORD PTR [edi-52],edx
+ mov ebp,eax
+ shl eax,15
+ mov esi,ebx
+ shr esi,17
+ shl ebx,15
+ or eax,esi
+ mov esi,ecx
+ shl ecx,15
+ mov DWORD PTR [edi-32],eax
+ shr esi,17
+ or ebx,esi
+ shr ebp,17
+ mov esi,edx
+ shr esi,17
+ mov DWORD PTR [edi-28],ebx
+ shl edx,15
+ or ecx,esi
+ or edx,ebp
+ mov ebp,eax
+ shl eax,15
+ mov esi,ebx
+ shr esi,17
+ shl ebx,15
+ or eax,esi
+ mov esi,ecx
+ shl ecx,15
+ mov DWORD PTR [edi-16],eax
+ shr esi,17
+ or ebx,esi
+ shr ebp,17
+ mov esi,edx
+ shr esi,17
+ mov DWORD PTR [edi-12],ebx
+ shl edx,15
+ or ecx,esi
+ or edx,ebp
+ mov DWORD PTR [edi-8],ecx
+ mov DWORD PTR [edi-4],edx
+ mov ebp,ebx
+ shl ebx,2
+ mov esi,ecx
+ shr esi,30
+ shl ecx,2
+ or ebx,esi
+ mov esi,edx
+ shl edx,2
+ mov DWORD PTR 32[edi],ebx
+ shr esi,30
+ or ecx,esi
+ shr ebp,30
+ mov esi,eax
+ shr esi,30
+ mov DWORD PTR 36[edi],ecx
+ shl eax,2
+ or edx,esi
+ or eax,ebp
+ mov DWORD PTR 40[edi],edx
+ mov DWORD PTR 44[edi],eax
+ mov ebp,ebx
+ shl ebx,17
+ mov esi,ecx
+ shr esi,15
+ shl ecx,17
+ or ebx,esi
+ mov esi,edx
+ shl edx,17
+ mov DWORD PTR 64[edi],ebx
+ shr esi,15
+ or ecx,esi
+ shr ebp,15
+ mov esi,eax
+ shr esi,15
+ mov DWORD PTR 68[edi],ecx
+ shl eax,17
+ or edx,esi
+ or eax,ebp
+ mov DWORD PTR 72[edi],edx
+ mov DWORD PTR 76[edi],eax
+ mov ebx,DWORD PTR [edi-128]
+ mov ecx,DWORD PTR [edi-124]
+ mov edx,DWORD PTR [edi-120]
+ mov eax,DWORD PTR [edi-116]
+ mov ebp,ebx
+ shl ebx,15
+ mov esi,ecx
+ shr esi,17
+ shl ecx,15
+ or ebx,esi
+ mov esi,edx
+ shl edx,15
+ mov DWORD PTR [edi-96],ebx
+ shr esi,17
+ or ecx,esi
+ shr ebp,17
+ mov esi,eax
+ shr esi,17
+ mov DWORD PTR [edi-92],ecx
+ shl eax,15
+ or edx,esi
+ or eax,ebp
+ mov DWORD PTR [edi-88],edx
+ mov DWORD PTR [edi-84],eax
+ mov ebp,ebx
+ shl ebx,30
+ mov esi,ecx
+ shr esi,2
+ shl ecx,30
+ or ebx,esi
+ mov esi,edx
+ shl edx,30
+ mov DWORD PTR [edi-48],ebx
+ shr esi,2
+ or ecx,esi
+ shr ebp,2
+ mov esi,eax
+ shr esi,2
+ mov DWORD PTR [edi-44],ecx
+ shl eax,30
+ or edx,esi
+ or eax,ebp
+ mov DWORD PTR [edi-40],edx
+ mov DWORD PTR [edi-36],eax
+ mov ebp,ebx
+ shl ebx,15
+ mov esi,ecx
+ shr esi,17
+ shl ecx,15
+ or ebx,esi
+ mov esi,edx
+ shl edx,15
+ shr esi,17
+ or ecx,esi
+ shr ebp,17
+ mov esi,eax
+ shr esi,17
+ shl eax,15
+ or edx,esi
+ or eax,ebp
+ mov DWORD PTR [edi-24],edx
+ mov DWORD PTR [edi-20],eax
+ mov ebp,ebx
+ shl ebx,17
+ mov esi,ecx
+ shr esi,15
+ shl ecx,17
+ or ebx,esi
+ mov esi,edx
+ shl edx,17
+ mov DWORD PTR [edi],ebx
+ shr esi,15
+ or ecx,esi
+ shr ebp,15
+ mov esi,eax
+ shr esi,15
+ mov DWORD PTR 4[edi],ecx
+ shl eax,17
+ or edx,esi
+ or eax,ebp
+ mov DWORD PTR 8[edi],edx
+ mov DWORD PTR 12[edi],eax
+ mov ebp,ebx
+ shl ebx,17
+ mov esi,ecx
+ shr esi,15
+ shl ecx,17
+ or ebx,esi
+ mov esi,edx
+ shl edx,17
+ mov DWORD PTR 16[edi],ebx
+ shr esi,15
+ or ecx,esi
+ shr ebp,15
+ mov esi,eax
+ shr esi,15
+ mov DWORD PTR 20[edi],ecx
+ shl eax,17
+ or edx,esi
+ or eax,ebp
+ mov DWORD PTR 24[edi],edx
+ mov DWORD PTR 28[edi],eax
+ mov ebp,ebx
+ shl ebx,17
+ mov esi,ecx
+ shr esi,15
+ shl ecx,17
+ or ebx,esi
+ mov esi,edx
+ shl edx,17
+ mov DWORD PTR 48[edi],ebx
+ shr esi,15
+ or ecx,esi
+ shr ebp,15
+ mov esi,eax
+ shr esi,15
+ mov DWORD PTR 52[edi],ecx
+ shl eax,17
+ or edx,esi
+ or eax,ebp
+ mov DWORD PTR 56[edi],edx
+ mov DWORD PTR 60[edi],eax
+ mov eax,3
+ jmp $L013done
+ALIGN 16
+$L0122nd256:
+ mov esi,DWORD PTR 44[esp]
+ mov DWORD PTR 48[esi],eax
+ mov DWORD PTR 52[esi],ebx
+ mov DWORD PTR 56[esi],ecx
+ mov DWORD PTR 60[esi],edx
+ xor eax,DWORD PTR 32[esi]
+ xor ebx,DWORD PTR 36[esi]
+ xor ecx,DWORD PTR 40[esi]
+ xor edx,DWORD PTR 44[esi]
+ mov esi,DWORD PTR 32[edi]
+ mov DWORD PTR [esp],eax
+ mov DWORD PTR 4[esp],ebx
+ mov DWORD PTR 8[esp],ecx
+ mov DWORD PTR 12[esp],edx
+ xor eax,esi
+ xor ebx,DWORD PTR 36[edi]
+ movzx esi,ah
+ mov edx,DWORD PTR 2052[esi*8+ebp]
+ movzx esi,al
+ xor edx,DWORD PTR 4[esi*8+ebp]
+ shr eax,16
+ movzx esi,bl
+ mov ecx,DWORD PTR [esi*8+ebp]
+ movzx esi,ah
+ xor edx,DWORD PTR [esi*8+ebp]
+ movzx esi,bh
+ xor ecx,DWORD PTR 4[esi*8+ebp]
+ shr ebx,16
+ movzx eax,al
+ xor edx,DWORD PTR 2048[eax*8+ebp]
+ movzx esi,bh
+ mov eax,DWORD PTR 12[esp]
+ xor ecx,edx
+ ror edx,8
+ xor ecx,DWORD PTR 2048[esi*8+ebp]
+ movzx esi,bl
+ mov ebx,DWORD PTR 8[esp]
+ xor edx,eax
+ xor ecx,DWORD PTR 2052[esi*8+ebp]
+ mov esi,DWORD PTR 40[edi]
+ xor edx,ecx
+ mov DWORD PTR 12[esp],edx
+ xor ecx,ebx
+ mov DWORD PTR 8[esp],ecx
+ xor ecx,esi
+ xor edx,DWORD PTR 44[edi]
+ movzx esi,ch
+ mov ebx,DWORD PTR 2052[esi*8+ebp]
+ movzx esi,cl
+ xor ebx,DWORD PTR 4[esi*8+ebp]
+ shr ecx,16
+ movzx esi,dl
+ mov eax,DWORD PTR [esi*8+ebp]
+ movzx esi,ch
+ xor ebx,DWORD PTR [esi*8+ebp]
+ movzx esi,dh
+ xor eax,DWORD PTR 4[esi*8+ebp]
+ shr edx,16
+ movzx ecx,cl
+ xor ebx,DWORD PTR 2048[ecx*8+ebp]
+ movzx esi,dh
+ mov ecx,DWORD PTR 4[esp]
+ xor eax,ebx
+ ror ebx,8
+ xor eax,DWORD PTR 2048[esi*8+ebp]
+ movzx esi,dl
+ mov edx,DWORD PTR [esp]
+ xor ebx,ecx
+ xor eax,DWORD PTR 2052[esi*8+ebp]
+ mov esi,DWORD PTR 48[edi]
+ xor ebx,eax
+ mov DWORD PTR 4[esp],ebx
+ xor eax,edx
+ mov DWORD PTR [esp],eax
+ mov ecx,DWORD PTR 8[esp]
+ mov edx,DWORD PTR 12[esp]
+ mov edi,DWORD PTR 44[esp]
+ lea edi,DWORD PTR 128[edi]
+ mov DWORD PTR [edi-112],eax
+ mov DWORD PTR [edi-108],ebx
+ mov DWORD PTR [edi-104],ecx
+ mov DWORD PTR [edi-100],edx
+ mov ebp,eax
+ shl eax,30
+ mov esi,ebx
+ shr esi,2
+ shl ebx,30
+ or eax,esi
+ mov esi,ecx
+ shl ecx,30
+ mov DWORD PTR [edi-48],eax
+ shr esi,2
+ or ebx,esi
+ shr ebp,2
+ mov esi,edx
+ shr esi,2
+ mov DWORD PTR [edi-44],ebx
+ shl edx,30
+ or ecx,esi
+ or edx,ebp
+ mov DWORD PTR [edi-40],ecx
+ mov DWORD PTR [edi-36],edx
+ mov ebp,eax
+ shl eax,30
+ mov esi,ebx
+ shr esi,2
+ shl ebx,30
+ or eax,esi
+ mov esi,ecx
+ shl ecx,30
+ mov DWORD PTR 32[edi],eax
+ shr esi,2
+ or ebx,esi
+ shr ebp,2
+ mov esi,edx
+ shr esi,2
+ mov DWORD PTR 36[edi],ebx
+ shl edx,30
+ or ecx,esi
+ or edx,ebp
+ mov DWORD PTR 40[edi],ecx
+ mov DWORD PTR 44[edi],edx
+ mov ebp,ebx
+ shl ebx,19
+ mov esi,ecx
+ shr esi,13
+ shl ecx,19
+ or ebx,esi
+ mov esi,edx
+ shl edx,19
+ mov DWORD PTR 128[edi],ebx
+ shr esi,13
+ or ecx,esi
+ shr ebp,13
+ mov esi,eax
+ shr esi,13
+ mov DWORD PTR 132[edi],ecx
+ shl eax,19
+ or edx,esi
+ or eax,ebp
+ mov DWORD PTR 136[edi],edx
+ mov DWORD PTR 140[edi],eax
+ mov ebx,DWORD PTR [edi-96]
+ mov ecx,DWORD PTR [edi-92]
+ mov edx,DWORD PTR [edi-88]
+ mov eax,DWORD PTR [edi-84]
+ mov ebp,ebx
+ shl ebx,15
+ mov esi,ecx
+ shr esi,17
+ shl ecx,15
+ or ebx,esi
+ mov esi,edx
+ shl edx,15
+ mov DWORD PTR [edi-96],ebx
+ shr esi,17
+ or ecx,esi
+ shr ebp,17
+ mov esi,eax
+ shr esi,17
+ mov DWORD PTR [edi-92],ecx
+ shl eax,15
+ or edx,esi
+ or eax,ebp
+ mov DWORD PTR [edi-88],edx
+ mov DWORD PTR [edi-84],eax
+ mov ebp,ebx
+ shl ebx,15
+ mov esi,ecx
+ shr esi,17
+ shl ecx,15
+ or ebx,esi
+ mov esi,edx
+ shl edx,15
+ mov DWORD PTR [edi-64],ebx
+ shr esi,17
+ or ecx,esi
+ shr ebp,17
+ mov esi,eax
+ shr esi,17
+ mov DWORD PTR [edi-60],ecx
+ shl eax,15
+ or edx,esi
+ or eax,ebp
+ mov DWORD PTR [edi-56],edx
+ mov DWORD PTR [edi-52],eax
+ mov ebp,ebx
+ shl ebx,30
+ mov esi,ecx
+ shr esi,2
+ shl ecx,30
+ or ebx,esi
+ mov esi,edx
+ shl edx,30
+ mov DWORD PTR 16[edi],ebx
+ shr esi,2
+ or ecx,esi
+ shr ebp,2
+ mov esi,eax
+ shr esi,2
+ mov DWORD PTR 20[edi],ecx
+ shl eax,30
+ or edx,esi
+ or eax,ebp
+ mov DWORD PTR 24[edi],edx
+ mov DWORD PTR 28[edi],eax
+ mov ebp,ecx
+ shl ecx,2
+ mov esi,edx
+ shr esi,30
+ shl edx,2
+ or ecx,esi
+ mov esi,eax
+ shl eax,2
+ mov DWORD PTR 80[edi],ecx
+ shr esi,30
+ or edx,esi
+ shr ebp,30
+ mov esi,ebx
+ shr esi,30
+ mov DWORD PTR 84[edi],edx
+ shl ebx,2
+ or eax,esi
+ or ebx,ebp
+ mov DWORD PTR 88[edi],eax
+ mov DWORD PTR 92[edi],ebx
+ mov ecx,DWORD PTR [edi-80]
+ mov edx,DWORD PTR [edi-76]
+ mov eax,DWORD PTR [edi-72]
+ mov ebx,DWORD PTR [edi-68]
+ mov ebp,ecx
+ shl ecx,15
+ mov esi,edx
+ shr esi,17
+ shl edx,15
+ or ecx,esi
+ mov esi,eax
+ shl eax,15
+ mov DWORD PTR [edi-80],ecx
+ shr esi,17
+ or edx,esi
+ shr ebp,17
+ mov esi,ebx
+ shr esi,17
+ mov DWORD PTR [edi-76],edx
+ shl ebx,15
+ or eax,esi
+ or ebx,ebp
+ mov DWORD PTR [edi-72],eax
+ mov DWORD PTR [edi-68],ebx
+ mov ebp,ecx
+ shl ecx,30
+ mov esi,edx
+ shr esi,2
+ shl edx,30
+ or ecx,esi
+ mov esi,eax
+ shl eax,30
+ mov DWORD PTR [edi-16],ecx
+ shr esi,2
+ or edx,esi
+ shr ebp,2
+ mov esi,ebx
+ shr esi,2
+ mov DWORD PTR [edi-12],edx
+ shl ebx,30
+ or eax,esi
+ or ebx,ebp
+ mov DWORD PTR [edi-8],eax
+ mov DWORD PTR [edi-4],ebx
+ mov DWORD PTR 64[edi],edx
+ mov DWORD PTR 68[edi],eax
+ mov DWORD PTR 72[edi],ebx
+ mov DWORD PTR 76[edi],ecx
+ mov ebp,edx
+ shl edx,17
+ mov esi,eax
+ shr esi,15
+ shl eax,17
+ or edx,esi
+ mov esi,ebx
+ shl ebx,17
+ mov DWORD PTR 96[edi],edx
+ shr esi,15
+ or eax,esi
+ shr ebp,15
+ mov esi,ecx
+ shr esi,15
+ mov DWORD PTR 100[edi],eax
+ shl ecx,17
+ or ebx,esi
+ or ecx,ebp
+ mov DWORD PTR 104[edi],ebx
+ mov DWORD PTR 108[edi],ecx
+ mov edx,DWORD PTR [edi-128]
+ mov eax,DWORD PTR [edi-124]
+ mov ebx,DWORD PTR [edi-120]
+ mov ecx,DWORD PTR [edi-116]
+ mov ebp,eax
+ shl eax,13
+ mov esi,ebx
+ shr esi,19
+ shl ebx,13
+ or eax,esi
+ mov esi,ecx
+ shl ecx,13
+ mov DWORD PTR [edi-32],eax
+ shr esi,19
+ or ebx,esi
+ shr ebp,19
+ mov esi,edx
+ shr esi,19
+ mov DWORD PTR [edi-28],ebx
+ shl edx,13
+ or ecx,esi
+ or edx,ebp
+ mov DWORD PTR [edi-24],ecx
+ mov DWORD PTR [edi-20],edx
+ mov ebp,eax
+ shl eax,15
+ mov esi,ebx
+ shr esi,17
+ shl ebx,15
+ or eax,esi
+ mov esi,ecx
+ shl ecx,15
+ mov DWORD PTR [edi],eax
+ shr esi,17
+ or ebx,esi
+ shr ebp,17
+ mov esi,edx
+ shr esi,17
+ mov DWORD PTR 4[edi],ebx
+ shl edx,15
+ or ecx,esi
+ or edx,ebp
+ mov DWORD PTR 8[edi],ecx
+ mov DWORD PTR 12[edi],edx
+ mov ebp,eax
+ shl eax,17
+ mov esi,ebx
+ shr esi,15
+ shl ebx,17
+ or eax,esi
+ mov esi,ecx
+ shl ecx,17
+ mov DWORD PTR 48[edi],eax
+ shr esi,15
+ or ebx,esi
+ shr ebp,15
+ mov esi,edx
+ shr esi,15
+ mov DWORD PTR 52[edi],ebx
+ shl edx,17
+ or ecx,esi
+ or edx,ebp
+ mov DWORD PTR 56[edi],ecx
+ mov DWORD PTR 60[edi],edx
+ mov ebp,ebx
+ shl ebx,2
+ mov esi,ecx
+ shr esi,30
+ shl ecx,2
+ or ebx,esi
+ mov esi,edx
+ shl edx,2
+ mov DWORD PTR 112[edi],ebx
+ shr esi,30
+ or ecx,esi
+ shr ebp,30
+ mov esi,eax
+ shr esi,30
+ mov DWORD PTR 116[edi],ecx
+ shl eax,2
+ or edx,esi
+ or eax,ebp
+ mov DWORD PTR 120[edi],edx
+ mov DWORD PTR 124[edi],eax
+ mov eax,4
+$L013done:
+ lea edx,DWORD PTR 144[edi]
+ add esp,16
+ pop edi
+ pop esi
+ pop ebx
+ pop ebp
+ ret
+_Camellia_Ekeygen ENDP
+ALIGN 16
+_Camellia_set_key PROC PUBLIC
+$L_Camellia_set_key_begin::
+ push ebx
+ mov ecx,DWORD PTR 8[esp]
+ mov ebx,DWORD PTR 12[esp]
+ mov edx,DWORD PTR 16[esp]
+ mov eax,-1
+ test ecx,ecx
+ jz $L014done
+ test edx,edx
+ jz $L014done
+ mov eax,-2
+ cmp ebx,256
+ je $L015arg_ok
+ cmp ebx,192
+ je $L015arg_ok
+ cmp ebx,128
+ jne $L014done
+ALIGN 4
+$L015arg_ok:
+ push edx
+ push ecx
+ push ebx
+ call $L_Camellia_Ekeygen_begin
+ add esp,12
+ mov DWORD PTR [edx],eax
+ xor eax,eax
+ALIGN 4
+$L014done:
+ pop ebx
+ ret
+_Camellia_set_key ENDP
+ALIGN 64
+$LCamellia_SIGMA::
+DD 2694735487,1003262091,3061508184,1286239154
+DD 3337565999,3914302142,1426019237,4057165596
+DD 283453434,3731369245,2958461122,3018244605
+DD 0,0,0,0
+ALIGN 64
+$LCamellia_SBOX::
+DD 1886416896,1886388336
+DD 2189591040,741081132
+DD 741092352,3014852787
+DD 3974949888,3233808576
+DD 3014898432,3840147684
+DD 656877312,1465319511
+DD 3233857536,3941204202
+DD 3857048832,2930639022
+DD 3840205824,589496355
+DD 2240120064,1802174571
+DD 1465341696,1162149957
+DD 892679424,2779054245
+DD 3941263872,3991732461
+DD 202116096,1330577487
+DD 2930683392,488439837
+DD 1094795520,2459041938
+DD 589505280,2256928902
+DD 4025478912,2947481775
+DD 1802201856,2088501372
+DD 2475922176,522125343
+DD 1162167552,1044250686
+DD 421075200,3705405660
+DD 2779096320,1583218782
+DD 555819264,185270283
+DD 3991792896,2795896998
+DD 235802112,960036921
+DD 1330597632,3587506389
+DD 1313754624,1566376029
+DD 488447232,3654877401
+DD 1701143808,1515847770
+DD 2459079168,1364262993
+DD 3183328512,1819017324
+DD 2256963072,2341142667
+DD 3099113472,2593783962
+DD 2947526400,4227531003
+DD 2408550144,2964324528
+DD 2088532992,1953759348
+DD 3958106880,724238379
+DD 522133248,4042260720
+DD 3469659648,2223243396
+DD 1044266496,3755933919
+DD 808464384,3419078859
+DD 3705461760,875823156
+DD 1600085760,1987444854
+DD 1583242752,1835860077
+DD 3318072576,2846425257
+DD 185273088,3520135377
+DD 437918208,67371012
+DD 2795939328,336855060
+DD 3789676800,976879674
+DD 960051456,3739091166
+DD 3402287616,286326801
+DD 3587560704,842137650
+DD 1195853568,2627469468
+DD 1566399744,1397948499
+DD 1027423488,4075946226
+DD 3654932736,4278059262
+DD 16843008,3486449871
+DD 1515870720,3284336835
+DD 3604403712,2054815866
+DD 1364283648,606339108
+DD 1448498688,3907518696
+DD 1819044864,1616904288
+DD 1296911616,1768489065
+DD 2341178112,2863268010
+DD 218959104,2694840480
+DD 2593823232,2711683233
+DD 1717986816,1650589794
+DD 4227595008,1414791252
+DD 3435973632,505282590
+DD 2964369408,3772776672
+DD 757935360,1684275300
+DD 1953788928,269484048
+DD 303174144,0
+DD 724249344,2745368739
+DD 538976256,1970602101
+DD 4042321920,2324299914
+DD 2981212416,3873833190
+DD 2223277056,151584777
+DD 2576980224,3722248413
+DD 3755990784,2273771655
+DD 1280068608,2206400643
+DD 3419130624,3452764365
+DD 3267543552,2425356432
+DD 875836416,1936916595
+DD 2122219008,4143317238
+DD 1987474944,2644312221
+DD 84215040,3216965823
+DD 1835887872,1381105746
+DD 3082270464,3638034648
+DD 2846468352,3368550600
+DD 825307392,3334865094
+DD 3520188672,2172715137
+DD 387389184,1869545583
+DD 67372032,320012307
+DD 3621246720,1667432547
+DD 336860160,3924361449
+DD 1482184704,2812739751
+DD 976894464,2677997727
+DD 1633771776,3166437564
+DD 3739147776,690552873
+DD 454761216,4193845497
+DD 286331136,791609391
+DD 471604224,3031695540
+DD 842150400,2021130360
+DD 252645120,101056518
+DD 2627509248,3890675943
+DD 370546176,1903231089
+DD 1397969664,3570663636
+DD 404232192,2880110763
+DD 4076007936,2290614408
+DD 572662272,2374828173
+DD 4278124032,1920073842
+DD 1145324544,3115909305
+DD 3486502656,4177002744
+DD 2998055424,2896953516
+DD 3284386560,909508662
+DD 3048584448,707395626
+DD 2054846976,1010565180
+DD 2442236160,4059103473
+DD 606348288,1077936192
+DD 134744064,3553820883
+DD 3907577856,3149594811
+DD 2829625344,1128464451
+DD 1616928768,353697813
+DD 4244438016,2913796269
+DD 1768515840,2004287607
+DD 1347440640,2155872384
+DD 2863311360,2189557890
+DD 3503345664,3974889708
+DD 2694881280,656867367
+DD 2105376000,3856990437
+DD 2711724288,2240086149
+DD 2307492096,892665909
+DD 1650614784,202113036
+DD 2543294208,1094778945
+DD 1414812672,4025417967
+DD 1532713728,2475884691
+DD 505290240,421068825
+DD 2509608192,555810849
+DD 3772833792,235798542
+DD 4294967040,1313734734
+DD 1684300800,1701118053
+DD 3537031680,3183280317
+DD 269488128,3099066552
+DD 3301229568,2408513679
+DD 0,3958046955
+DD 1212696576,3469607118
+DD 2745410304,808452144
+DD 4160222976,1600061535
+DD 1970631936,3318022341
+DD 3688618752,437911578
+DD 2324335104,3789619425
+DD 50529024,3402236106
+DD 3873891840,1195835463
+DD 3671775744,1027407933
+DD 151587072,16842753
+DD 1061109504,3604349142
+DD 3722304768,1448476758
+DD 2492765184,1296891981
+DD 2273806080,218955789
+DD 1549556736,1717960806
+DD 2206434048,3435921612
+DD 33686016,757923885
+DD 3452816640,303169554
+DD 1246382592,538968096
+DD 2425393152,2981167281
+DD 858993408,2576941209
+DD 1936945920,1280049228
+DD 1734829824,3267494082
+DD 4143379968,2122186878
+DD 4092850944,84213765
+DD 2644352256,3082223799
+DD 2139062016,825294897
+DD 3217014528,387383319
+DD 3806519808,3621191895
+DD 1381126656,1482162264
+DD 2610666240,1633747041
+DD 3638089728,454754331
+DD 640034304,471597084
+DD 3368601600,252641295
+DD 926365440,370540566
+DD 3334915584,404226072
+DD 993737472,572653602
+DD 2172748032,1145307204
+DD 2526451200,2998010034
+DD 1869573888,3048538293
+DD 1263225600,2442199185
+DD 320017152,134742024
+DD 3200171520,2829582504
+DD 1667457792,4244373756
+DD 774778368,1347420240
+DD 3924420864,3503292624
+DD 2038003968,2105344125
+DD 2812782336,2307457161
+DD 2358021120,2543255703
+DD 2678038272,1532690523
+DD 1852730880,2509570197
+DD 3166485504,4294902015
+DD 2391707136,3536978130
+DD 690563328,3301179588
+DD 4126536960,1212678216
+DD 4193908992,4160159991
+DD 3065427456,3688562907
+DD 791621376,50528259
+DD 4261281024,3671720154
+DD 3031741440,1061093439
+DD 1499027712,2492727444
+DD 2021160960,1549533276
+DD 2560137216,33685506
+DD 101058048,1246363722
+DD 1785358848,858980403
+DD 3890734848,1734803559
+DD 1179010560,4092788979
+DD 1903259904,2139029631
+DD 3132799488,3806462178
+DD 3570717696,2610626715
+DD 623191296,640024614
+DD 2880154368,926351415
+DD 1111638528,993722427
+DD 2290649088,2526412950
+DD 2728567296,1263206475
+DD 2374864128,3200123070
+DD 4210752000,774766638
+DD 1920102912,2037973113
+DD 117901056,2357985420
+DD 3115956480,1852702830
+DD 1431655680,2391670926
+DD 4177065984,4126474485
+DD 4008635904,3065381046
+DD 2896997376,4261216509
+DD 168430080,1499005017
+DD 909522432,2560098456
+DD 1229539584,1785331818
+DD 707406336,1178992710
+DD 1751672832,3132752058
+DD 1010580480,623181861
+DD 943208448,1111621698
+DD 4059164928,2728525986
+DD 2762253312,4210688250
+DD 1077952512,117899271
+DD 673720320,1431634005
+DD 3553874688,4008575214
+DD 2071689984,168427530
+DD 3149642496,1229520969
+DD 3385444608,1751646312
+DD 1128481536,943194168
+DD 3250700544,2762211492
+DD 353703168,673710120
+DD 3823362816,2071658619
+DD 2913840384,3385393353
+DD 4109693952,3250651329
+DD 2004317952,3823304931
+DD 3351758592,4109631732
+DD 2155905024,3351707847
+DD 2661195264,2661154974
+DD 14737632,939538488
+DD 328965,1090535745
+DD 5789784,369104406
+DD 14277081,1979741814
+DD 6776679,3640711641
+DD 5131854,2466288531
+DD 8487297,1610637408
+DD 13355979,4060148466
+DD 13224393,1912631922
+DD 723723,3254829762
+DD 11447982,2868947883
+DD 6974058,2583730842
+DD 14013909,1962964341
+DD 1579032,100664838
+DD 6118749,1459640151
+DD 8553090,2684395680
+DD 4605510,2432733585
+DD 14671839,4144035831
+DD 14079702,3036722613
+DD 2565927,3372272073
+DD 9079434,2717950626
+DD 3289650,2348846220
+DD 4934475,3523269330
+DD 4342338,2415956112
+DD 14408667,4127258358
+DD 1842204,117442311
+DD 10395294,2801837991
+DD 10263708,654321447
+DD 3815994,2382401166
+DD 13290186,2986390194
+DD 2434341,1224755529
+DD 8092539,3724599006
+DD 855309,1124090691
+DD 7434609,1543527516
+DD 6250335,3607156695
+DD 2039583,3338717127
+DD 16316664,1040203326
+DD 14145495,4110480885
+DD 4079166,2399178639
+DD 10329501,1728079719
+DD 8158332,520101663
+DD 6316128,402659352
+DD 12171705,1845522030
+DD 12500670,2936057775
+DD 12369084,788541231
+DD 9145227,3791708898
+DD 1447446,2231403909
+DD 3421236,218107149
+DD 5066061,1392530259
+DD 12829635,4026593520
+DD 7500402,2617285788
+DD 9803157,1694524773
+DD 11250603,3925928682
+DD 9342606,2734728099
+DD 12237498,2919280302
+DD 8026746,2650840734
+DD 11776947,3959483628
+DD 131586,2147516544
+DD 11842740,754986285
+DD 11382189,1795189611
+DD 10658466,2818615464
+DD 11316396,721431339
+DD 14211288,905983542
+DD 10132122,2785060518
+DD 1513239,3305162181
+DD 1710618,2248181382
+DD 3487029,1291865421
+DD 13421772,855651123
+DD 16250871,4244700669
+DD 10066329,1711302246
+DD 6381921,1476417624
+DD 5921370,2516620950
+DD 15263976,973093434
+DD 2368548,150997257
+DD 5658198,2499843477
+DD 4210752,268439568
+DD 14803425,2013296760
+DD 6513507,3623934168
+DD 592137,1107313218
+DD 3355443,3422604492
+DD 12566463,4009816047
+DD 10000536,637543974
+DD 9934743,3842041317
+DD 8750469,1627414881
+DD 6842472,436214298
+DD 16579836,1056980799
+DD 15527148,989870907
+DD 657930,2181071490
+DD 14342874,3053500086
+DD 7303023,3674266587
+DD 5460819,3556824276
+DD 6447714,2550175896
+DD 10724259,3892373736
+DD 3026478,2332068747
+DD 526344,33554946
+DD 11513775,3942706155
+DD 2631720,167774730
+DD 11579568,738208812
+DD 7631988,486546717
+DD 12763842,2952835248
+DD 12434877,1862299503
+DD 3552822,2365623693
+DD 2236962,2281736328
+DD 3684408,234884622
+DD 6579300,419436825
+DD 1973790,2264958855
+DD 3750201,1308642894
+DD 2894892,184552203
+DD 10921638,2835392937
+DD 3158064,201329676
+DD 15066597,2030074233
+DD 4473924,285217041
+DD 16645629,2130739071
+DD 8947848,570434082
+DD 10461087,3875596263
+DD 6645093,1493195097
+DD 8882055,3774931425
+DD 7039851,3657489114
+DD 16053492,1023425853
+DD 2302755,3355494600
+DD 4737096,301994514
+DD 1052688,67109892
+DD 13750737,1946186868
+DD 5329233,1409307732
+DD 12632256,805318704
+DD 16382457,2113961598
+DD 13816530,3019945140
+DD 10526880,671098920
+DD 5592405,1426085205
+DD 10592673,1744857192
+DD 4276545,1342197840
+DD 16448250,3187719870
+DD 4408131,3489714384
+DD 1250067,3288384708
+DD 12895428,822096177
+DD 3092271,3405827019
+DD 11053224,704653866
+DD 11974326,2902502829
+DD 3947580,251662095
+DD 2829099,3389049546
+DD 12698049,1879076976
+DD 16777215,4278255615
+DD 13158600,838873650
+DD 10855845,1761634665
+DD 2105376,134219784
+DD 9013641,1644192354
+DD 0,0
+DD 9474192,603989028
+DD 4671303,3506491857
+DD 15724527,4211145723
+DD 15395562,3120609978
+DD 12040119,3976261101
+DD 1381653,1157645637
+DD 394758,2164294017
+DD 13487565,1929409395
+DD 11908533,1828744557
+DD 1184274,2214626436
+DD 8289918,2667618207
+DD 12303291,3993038574
+DD 2697513,1241533002
+DD 986895,3271607235
+DD 12105912,771763758
+DD 460551,3238052289
+DD 263172,16777473
+DD 10197915,3858818790
+DD 9737364,620766501
+DD 2171169,1207978056
+DD 6710886,2566953369
+DD 15132390,3103832505
+DD 13553358,3003167667
+DD 15592941,2063629179
+DD 15198183,4177590777
+DD 3881787,3456159438
+DD 16711422,3204497343
+DD 8355711,3741376479
+DD 12961221,1895854449
+DD 10790052,687876393
+DD 3618615,3439381965
+DD 11645361,1811967084
+DD 5000268,318771987
+DD 9539985,1677747300
+DD 7237230,2600508315
+DD 9276813,1660969827
+DD 7763574,2634063261
+DD 197379,3221274816
+DD 2960685,1258310475
+DD 14606046,3070277559
+DD 9868950,2768283045
+DD 2500134,2298513801
+DD 8224125,1593859935
+DD 13027014,2969612721
+DD 6052956,385881879
+DD 13882323,4093703412
+DD 15921906,3154164924
+DD 5197647,3540046803
+DD 1644825,1174423110
+DD 4144959,3472936911
+DD 14474460,922761015
+DD 7960953,1577082462
+DD 1907997,1191200583
+DD 5395026,2483066004
+DD 15461355,4194368250
+DD 15987699,4227923196
+DD 7171437,1526750043
+DD 6184542,2533398423
+DD 16514043,4261478142
+DD 6908265,1509972570
+DD 11711154,2885725356
+DD 15790320,1006648380
+DD 3223857,1275087948
+DD 789516,50332419
+DD 13948116,889206069
+DD 13619151,4076925939
+DD 9211020,587211555
+DD 14869218,3087055032
+DD 7697781,1560304989
+DD 11119017,1778412138
+DD 4868682,2449511058
+DD 5723991,3573601749
+DD 8684676,553656609
+DD 1118481,1140868164
+DD 4539717,1358975313
+DD 1776411,3321939654
+DD 16119285,2097184125
+DD 15000804,956315961
+DD 921102,2197848963
+DD 7566195,3691044060
+DD 11184810,2852170410
+DD 15856113,2080406652
+DD 14540253,1996519287
+DD 5855577,1442862678
+DD 1315860,83887365
+DD 7105644,452991771
+DD 9605778,2751505572
+DD 5526612,352326933
+DD 13684944,872428596
+DD 7895160,503324190
+DD 7368816,469769244
+DD 14935011,4160813304
+DD 4802889,1375752786
+DD 8421504,536879136
+DD 5263440,335549460
+DD 10987431,3909151209
+DD 16185078,3170942397
+DD 7829367,3707821533
+DD 9671571,3825263844
+DD 8816262,2701173153
+DD 8618883,3758153952
+DD 2763306,2315291274
+DD 13092807,4043370993
+DD 5987163,3590379222
+DD 15329769,2046851706
+DD 15658734,3137387451
+DD 9408399,3808486371
+DD 65793,1073758272
+DD 4013373,1325420367
+ALIGN 16
+_Camellia_cbc_encrypt PROC PUBLIC
+$L_Camellia_cbc_encrypt_begin::
+ push ebp
+ push ebx
+ push esi
+ push edi
+ mov ecx,DWORD PTR 28[esp]
+ cmp ecx,0
+ je $L016enc_out
+ pushfd
+ cld
+ mov eax,DWORD PTR 24[esp]
+ mov ebx,DWORD PTR 28[esp]
+ mov edx,DWORD PTR 36[esp]
+ mov ebp,DWORD PTR 40[esp]
+ lea esi,DWORD PTR [esp-64]
+ and esi,-64
+ lea edi,DWORD PTR [edx-127]
+ sub edi,esi
+ neg edi
+ and edi,960
+ sub esi,edi
+ mov edi,DWORD PTR 44[esp]
+ xchg esp,esi
+ add esp,4
+ mov DWORD PTR 20[esp],esi
+ mov DWORD PTR 24[esp],eax
+ mov DWORD PTR 28[esp],ebx
+ mov DWORD PTR 32[esp],ecx
+ mov DWORD PTR 36[esp],edx
+ mov DWORD PTR 40[esp],ebp
+ call $L017pic_point
+$L017pic_point:
+ pop ebp
+ lea ebp,DWORD PTR ($LCamellia_SBOX-$L017pic_point)[ebp]
+ mov esi,32
+ALIGN 4
+$L018prefetch_sbox:
+ mov eax,DWORD PTR [ebp]
+ mov ebx,DWORD PTR 32[ebp]
+ mov ecx,DWORD PTR 64[ebp]
+ mov edx,DWORD PTR 96[ebp]
+ lea ebp,DWORD PTR 128[ebp]
+ dec esi
+ jnz $L018prefetch_sbox
+ mov eax,DWORD PTR 36[esp]
+ sub ebp,4096
+ mov esi,DWORD PTR 24[esp]
+ mov edx,DWORD PTR 272[eax]
+ cmp edi,0
+ je $L019DECRYPT
+ mov ecx,DWORD PTR 32[esp]
+ mov edi,DWORD PTR 40[esp]
+ shl edx,6
+ lea edx,DWORD PTR [edx*1+eax]
+ mov DWORD PTR 16[esp],edx
+ test ecx,4294967280
+ jz $L020enc_tail
+ mov eax,DWORD PTR [edi]
+ mov ebx,DWORD PTR 4[edi]
+ALIGN 4
+$L021enc_loop:
+ mov ecx,DWORD PTR 8[edi]
+ mov edx,DWORD PTR 12[edi]
+ xor eax,DWORD PTR [esi]
+ xor ebx,DWORD PTR 4[esi]
+ xor ecx,DWORD PTR 8[esi]
+ bswap eax
+ xor edx,DWORD PTR 12[esi]
+ bswap ebx
+ mov edi,DWORD PTR 36[esp]
+ bswap ecx
+ bswap edx
+ call __x86_Camellia_encrypt
+ mov esi,DWORD PTR 24[esp]
+ mov edi,DWORD PTR 28[esp]
+ bswap eax
+ bswap ebx
+ bswap ecx
+ mov DWORD PTR [edi],eax
+ bswap edx
+ mov DWORD PTR 4[edi],ebx
+ mov DWORD PTR 8[edi],ecx
+ mov DWORD PTR 12[edi],edx
+ mov ecx,DWORD PTR 32[esp]
+ lea esi,DWORD PTR 16[esi]
+ mov DWORD PTR 24[esp],esi
+ lea edx,DWORD PTR 16[edi]
+ mov DWORD PTR 28[esp],edx
+ sub ecx,16
+ test ecx,4294967280
+ mov DWORD PTR 32[esp],ecx
+ jnz $L021enc_loop
+ test ecx,15
+ jnz $L020enc_tail
+ mov esi,DWORD PTR 40[esp]
+ mov ecx,DWORD PTR 8[edi]
+ mov edx,DWORD PTR 12[edi]
+ mov DWORD PTR [esi],eax
+ mov DWORD PTR 4[esi],ebx
+ mov DWORD PTR 8[esi],ecx
+ mov DWORD PTR 12[esi],edx
+ mov esp,DWORD PTR 20[esp]
+ popfd
+$L016enc_out:
+ pop edi
+ pop esi
+ pop ebx
+ pop ebp
+ ret
+ pushfd
+ALIGN 4
+$L020enc_tail:
+ mov eax,edi
+ mov edi,DWORD PTR 28[esp]
+ push eax
+ mov ebx,16
+ sub ebx,ecx
+ cmp edi,esi
+ je $L022enc_in_place
+ALIGN 4
+DD 2767451785
+ jmp $L023enc_skip_in_place
+$L022enc_in_place:
+ lea edi,DWORD PTR [ecx*1+edi]
+$L023enc_skip_in_place:
+ mov ecx,ebx
+ xor eax,eax
+ALIGN 4
+DD 2868115081
+ pop edi
+ mov esi,DWORD PTR 28[esp]
+ mov eax,DWORD PTR [edi]
+ mov ebx,DWORD PTR 4[edi]
+ mov DWORD PTR 32[esp],16
+ jmp $L021enc_loop
+ALIGN 16
+$L019DECRYPT:
+ shl edx,6
+ lea edx,DWORD PTR [edx*1+eax]
+ mov DWORD PTR 16[esp],eax
+ mov DWORD PTR 36[esp],edx
+ cmp esi,DWORD PTR 28[esp]
+ je $L024dec_in_place
+ mov edi,DWORD PTR 40[esp]
+ mov DWORD PTR 44[esp],edi
+ALIGN 4
+$L025dec_loop:
+ mov eax,DWORD PTR [esi]
+ mov ebx,DWORD PTR 4[esi]
+ mov ecx,DWORD PTR 8[esi]
+ bswap eax
+ mov edx,DWORD PTR 12[esi]
+ bswap ebx
+ mov edi,DWORD PTR 36[esp]
+ bswap ecx
+ bswap edx
+ call __x86_Camellia_decrypt
+ mov edi,DWORD PTR 44[esp]
+ mov esi,DWORD PTR 32[esp]
+ bswap eax
+ bswap ebx
+ bswap ecx
+ xor eax,DWORD PTR [edi]
+ bswap edx
+ xor ebx,DWORD PTR 4[edi]
+ xor ecx,DWORD PTR 8[edi]
+ xor edx,DWORD PTR 12[edi]
+ sub esi,16
+ jc $L026dec_partial
+ mov DWORD PTR 32[esp],esi
+ mov esi,DWORD PTR 24[esp]
+ mov edi,DWORD PTR 28[esp]
+ mov DWORD PTR [edi],eax
+ mov DWORD PTR 4[edi],ebx
+ mov DWORD PTR 8[edi],ecx
+ mov DWORD PTR 12[edi],edx
+ mov DWORD PTR 44[esp],esi
+ lea esi,DWORD PTR 16[esi]
+ mov DWORD PTR 24[esp],esi
+ lea edi,DWORD PTR 16[edi]
+ mov DWORD PTR 28[esp],edi
+ jnz $L025dec_loop
+ mov edi,DWORD PTR 44[esp]
+$L027dec_end:
+ mov esi,DWORD PTR 40[esp]
+ mov eax,DWORD PTR [edi]
+ mov ebx,DWORD PTR 4[edi]
+ mov ecx,DWORD PTR 8[edi]
+ mov edx,DWORD PTR 12[edi]
+ mov DWORD PTR [esi],eax
+ mov DWORD PTR 4[esi],ebx
+ mov DWORD PTR 8[esi],ecx
+ mov DWORD PTR 12[esi],edx
+ jmp $L028dec_out
+ALIGN 4
+$L026dec_partial:
+ lea edi,DWORD PTR 44[esp]
+ mov DWORD PTR [edi],eax
+ mov DWORD PTR 4[edi],ebx
+ mov DWORD PTR 8[edi],ecx
+ mov DWORD PTR 12[edi],edx
+ lea ecx,DWORD PTR 16[esi]
+ mov esi,edi
+ mov edi,DWORD PTR 28[esp]
+DD 2767451785
+ mov edi,DWORD PTR 24[esp]
+ jmp $L027dec_end
+ALIGN 4
+$L024dec_in_place:
+$L029dec_in_place_loop:
+ lea edi,DWORD PTR 44[esp]
+ mov eax,DWORD PTR [esi]
+ mov ebx,DWORD PTR 4[esi]
+ mov ecx,DWORD PTR 8[esi]
+ mov edx,DWORD PTR 12[esi]
+ mov DWORD PTR [edi],eax
+ mov DWORD PTR 4[edi],ebx
+ mov DWORD PTR 8[edi],ecx
+ bswap eax
+ mov DWORD PTR 12[edi],edx
+ bswap ebx
+ mov edi,DWORD PTR 36[esp]
+ bswap ecx
+ bswap edx
+ call __x86_Camellia_decrypt
+ mov edi,DWORD PTR 40[esp]
+ mov esi,DWORD PTR 28[esp]
+ bswap eax
+ bswap ebx
+ bswap ecx
+ xor eax,DWORD PTR [edi]
+ bswap edx
+ xor ebx,DWORD PTR 4[edi]
+ xor ecx,DWORD PTR 8[edi]
+ xor edx,DWORD PTR 12[edi]
+ mov DWORD PTR [esi],eax
+ mov DWORD PTR 4[esi],ebx
+ mov DWORD PTR 8[esi],ecx
+ mov DWORD PTR 12[esi],edx
+ lea esi,DWORD PTR 16[esi]
+ mov DWORD PTR 28[esp],esi
+ lea esi,DWORD PTR 44[esp]
+ mov eax,DWORD PTR [esi]
+ mov ebx,DWORD PTR 4[esi]
+ mov ecx,DWORD PTR 8[esi]
+ mov edx,DWORD PTR 12[esi]
+ mov DWORD PTR [edi],eax
+ mov DWORD PTR 4[edi],ebx
+ mov DWORD PTR 8[edi],ecx
+ mov DWORD PTR 12[edi],edx
+ mov esi,DWORD PTR 24[esp]
+ lea esi,DWORD PTR 16[esi]
+ mov DWORD PTR 24[esp],esi
+ mov ecx,DWORD PTR 32[esp]
+ sub ecx,16
+ jc $L030dec_in_place_partial
+ mov DWORD PTR 32[esp],ecx
+ jnz $L029dec_in_place_loop
+ jmp $L028dec_out
+ALIGN 4
+$L030dec_in_place_partial:
+ mov edi,DWORD PTR 28[esp]
+ lea esi,DWORD PTR 44[esp]
+ lea edi,DWORD PTR [ecx*1+edi]
+ lea esi,DWORD PTR 16[ecx*1+esi]
+ neg ecx
+DD 2767451785
+ALIGN 4
+$L028dec_out:
+ mov esp,DWORD PTR 20[esp]
+ popfd
+ pop edi
+ pop esi
+ pop ebx
+ pop ebp
+ ret
+_Camellia_cbc_encrypt ENDP
+DB 67,97,109,101,108,108,105,97,32,102,111,114,32,120,56,54
+DB 32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115
+DB 115,108,46,111,114,103,62,0
+.text$ ENDS
+END
diff --git a/contrib/libs/openssl/asm/windows/crypto/camellia/cmll-x86_64.masm b/contrib/libs/openssl/asm/windows/crypto/camellia/cmll-x86_64.masm
new file mode 100644
index 0000000000..19df1f0306
--- /dev/null
+++ b/contrib/libs/openssl/asm/windows/crypto/camellia/cmll-x86_64.masm
@@ -0,0 +1,2164 @@
+OPTION DOTNAME
+.text$ SEGMENT ALIGN(256) 'CODE'
+
+
+PUBLIC Camellia_EncryptBlock
+
+ALIGN 16
+Camellia_EncryptBlock PROC PUBLIC
+
+ mov eax,128
+ sub eax,ecx
+ mov ecx,3
+ adc ecx,0
+ jmp $L$enc_rounds
+
+Camellia_EncryptBlock ENDP
+
+PUBLIC Camellia_EncryptBlock_Rounds
+
+ALIGN 16
+$L$enc_rounds::
+Camellia_EncryptBlock_Rounds PROC PUBLIC
+ mov QWORD PTR[8+rsp],rdi ;WIN64 prologue
+ mov QWORD PTR[16+rsp],rsi
+ mov rax,rsp
+$L$SEH_begin_Camellia_EncryptBlock_Rounds::
+ mov rdi,rcx
+ mov rsi,rdx
+ mov rdx,r8
+ mov rcx,r9
+
+
+
+ push rbx
+
+ push rbp
+
+ push r13
+
+ push r14
+
+ push r15
+
+$L$enc_prologue::
+
+
+ mov r13,rcx
+ mov r14,rdx
+
+ shl edi,6
+ lea rbp,QWORD PTR[$L$Camellia_SBOX]
+ lea r15,QWORD PTR[rdi*1+r14]
+
+ mov r8d,DWORD PTR[rsi]
+ mov r9d,DWORD PTR[4+rsi]
+ mov r10d,DWORD PTR[8+rsi]
+ bswap r8d
+ mov r11d,DWORD PTR[12+rsi]
+ bswap r9d
+ bswap r10d
+ bswap r11d
+
+ call _x86_64_Camellia_encrypt
+
+ bswap r8d
+ bswap r9d
+ bswap r10d
+ mov DWORD PTR[r13],r8d
+ bswap r11d
+ mov DWORD PTR[4+r13],r9d
+ mov DWORD PTR[8+r13],r10d
+ mov DWORD PTR[12+r13],r11d
+
+ mov r15,QWORD PTR[rsp]
+
+ mov r14,QWORD PTR[8+rsp]
+
+ mov r13,QWORD PTR[16+rsp]
+
+ mov rbp,QWORD PTR[24+rsp]
+
+ mov rbx,QWORD PTR[32+rsp]
+
+ lea rsp,QWORD PTR[40+rsp]
+
+$L$enc_epilogue::
+ mov rdi,QWORD PTR[8+rsp] ;WIN64 epilogue
+ mov rsi,QWORD PTR[16+rsp]
+ DB 0F3h,0C3h ;repret
+
+$L$SEH_end_Camellia_EncryptBlock_Rounds::
+Camellia_EncryptBlock_Rounds ENDP
+
+
+ALIGN 16
+_x86_64_Camellia_encrypt PROC PRIVATE
+
+ xor r9d,DWORD PTR[r14]
+ xor r8d,DWORD PTR[4+r14]
+ xor r11d,DWORD PTR[8+r14]
+ xor r10d,DWORD PTR[12+r14]
+ALIGN 16
+$L$eloop::
+ mov ebx,DWORD PTR[16+r14]
+ mov eax,DWORD PTR[20+r14]
+
+ xor eax,r8d
+ xor ebx,r9d
+ movzx esi,ah
+ movzx edi,bl
+ mov edx,DWORD PTR[2052+rsi*8+rbp]
+ mov ecx,DWORD PTR[rdi*8+rbp]
+ movzx esi,al
+ shr eax,16
+ movzx edi,bh
+ xor edx,DWORD PTR[4+rsi*8+rbp]
+ shr ebx,16
+ xor ecx,DWORD PTR[4+rdi*8+rbp]
+ movzx esi,ah
+ movzx edi,bl
+ xor edx,DWORD PTR[rsi*8+rbp]
+ xor ecx,DWORD PTR[2052+rdi*8+rbp]
+ movzx esi,al
+ movzx edi,bh
+ xor edx,DWORD PTR[2048+rsi*8+rbp]
+ xor ecx,DWORD PTR[2048+rdi*8+rbp]
+ mov ebx,DWORD PTR[24+r14]
+ mov eax,DWORD PTR[28+r14]
+ xor ecx,edx
+ ror edx,8
+ xor r10d,ecx
+ xor r11d,ecx
+ xor r11d,edx
+ xor eax,r10d
+ xor ebx,r11d
+ movzx esi,ah
+ movzx edi,bl
+ mov edx,DWORD PTR[2052+rsi*8+rbp]
+ mov ecx,DWORD PTR[rdi*8+rbp]
+ movzx esi,al
+ shr eax,16
+ movzx edi,bh
+ xor edx,DWORD PTR[4+rsi*8+rbp]
+ shr ebx,16
+ xor ecx,DWORD PTR[4+rdi*8+rbp]
+ movzx esi,ah
+ movzx edi,bl
+ xor edx,DWORD PTR[rsi*8+rbp]
+ xor ecx,DWORD PTR[2052+rdi*8+rbp]
+ movzx esi,al
+ movzx edi,bh
+ xor edx,DWORD PTR[2048+rsi*8+rbp]
+ xor ecx,DWORD PTR[2048+rdi*8+rbp]
+ mov ebx,DWORD PTR[32+r14]
+ mov eax,DWORD PTR[36+r14]
+ xor ecx,edx
+ ror edx,8
+ xor r8d,ecx
+ xor r9d,ecx
+ xor r9d,edx
+ xor eax,r8d
+ xor ebx,r9d
+ movzx esi,ah
+ movzx edi,bl
+ mov edx,DWORD PTR[2052+rsi*8+rbp]
+ mov ecx,DWORD PTR[rdi*8+rbp]
+ movzx esi,al
+ shr eax,16
+ movzx edi,bh
+ xor edx,DWORD PTR[4+rsi*8+rbp]
+ shr ebx,16
+ xor ecx,DWORD PTR[4+rdi*8+rbp]
+ movzx esi,ah
+ movzx edi,bl
+ xor edx,DWORD PTR[rsi*8+rbp]
+ xor ecx,DWORD PTR[2052+rdi*8+rbp]
+ movzx esi,al
+ movzx edi,bh
+ xor edx,DWORD PTR[2048+rsi*8+rbp]
+ xor ecx,DWORD PTR[2048+rdi*8+rbp]
+ mov ebx,DWORD PTR[40+r14]
+ mov eax,DWORD PTR[44+r14]
+ xor ecx,edx
+ ror edx,8
+ xor r10d,ecx
+ xor r11d,ecx
+ xor r11d,edx
+ xor eax,r10d
+ xor ebx,r11d
+ movzx esi,ah
+ movzx edi,bl
+ mov edx,DWORD PTR[2052+rsi*8+rbp]
+ mov ecx,DWORD PTR[rdi*8+rbp]
+ movzx esi,al
+ shr eax,16
+ movzx edi,bh
+ xor edx,DWORD PTR[4+rsi*8+rbp]
+ shr ebx,16
+ xor ecx,DWORD PTR[4+rdi*8+rbp]
+ movzx esi,ah
+ movzx edi,bl
+ xor edx,DWORD PTR[rsi*8+rbp]
+ xor ecx,DWORD PTR[2052+rdi*8+rbp]
+ movzx esi,al
+ movzx edi,bh
+ xor edx,DWORD PTR[2048+rsi*8+rbp]
+ xor ecx,DWORD PTR[2048+rdi*8+rbp]
+ mov ebx,DWORD PTR[48+r14]
+ mov eax,DWORD PTR[52+r14]
+ xor ecx,edx
+ ror edx,8
+ xor r8d,ecx
+ xor r9d,ecx
+ xor r9d,edx
+ xor eax,r8d
+ xor ebx,r9d
+ movzx esi,ah
+ movzx edi,bl
+ mov edx,DWORD PTR[2052+rsi*8+rbp]
+ mov ecx,DWORD PTR[rdi*8+rbp]
+ movzx esi,al
+ shr eax,16
+ movzx edi,bh
+ xor edx,DWORD PTR[4+rsi*8+rbp]
+ shr ebx,16
+ xor ecx,DWORD PTR[4+rdi*8+rbp]
+ movzx esi,ah
+ movzx edi,bl
+ xor edx,DWORD PTR[rsi*8+rbp]
+ xor ecx,DWORD PTR[2052+rdi*8+rbp]
+ movzx esi,al
+ movzx edi,bh
+ xor edx,DWORD PTR[2048+rsi*8+rbp]
+ xor ecx,DWORD PTR[2048+rdi*8+rbp]
+ mov ebx,DWORD PTR[56+r14]
+ mov eax,DWORD PTR[60+r14]
+ xor ecx,edx
+ ror edx,8
+ xor r10d,ecx
+ xor r11d,ecx
+ xor r11d,edx
+ xor eax,r10d
+ xor ebx,r11d
+ movzx esi,ah
+ movzx edi,bl
+ mov edx,DWORD PTR[2052+rsi*8+rbp]
+ mov ecx,DWORD PTR[rdi*8+rbp]
+ movzx esi,al
+ shr eax,16
+ movzx edi,bh
+ xor edx,DWORD PTR[4+rsi*8+rbp]
+ shr ebx,16
+ xor ecx,DWORD PTR[4+rdi*8+rbp]
+ movzx esi,ah
+ movzx edi,bl
+ xor edx,DWORD PTR[rsi*8+rbp]
+ xor ecx,DWORD PTR[2052+rdi*8+rbp]
+ movzx esi,al
+ movzx edi,bh
+ xor edx,DWORD PTR[2048+rsi*8+rbp]
+ xor ecx,DWORD PTR[2048+rdi*8+rbp]
+ mov ebx,DWORD PTR[64+r14]
+ mov eax,DWORD PTR[68+r14]
+ xor ecx,edx
+ ror edx,8
+ xor r8d,ecx
+ xor r9d,ecx
+ xor r9d,edx
+ lea r14,QWORD PTR[64+r14]
+ cmp r14,r15
+ mov edx,DWORD PTR[8+r14]
+ mov ecx,DWORD PTR[12+r14]
+ je $L$edone
+
+ and eax,r8d
+ or edx,r11d
+ rol eax,1
+ xor r10d,edx
+ xor r9d,eax
+ and ecx,r10d
+ or ebx,r9d
+ rol ecx,1
+ xor r8d,ebx
+ xor r11d,ecx
+ jmp $L$eloop
+
+ALIGN 16
+$L$edone::
+ xor eax,r10d
+ xor ebx,r11d
+ xor ecx,r8d
+ xor edx,r9d
+
+ mov r8d,eax
+ mov r9d,ebx
+ mov r10d,ecx
+ mov r11d,edx
+
+DB 0f3h,0c3h
+
+_x86_64_Camellia_encrypt ENDP
+
+
+PUBLIC Camellia_DecryptBlock
+
+ALIGN 16
+Camellia_DecryptBlock PROC PUBLIC
+
+ mov eax,128
+ sub eax,ecx
+ mov ecx,3
+ adc ecx,0
+ jmp $L$dec_rounds
+
+Camellia_DecryptBlock ENDP
+
+PUBLIC Camellia_DecryptBlock_Rounds
+
+ALIGN 16
+$L$dec_rounds::
+Camellia_DecryptBlock_Rounds PROC PUBLIC
+ mov QWORD PTR[8+rsp],rdi ;WIN64 prologue
+ mov QWORD PTR[16+rsp],rsi
+ mov rax,rsp
+$L$SEH_begin_Camellia_DecryptBlock_Rounds::
+ mov rdi,rcx
+ mov rsi,rdx
+ mov rdx,r8
+ mov rcx,r9
+
+
+
+ push rbx
+
+ push rbp
+
+ push r13
+
+ push r14
+
+ push r15
+
+$L$dec_prologue::
+
+
+ mov r13,rcx
+ mov r15,rdx
+
+ shl edi,6
+ lea rbp,QWORD PTR[$L$Camellia_SBOX]
+ lea r14,QWORD PTR[rdi*1+r15]
+
+ mov r8d,DWORD PTR[rsi]
+ mov r9d,DWORD PTR[4+rsi]
+ mov r10d,DWORD PTR[8+rsi]
+ bswap r8d
+ mov r11d,DWORD PTR[12+rsi]
+ bswap r9d
+ bswap r10d
+ bswap r11d
+
+ call _x86_64_Camellia_decrypt
+
+ bswap r8d
+ bswap r9d
+ bswap r10d
+ mov DWORD PTR[r13],r8d
+ bswap r11d
+ mov DWORD PTR[4+r13],r9d
+ mov DWORD PTR[8+r13],r10d
+ mov DWORD PTR[12+r13],r11d
+
+ mov r15,QWORD PTR[rsp]
+
+ mov r14,QWORD PTR[8+rsp]
+
+ mov r13,QWORD PTR[16+rsp]
+
+ mov rbp,QWORD PTR[24+rsp]
+
+ mov rbx,QWORD PTR[32+rsp]
+
+ lea rsp,QWORD PTR[40+rsp]
+
+$L$dec_epilogue::
+ mov rdi,QWORD PTR[8+rsp] ;WIN64 epilogue
+ mov rsi,QWORD PTR[16+rsp]
+ DB 0F3h,0C3h ;repret
+
+$L$SEH_end_Camellia_DecryptBlock_Rounds::
+Camellia_DecryptBlock_Rounds ENDP
+
+
+ALIGN 16
+_x86_64_Camellia_decrypt PROC PRIVATE
+
+ xor r9d,DWORD PTR[r14]
+ xor r8d,DWORD PTR[4+r14]
+ xor r11d,DWORD PTR[8+r14]
+ xor r10d,DWORD PTR[12+r14]
+ALIGN 16
+$L$dloop::
+ mov ebx,DWORD PTR[((-8))+r14]
+ mov eax,DWORD PTR[((-4))+r14]
+
+ xor eax,r8d
+ xor ebx,r9d
+ movzx esi,ah
+ movzx edi,bl
+ mov edx,DWORD PTR[2052+rsi*8+rbp]
+ mov ecx,DWORD PTR[rdi*8+rbp]
+ movzx esi,al
+ shr eax,16
+ movzx edi,bh
+ xor edx,DWORD PTR[4+rsi*8+rbp]
+ shr ebx,16
+ xor ecx,DWORD PTR[4+rdi*8+rbp]
+ movzx esi,ah
+ movzx edi,bl
+ xor edx,DWORD PTR[rsi*8+rbp]
+ xor ecx,DWORD PTR[2052+rdi*8+rbp]
+ movzx esi,al
+ movzx edi,bh
+ xor edx,DWORD PTR[2048+rsi*8+rbp]
+ xor ecx,DWORD PTR[2048+rdi*8+rbp]
+ mov ebx,DWORD PTR[((-16))+r14]
+ mov eax,DWORD PTR[((-12))+r14]
+ xor ecx,edx
+ ror edx,8
+ xor r10d,ecx
+ xor r11d,ecx
+ xor r11d,edx
+ xor eax,r10d
+ xor ebx,r11d
+ movzx esi,ah
+ movzx edi,bl
+ mov edx,DWORD PTR[2052+rsi*8+rbp]
+ mov ecx,DWORD PTR[rdi*8+rbp]
+ movzx esi,al
+ shr eax,16
+ movzx edi,bh
+ xor edx,DWORD PTR[4+rsi*8+rbp]
+ shr ebx,16
+ xor ecx,DWORD PTR[4+rdi*8+rbp]
+ movzx esi,ah
+ movzx edi,bl
+ xor edx,DWORD PTR[rsi*8+rbp]
+ xor ecx,DWORD PTR[2052+rdi*8+rbp]
+ movzx esi,al
+ movzx edi,bh
+ xor edx,DWORD PTR[2048+rsi*8+rbp]
+ xor ecx,DWORD PTR[2048+rdi*8+rbp]
+ mov ebx,DWORD PTR[((-24))+r14]
+ mov eax,DWORD PTR[((-20))+r14]
+ xor ecx,edx
+ ror edx,8
+ xor r8d,ecx
+ xor r9d,ecx
+ xor r9d,edx
+ xor eax,r8d
+ xor ebx,r9d
+ movzx esi,ah
+ movzx edi,bl
+ mov edx,DWORD PTR[2052+rsi*8+rbp]
+ mov ecx,DWORD PTR[rdi*8+rbp]
+ movzx esi,al
+ shr eax,16
+ movzx edi,bh
+ xor edx,DWORD PTR[4+rsi*8+rbp]
+ shr ebx,16
+ xor ecx,DWORD PTR[4+rdi*8+rbp]
+ movzx esi,ah
+ movzx edi,bl
+ xor edx,DWORD PTR[rsi*8+rbp]
+ xor ecx,DWORD PTR[2052+rdi*8+rbp]
+ movzx esi,al
+ movzx edi,bh
+ xor edx,DWORD PTR[2048+rsi*8+rbp]
+ xor ecx,DWORD PTR[2048+rdi*8+rbp]
+ mov ebx,DWORD PTR[((-32))+r14]
+ mov eax,DWORD PTR[((-28))+r14]
+ xor ecx,edx
+ ror edx,8
+ xor r10d,ecx
+ xor r11d,ecx
+ xor r11d,edx
+ xor eax,r10d
+ xor ebx,r11d
+ movzx esi,ah
+ movzx edi,bl
+ mov edx,DWORD PTR[2052+rsi*8+rbp]
+ mov ecx,DWORD PTR[rdi*8+rbp]
+ movzx esi,al
+ shr eax,16
+ movzx edi,bh
+ xor edx,DWORD PTR[4+rsi*8+rbp]
+ shr ebx,16
+ xor ecx,DWORD PTR[4+rdi*8+rbp]
+ movzx esi,ah
+ movzx edi,bl
+ xor edx,DWORD PTR[rsi*8+rbp]
+ xor ecx,DWORD PTR[2052+rdi*8+rbp]
+ movzx esi,al
+ movzx edi,bh
+ xor edx,DWORD PTR[2048+rsi*8+rbp]
+ xor ecx,DWORD PTR[2048+rdi*8+rbp]
+ mov ebx,DWORD PTR[((-40))+r14]
+ mov eax,DWORD PTR[((-36))+r14]
+ xor ecx,edx
+ ror edx,8
+ xor r8d,ecx
+ xor r9d,ecx
+ xor r9d,edx
+ xor eax,r8d
+ xor ebx,r9d
+ movzx esi,ah
+ movzx edi,bl
+ mov edx,DWORD PTR[2052+rsi*8+rbp]
+ mov ecx,DWORD PTR[rdi*8+rbp]
+ movzx esi,al
+ shr eax,16
+ movzx edi,bh
+ xor edx,DWORD PTR[4+rsi*8+rbp]
+ shr ebx,16
+ xor ecx,DWORD PTR[4+rdi*8+rbp]
+ movzx esi,ah
+ movzx edi,bl
+ xor edx,DWORD PTR[rsi*8+rbp]
+ xor ecx,DWORD PTR[2052+rdi*8+rbp]
+ movzx esi,al
+ movzx edi,bh
+ xor edx,DWORD PTR[2048+rsi*8+rbp]
+ xor ecx,DWORD PTR[2048+rdi*8+rbp]
+ mov ebx,DWORD PTR[((-48))+r14]
+ mov eax,DWORD PTR[((-44))+r14]
+ xor ecx,edx
+ ror edx,8
+ xor r10d,ecx
+ xor r11d,ecx
+ xor r11d,edx
+ xor eax,r10d
+ xor ebx,r11d
+ movzx esi,ah
+ movzx edi,bl
+ mov edx,DWORD PTR[2052+rsi*8+rbp]
+ mov ecx,DWORD PTR[rdi*8+rbp]
+ movzx esi,al
+ shr eax,16
+ movzx edi,bh
+ xor edx,DWORD PTR[4+rsi*8+rbp]
+ shr ebx,16
+ xor ecx,DWORD PTR[4+rdi*8+rbp]
+ movzx esi,ah
+ movzx edi,bl
+ xor edx,DWORD PTR[rsi*8+rbp]
+ xor ecx,DWORD PTR[2052+rdi*8+rbp]
+ movzx esi,al
+ movzx edi,bh
+ xor edx,DWORD PTR[2048+rsi*8+rbp]
+ xor ecx,DWORD PTR[2048+rdi*8+rbp]
+ mov ebx,DWORD PTR[((-56))+r14]
+ mov eax,DWORD PTR[((-52))+r14]
+ xor ecx,edx
+ ror edx,8
+ xor r8d,ecx
+ xor r9d,ecx
+ xor r9d,edx
+ lea r14,QWORD PTR[((-64))+r14]
+ cmp r14,r15
+ mov edx,DWORD PTR[r14]
+ mov ecx,DWORD PTR[4+r14]
+ je $L$ddone
+
+ and eax,r8d
+ or edx,r11d
+ rol eax,1
+ xor r10d,edx
+ xor r9d,eax
+ and ecx,r10d
+ or ebx,r9d
+ rol ecx,1
+ xor r8d,ebx
+ xor r11d,ecx
+
+ jmp $L$dloop
+
+ALIGN 16
+$L$ddone::
+ xor ecx,r10d
+ xor edx,r11d
+ xor eax,r8d
+ xor ebx,r9d
+
+ mov r8d,ecx
+ mov r9d,edx
+ mov r10d,eax
+ mov r11d,ebx
+
+DB 0f3h,0c3h
+
+_x86_64_Camellia_decrypt ENDP
+PUBLIC Camellia_Ekeygen
+
+ALIGN 16
+Camellia_Ekeygen PROC PUBLIC
+ mov QWORD PTR[8+rsp],rdi ;WIN64 prologue
+ mov QWORD PTR[16+rsp],rsi
+ mov rax,rsp
+$L$SEH_begin_Camellia_Ekeygen::
+ mov rdi,rcx
+ mov rsi,rdx
+ mov rdx,r8
+
+
+
+ push rbx
+
+ push rbp
+
+ push r13
+
+ push r14
+
+ push r15
+
+$L$key_prologue::
+
+ mov r15d,edi
+ mov r13,rdx
+
+ mov r8d,DWORD PTR[rsi]
+ mov r9d,DWORD PTR[4+rsi]
+ mov r10d,DWORD PTR[8+rsi]
+ mov r11d,DWORD PTR[12+rsi]
+
+ bswap r8d
+ bswap r9d
+ bswap r10d
+ bswap r11d
+ mov DWORD PTR[r13],r9d
+ mov DWORD PTR[4+r13],r8d
+ mov DWORD PTR[8+r13],r11d
+ mov DWORD PTR[12+r13],r10d
+ cmp r15,128
+ je $L$1st128
+
+ mov r8d,DWORD PTR[16+rsi]
+ mov r9d,DWORD PTR[20+rsi]
+ cmp r15,192
+ je $L$1st192
+ mov r10d,DWORD PTR[24+rsi]
+ mov r11d,DWORD PTR[28+rsi]
+ jmp $L$1st256
+$L$1st192::
+ mov r10d,r8d
+ mov r11d,r9d
+ not r10d
+ not r11d
+$L$1st256::
+ bswap r8d
+ bswap r9d
+ bswap r10d
+ bswap r11d
+ mov DWORD PTR[32+r13],r9d
+ mov DWORD PTR[36+r13],r8d
+ mov DWORD PTR[40+r13],r11d
+ mov DWORD PTR[44+r13],r10d
+ xor r9d,DWORD PTR[r13]
+ xor r8d,DWORD PTR[4+r13]
+ xor r11d,DWORD PTR[8+r13]
+ xor r10d,DWORD PTR[12+r13]
+
+$L$1st128::
+ lea r14,QWORD PTR[$L$Camellia_SIGMA]
+ lea rbp,QWORD PTR[$L$Camellia_SBOX]
+
+ mov ebx,DWORD PTR[r14]
+ mov eax,DWORD PTR[4+r14]
+ xor eax,r8d
+ xor ebx,r9d
+ movzx esi,ah
+ movzx edi,bl
+ mov edx,DWORD PTR[2052+rsi*8+rbp]
+ mov ecx,DWORD PTR[rdi*8+rbp]
+ movzx esi,al
+ shr eax,16
+ movzx edi,bh
+ xor edx,DWORD PTR[4+rsi*8+rbp]
+ shr ebx,16
+ xor ecx,DWORD PTR[4+rdi*8+rbp]
+ movzx esi,ah
+ movzx edi,bl
+ xor edx,DWORD PTR[rsi*8+rbp]
+ xor ecx,DWORD PTR[2052+rdi*8+rbp]
+ movzx esi,al
+ movzx edi,bh
+ xor edx,DWORD PTR[2048+rsi*8+rbp]
+ xor ecx,DWORD PTR[2048+rdi*8+rbp]
+ mov ebx,DWORD PTR[8+r14]
+ mov eax,DWORD PTR[12+r14]
+ xor ecx,edx
+ ror edx,8
+ xor r10d,ecx
+ xor r11d,ecx
+ xor r11d,edx
+ xor eax,r10d
+ xor ebx,r11d
+ movzx esi,ah
+ movzx edi,bl
+ mov edx,DWORD PTR[2052+rsi*8+rbp]
+ mov ecx,DWORD PTR[rdi*8+rbp]
+ movzx esi,al
+ shr eax,16
+ movzx edi,bh
+ xor edx,DWORD PTR[4+rsi*8+rbp]
+ shr ebx,16
+ xor ecx,DWORD PTR[4+rdi*8+rbp]
+ movzx esi,ah
+ movzx edi,bl
+ xor edx,DWORD PTR[rsi*8+rbp]
+ xor ecx,DWORD PTR[2052+rdi*8+rbp]
+ movzx esi,al
+ movzx edi,bh
+ xor edx,DWORD PTR[2048+rsi*8+rbp]
+ xor ecx,DWORD PTR[2048+rdi*8+rbp]
+ mov ebx,DWORD PTR[16+r14]
+ mov eax,DWORD PTR[20+r14]
+ xor ecx,edx
+ ror edx,8
+ xor r8d,ecx
+ xor r9d,ecx
+ xor r9d,edx
+ xor r9d,DWORD PTR[r13]
+ xor r8d,DWORD PTR[4+r13]
+ xor r11d,DWORD PTR[8+r13]
+ xor r10d,DWORD PTR[12+r13]
+ xor eax,r8d
+ xor ebx,r9d
+ movzx esi,ah
+ movzx edi,bl
+ mov edx,DWORD PTR[2052+rsi*8+rbp]
+ mov ecx,DWORD PTR[rdi*8+rbp]
+ movzx esi,al
+ shr eax,16
+ movzx edi,bh
+ xor edx,DWORD PTR[4+rsi*8+rbp]
+ shr ebx,16
+ xor ecx,DWORD PTR[4+rdi*8+rbp]
+ movzx esi,ah
+ movzx edi,bl
+ xor edx,DWORD PTR[rsi*8+rbp]
+ xor ecx,DWORD PTR[2052+rdi*8+rbp]
+ movzx esi,al
+ movzx edi,bh
+ xor edx,DWORD PTR[2048+rsi*8+rbp]
+ xor ecx,DWORD PTR[2048+rdi*8+rbp]
+ mov ebx,DWORD PTR[24+r14]
+ mov eax,DWORD PTR[28+r14]
+ xor ecx,edx
+ ror edx,8
+ xor r10d,ecx
+ xor r11d,ecx
+ xor r11d,edx
+ xor eax,r10d
+ xor ebx,r11d
+ movzx esi,ah
+ movzx edi,bl
+ mov edx,DWORD PTR[2052+rsi*8+rbp]
+ mov ecx,DWORD PTR[rdi*8+rbp]
+ movzx esi,al
+ shr eax,16
+ movzx edi,bh
+ xor edx,DWORD PTR[4+rsi*8+rbp]
+ shr ebx,16
+ xor ecx,DWORD PTR[4+rdi*8+rbp]
+ movzx esi,ah
+ movzx edi,bl
+ xor edx,DWORD PTR[rsi*8+rbp]
+ xor ecx,DWORD PTR[2052+rdi*8+rbp]
+ movzx esi,al
+ movzx edi,bh
+ xor edx,DWORD PTR[2048+rsi*8+rbp]
+ xor ecx,DWORD PTR[2048+rdi*8+rbp]
+ mov ebx,DWORD PTR[32+r14]
+ mov eax,DWORD PTR[36+r14]
+ xor ecx,edx
+ ror edx,8
+ xor r8d,ecx
+ xor r9d,ecx
+ xor r9d,edx
+ cmp r15,128
+ jne $L$2nd256
+
+ lea r13,QWORD PTR[128+r13]
+ shl r8,32
+ shl r10,32
+ or r8,r9
+ or r10,r11
+ mov rax,QWORD PTR[((-128))+r13]
+ mov rbx,QWORD PTR[((-120))+r13]
+ mov QWORD PTR[((-112))+r13],r8
+ mov QWORD PTR[((-104))+r13],r10
+ mov r11,rax
+ shl rax,15
+ mov r9,rbx
+ shr r9,49
+ shr r11,49
+ or rax,r9
+ shl rbx,15
+ or rbx,r11
+ mov QWORD PTR[((-96))+r13],rax
+ mov QWORD PTR[((-88))+r13],rbx
+ mov r11,r8
+ shl r8,15
+ mov r9,r10
+ shr r9,49
+ shr r11,49
+ or r8,r9
+ shl r10,15
+ or r10,r11
+ mov QWORD PTR[((-80))+r13],r8
+ mov QWORD PTR[((-72))+r13],r10
+ mov r11,r8
+ shl r8,15
+ mov r9,r10
+ shr r9,49
+ shr r11,49
+ or r8,r9
+ shl r10,15
+ or r10,r11
+ mov QWORD PTR[((-64))+r13],r8
+ mov QWORD PTR[((-56))+r13],r10
+ mov r11,rax
+ shl rax,30
+ mov r9,rbx
+ shr r9,34
+ shr r11,34
+ or rax,r9
+ shl rbx,30
+ or rbx,r11
+ mov QWORD PTR[((-48))+r13],rax
+ mov QWORD PTR[((-40))+r13],rbx
+ mov r11,r8
+ shl r8,15
+ mov r9,r10
+ shr r9,49
+ shr r11,49
+ or r8,r9
+ shl r10,15
+ or r10,r11
+ mov QWORD PTR[((-32))+r13],r8
+ mov r11,rax
+ shl rax,15
+ mov r9,rbx
+ shr r9,49
+ shr r11,49
+ or rax,r9
+ shl rbx,15
+ or rbx,r11
+ mov QWORD PTR[((-24))+r13],rbx
+ mov r11,r8
+ shl r8,15
+ mov r9,r10
+ shr r9,49
+ shr r11,49
+ or r8,r9
+ shl r10,15
+ or r10,r11
+ mov QWORD PTR[((-16))+r13],r8
+ mov QWORD PTR[((-8))+r13],r10
+ mov r11,rax
+ shl rax,17
+ mov r9,rbx
+ shr r9,47
+ shr r11,47
+ or rax,r9
+ shl rbx,17
+ or rbx,r11
+ mov QWORD PTR[r13],rax
+ mov QWORD PTR[8+r13],rbx
+ mov r11,rax
+ shl rax,17
+ mov r9,rbx
+ shr r9,47
+ shr r11,47
+ or rax,r9
+ shl rbx,17
+ or rbx,r11
+ mov QWORD PTR[16+r13],rax
+ mov QWORD PTR[24+r13],rbx
+ mov r11,r8
+ shl r8,34
+ mov r9,r10
+ shr r9,30
+ shr r11,30
+ or r8,r9
+ shl r10,34
+ or r10,r11
+ mov QWORD PTR[32+r13],r8
+ mov QWORD PTR[40+r13],r10
+ mov r11,rax
+ shl rax,17
+ mov r9,rbx
+ shr r9,47
+ shr r11,47
+ or rax,r9
+ shl rbx,17
+ or rbx,r11
+ mov QWORD PTR[48+r13],rax
+ mov QWORD PTR[56+r13],rbx
+ mov r11,r8
+ shl r8,17
+ mov r9,r10
+ shr r9,47
+ shr r11,47
+ or r8,r9
+ shl r10,17
+ or r10,r11
+ mov QWORD PTR[64+r13],r8
+ mov QWORD PTR[72+r13],r10
+ mov eax,3
+ jmp $L$done
+ALIGN 16
+$L$2nd256::
+ mov DWORD PTR[48+r13],r9d
+ mov DWORD PTR[52+r13],r8d
+ mov DWORD PTR[56+r13],r11d
+ mov DWORD PTR[60+r13],r10d
+ xor r9d,DWORD PTR[32+r13]
+ xor r8d,DWORD PTR[36+r13]
+ xor r11d,DWORD PTR[40+r13]
+ xor r10d,DWORD PTR[44+r13]
+ xor eax,r8d
+ xor ebx,r9d
+ movzx esi,ah
+ movzx edi,bl
+ mov edx,DWORD PTR[2052+rsi*8+rbp]
+ mov ecx,DWORD PTR[rdi*8+rbp]
+ movzx esi,al
+ shr eax,16
+ movzx edi,bh
+ xor edx,DWORD PTR[4+rsi*8+rbp]
+ shr ebx,16
+ xor ecx,DWORD PTR[4+rdi*8+rbp]
+ movzx esi,ah
+ movzx edi,bl
+ xor edx,DWORD PTR[rsi*8+rbp]
+ xor ecx,DWORD PTR[2052+rdi*8+rbp]
+ movzx esi,al
+ movzx edi,bh
+ xor edx,DWORD PTR[2048+rsi*8+rbp]
+ xor ecx,DWORD PTR[2048+rdi*8+rbp]
+ mov ebx,DWORD PTR[40+r14]
+ mov eax,DWORD PTR[44+r14]
+ xor ecx,edx
+ ror edx,8
+ xor r10d,ecx
+ xor r11d,ecx
+ xor r11d,edx
+ xor eax,r10d
+ xor ebx,r11d
+ movzx esi,ah
+ movzx edi,bl
+ mov edx,DWORD PTR[2052+rsi*8+rbp]
+ mov ecx,DWORD PTR[rdi*8+rbp]
+ movzx esi,al
+ shr eax,16
+ movzx edi,bh
+ xor edx,DWORD PTR[4+rsi*8+rbp]
+ shr ebx,16
+ xor ecx,DWORD PTR[4+rdi*8+rbp]
+ movzx esi,ah
+ movzx edi,bl
+ xor edx,DWORD PTR[rsi*8+rbp]
+ xor ecx,DWORD PTR[2052+rdi*8+rbp]
+ movzx esi,al
+ movzx edi,bh
+ xor edx,DWORD PTR[2048+rsi*8+rbp]
+ xor ecx,DWORD PTR[2048+rdi*8+rbp]
+ mov ebx,DWORD PTR[48+r14]
+ mov eax,DWORD PTR[52+r14]
+ xor ecx,edx
+ ror edx,8
+ xor r8d,ecx
+ xor r9d,ecx
+ xor r9d,edx
+ mov rax,QWORD PTR[r13]
+ mov rbx,QWORD PTR[8+r13]
+ mov rcx,QWORD PTR[32+r13]
+ mov rdx,QWORD PTR[40+r13]
+ mov r14,QWORD PTR[48+r13]
+ mov r15,QWORD PTR[56+r13]
+ lea r13,QWORD PTR[128+r13]
+ shl r8,32
+ shl r10,32
+ or r8,r9
+ or r10,r11
+ mov QWORD PTR[((-112))+r13],r8
+ mov QWORD PTR[((-104))+r13],r10
+ mov r11,rcx
+ shl rcx,15
+ mov r9,rdx
+ shr r9,49
+ shr r11,49
+ or rcx,r9
+ shl rdx,15
+ or rdx,r11
+ mov QWORD PTR[((-96))+r13],rcx
+ mov QWORD PTR[((-88))+r13],rdx
+ mov r11,r14
+ shl r14,15
+ mov r9,r15
+ shr r9,49
+ shr r11,49
+ or r14,r9
+ shl r15,15
+ or r15,r11
+ mov QWORD PTR[((-80))+r13],r14
+ mov QWORD PTR[((-72))+r13],r15
+ mov r11,rcx
+ shl rcx,15
+ mov r9,rdx
+ shr r9,49
+ shr r11,49
+ or rcx,r9
+ shl rdx,15
+ or rdx,r11
+ mov QWORD PTR[((-64))+r13],rcx
+ mov QWORD PTR[((-56))+r13],rdx
+ mov r11,r8
+ shl r8,30
+ mov r9,r10
+ shr r9,34
+ shr r11,34
+ or r8,r9
+ shl r10,30
+ or r10,r11
+ mov QWORD PTR[((-48))+r13],r8
+ mov QWORD PTR[((-40))+r13],r10
+ mov r11,rax
+ shl rax,45
+ mov r9,rbx
+ shr r9,19
+ shr r11,19
+ or rax,r9
+ shl rbx,45
+ or rbx,r11
+ mov QWORD PTR[((-32))+r13],rax
+ mov QWORD PTR[((-24))+r13],rbx
+ mov r11,r14
+ shl r14,30
+ mov r9,r15
+ shr r9,34
+ shr r11,34
+ or r14,r9
+ shl r15,30
+ or r15,r11
+ mov QWORD PTR[((-16))+r13],r14
+ mov QWORD PTR[((-8))+r13],r15
+ mov r11,rax
+ shl rax,15
+ mov r9,rbx
+ shr r9,49
+ shr r11,49
+ or rax,r9
+ shl rbx,15
+ or rbx,r11
+ mov QWORD PTR[r13],rax
+ mov QWORD PTR[8+r13],rbx
+ mov r11,rcx
+ shl rcx,30
+ mov r9,rdx
+ shr r9,34
+ shr r11,34
+ or rcx,r9
+ shl rdx,30
+ or rdx,r11
+ mov QWORD PTR[16+r13],rcx
+ mov QWORD PTR[24+r13],rdx
+ mov r11,r8
+ shl r8,30
+ mov r9,r10
+ shr r9,34
+ shr r11,34
+ or r8,r9
+ shl r10,30
+ or r10,r11
+ mov QWORD PTR[32+r13],r8
+ mov QWORD PTR[40+r13],r10
+ mov r11,rax
+ shl rax,17
+ mov r9,rbx
+ shr r9,47
+ shr r11,47
+ or rax,r9
+ shl rbx,17
+ or rbx,r11
+ mov QWORD PTR[48+r13],rax
+ mov QWORD PTR[56+r13],rbx
+ mov r11,r14
+ shl r14,32
+ mov r9,r15
+ shr r9,32
+ shr r11,32
+ or r14,r9
+ shl r15,32
+ or r15,r11
+ mov QWORD PTR[64+r13],r14
+ mov QWORD PTR[72+r13],r15
+ mov r11,rcx
+ shl rcx,34
+ mov r9,rdx
+ shr r9,30
+ shr r11,30
+ or rcx,r9
+ shl rdx,34
+ or rdx,r11
+ mov QWORD PTR[80+r13],rcx
+ mov QWORD PTR[88+r13],rdx
+ mov r11,r14
+ shl r14,17
+ mov r9,r15
+ shr r9,47
+ shr r11,47
+ or r14,r9
+ shl r15,17
+ or r15,r11
+ mov QWORD PTR[96+r13],r14
+ mov QWORD PTR[104+r13],r15
+ mov r11,rax
+ shl rax,34
+ mov r9,rbx
+ shr r9,30
+ shr r11,30
+ or rax,r9
+ shl rbx,34
+ or rbx,r11
+ mov QWORD PTR[112+r13],rax
+ mov QWORD PTR[120+r13],rbx
+ mov r11,r8
+ shl r8,51
+ mov r9,r10
+ shr r9,13
+ shr r11,13
+ or r8,r9
+ shl r10,51
+ or r10,r11
+ mov QWORD PTR[128+r13],r8
+ mov QWORD PTR[136+r13],r10
+ mov eax,4
+$L$done::
+ mov r15,QWORD PTR[rsp]
+
+ mov r14,QWORD PTR[8+rsp]
+
+ mov r13,QWORD PTR[16+rsp]
+
+ mov rbp,QWORD PTR[24+rsp]
+
+ mov rbx,QWORD PTR[32+rsp]
+
+ lea rsp,QWORD PTR[40+rsp]
+
+$L$key_epilogue::
+ mov rdi,QWORD PTR[8+rsp] ;WIN64 epilogue
+ mov rsi,QWORD PTR[16+rsp]
+ DB 0F3h,0C3h ;repret
+
+$L$SEH_end_Camellia_Ekeygen::
+Camellia_Ekeygen ENDP
+ALIGN 64
+$L$Camellia_SIGMA::
+ DD 03bcc908bh,0a09e667fh,04caa73b2h,0b67ae858h
+ DD 0e94f82beh,0c6ef372fh,0f1d36f1ch,054ff53a5h
+ DD 0de682d1dh,010e527fah,0b3e6c1fdh,0b05688c2h
+ DD 0,0,0,0
+$L$Camellia_SBOX::
+ DD 070707000h,070700070h
+ DD 082828200h,02c2c002ch
+ DD 02c2c2c00h,0b3b300b3h
+ DD 0ececec00h,0c0c000c0h
+ DD 0b3b3b300h,0e4e400e4h
+ DD 027272700h,057570057h
+ DD 0c0c0c000h,0eaea00eah
+ DD 0e5e5e500h,0aeae00aeh
+ DD 0e4e4e400h,023230023h
+ DD 085858500h,06b6b006bh
+ DD 057575700h,045450045h
+ DD 035353500h,0a5a500a5h
+ DD 0eaeaea00h,0eded00edh
+ DD 00c0c0c00h,04f4f004fh
+ DD 0aeaeae00h,01d1d001dh
+ DD 041414100h,092920092h
+ DD 023232300h,086860086h
+ DD 0efefef00h,0afaf00afh
+ DD 06b6b6b00h,07c7c007ch
+ DD 093939300h,01f1f001fh
+ DD 045454500h,03e3e003eh
+ DD 019191900h,0dcdc00dch
+ DD 0a5a5a500h,05e5e005eh
+ DD 021212100h,00b0b000bh
+ DD 0ededed00h,0a6a600a6h
+ DD 00e0e0e00h,039390039h
+ DD 04f4f4f00h,0d5d500d5h
+ DD 04e4e4e00h,05d5d005dh
+ DD 01d1d1d00h,0d9d900d9h
+ DD 065656500h,05a5a005ah
+ DD 092929200h,051510051h
+ DD 0bdbdbd00h,06c6c006ch
+ DD 086868600h,08b8b008bh
+ DD 0b8b8b800h,09a9a009ah
+ DD 0afafaf00h,0fbfb00fbh
+ DD 08f8f8f00h,0b0b000b0h
+ DD 07c7c7c00h,074740074h
+ DD 0ebebeb00h,02b2b002bh
+ DD 01f1f1f00h,0f0f000f0h
+ DD 0cecece00h,084840084h
+ DD 03e3e3e00h,0dfdf00dfh
+ DD 030303000h,0cbcb00cbh
+ DD 0dcdcdc00h,034340034h
+ DD 05f5f5f00h,076760076h
+ DD 05e5e5e00h,06d6d006dh
+ DD 0c5c5c500h,0a9a900a9h
+ DD 00b0b0b00h,0d1d100d1h
+ DD 01a1a1a00h,004040004h
+ DD 0a6a6a600h,014140014h
+ DD 0e1e1e100h,03a3a003ah
+ DD 039393900h,0dede00deh
+ DD 0cacaca00h,011110011h
+ DD 0d5d5d500h,032320032h
+ DD 047474700h,09c9c009ch
+ DD 05d5d5d00h,053530053h
+ DD 03d3d3d00h,0f2f200f2h
+ DD 0d9d9d900h,0fefe00feh
+ DD 001010100h,0cfcf00cfh
+ DD 05a5a5a00h,0c3c300c3h
+ DD 0d6d6d600h,07a7a007ah
+ DD 051515100h,024240024h
+ DD 056565600h,0e8e800e8h
+ DD 06c6c6c00h,060600060h
+ DD 04d4d4d00h,069690069h
+ DD 08b8b8b00h,0aaaa00aah
+ DD 00d0d0d00h,0a0a000a0h
+ DD 09a9a9a00h,0a1a100a1h
+ DD 066666600h,062620062h
+ DD 0fbfbfb00h,054540054h
+ DD 0cccccc00h,01e1e001eh
+ DD 0b0b0b000h,0e0e000e0h
+ DD 02d2d2d00h,064640064h
+ DD 074747400h,010100010h
+ DD 012121200h,000000000h
+ DD 02b2b2b00h,0a3a300a3h
+ DD 020202000h,075750075h
+ DD 0f0f0f000h,08a8a008ah
+ DD 0b1b1b100h,0e6e600e6h
+ DD 084848400h,009090009h
+ DD 099999900h,0dddd00ddh
+ DD 0dfdfdf00h,087870087h
+ DD 04c4c4c00h,083830083h
+ DD 0cbcbcb00h,0cdcd00cdh
+ DD 0c2c2c200h,090900090h
+ DD 034343400h,073730073h
+ DD 07e7e7e00h,0f6f600f6h
+ DD 076767600h,09d9d009dh
+ DD 005050500h,0bfbf00bfh
+ DD 06d6d6d00h,052520052h
+ DD 0b7b7b700h,0d8d800d8h
+ DD 0a9a9a900h,0c8c800c8h
+ DD 031313100h,0c6c600c6h
+ DD 0d1d1d100h,081810081h
+ DD 017171700h,06f6f006fh
+ DD 004040400h,013130013h
+ DD 0d7d7d700h,063630063h
+ DD 014141400h,0e9e900e9h
+ DD 058585800h,0a7a700a7h
+ DD 03a3a3a00h,09f9f009fh
+ DD 061616100h,0bcbc00bch
+ DD 0dedede00h,029290029h
+ DD 01b1b1b00h,0f9f900f9h
+ DD 011111100h,02f2f002fh
+ DD 01c1c1c00h,0b4b400b4h
+ DD 032323200h,078780078h
+ DD 00f0f0f00h,006060006h
+ DD 09c9c9c00h,0e7e700e7h
+ DD 016161600h,071710071h
+ DD 053535300h,0d4d400d4h
+ DD 018181800h,0abab00abh
+ DD 0f2f2f200h,088880088h
+ DD 022222200h,08d8d008dh
+ DD 0fefefe00h,072720072h
+ DD 044444400h,0b9b900b9h
+ DD 0cfcfcf00h,0f8f800f8h
+ DD 0b2b2b200h,0acac00ach
+ DD 0c3c3c300h,036360036h
+ DD 0b5b5b500h,02a2a002ah
+ DD 07a7a7a00h,03c3c003ch
+ DD 091919100h,0f1f100f1h
+ DD 024242400h,040400040h
+ DD 008080800h,0d3d300d3h
+ DD 0e8e8e800h,0bbbb00bbh
+ DD 0a8a8a800h,043430043h
+ DD 060606000h,015150015h
+ DD 0fcfcfc00h,0adad00adh
+ DD 069696900h,077770077h
+ DD 050505000h,080800080h
+ DD 0aaaaaa00h,082820082h
+ DD 0d0d0d000h,0ecec00ech
+ DD 0a0a0a000h,027270027h
+ DD 07d7d7d00h,0e5e500e5h
+ DD 0a1a1a100h,085850085h
+ DD 089898900h,035350035h
+ DD 062626200h,00c0c000ch
+ DD 097979700h,041410041h
+ DD 054545400h,0efef00efh
+ DD 05b5b5b00h,093930093h
+ DD 01e1e1e00h,019190019h
+ DD 095959500h,021210021h
+ DD 0e0e0e000h,00e0e000eh
+ DD 0ffffff00h,04e4e004eh
+ DD 064646400h,065650065h
+ DD 0d2d2d200h,0bdbd00bdh
+ DD 010101000h,0b8b800b8h
+ DD 0c4c4c400h,08f8f008fh
+ DD 000000000h,0ebeb00ebh
+ DD 048484800h,0cece00ceh
+ DD 0a3a3a300h,030300030h
+ DD 0f7f7f700h,05f5f005fh
+ DD 075757500h,0c5c500c5h
+ DD 0dbdbdb00h,01a1a001ah
+ DD 08a8a8a00h,0e1e100e1h
+ DD 003030300h,0caca00cah
+ DD 0e6e6e600h,047470047h
+ DD 0dadada00h,03d3d003dh
+ DD 009090900h,001010001h
+ DD 03f3f3f00h,0d6d600d6h
+ DD 0dddddd00h,056560056h
+ DD 094949400h,04d4d004dh
+ DD 087878700h,00d0d000dh
+ DD 05c5c5c00h,066660066h
+ DD 083838300h,0cccc00cch
+ DD 002020200h,02d2d002dh
+ DD 0cdcdcd00h,012120012h
+ DD 04a4a4a00h,020200020h
+ DD 090909000h,0b1b100b1h
+ DD 033333300h,099990099h
+ DD 073737300h,04c4c004ch
+ DD 067676700h,0c2c200c2h
+ DD 0f6f6f600h,07e7e007eh
+ DD 0f3f3f300h,005050005h
+ DD 09d9d9d00h,0b7b700b7h
+ DD 07f7f7f00h,031310031h
+ DD 0bfbfbf00h,017170017h
+ DD 0e2e2e200h,0d7d700d7h
+ DD 052525200h,058580058h
+ DD 09b9b9b00h,061610061h
+ DD 0d8d8d800h,01b1b001bh
+ DD 026262600h,01c1c001ch
+ DD 0c8c8c800h,00f0f000fh
+ DD 037373700h,016160016h
+ DD 0c6c6c600h,018180018h
+ DD 03b3b3b00h,022220022h
+ DD 081818100h,044440044h
+ DD 096969600h,0b2b200b2h
+ DD 06f6f6f00h,0b5b500b5h
+ DD 04b4b4b00h,091910091h
+ DD 013131300h,008080008h
+ DD 0bebebe00h,0a8a800a8h
+ DD 063636300h,0fcfc00fch
+ DD 02e2e2e00h,050500050h
+ DD 0e9e9e900h,0d0d000d0h
+ DD 079797900h,07d7d007dh
+ DD 0a7a7a700h,089890089h
+ DD 08c8c8c00h,097970097h
+ DD 09f9f9f00h,05b5b005bh
+ DD 06e6e6e00h,095950095h
+ DD 0bcbcbc00h,0ffff00ffh
+ DD 08e8e8e00h,0d2d200d2h
+ DD 029292900h,0c4c400c4h
+ DD 0f5f5f500h,048480048h
+ DD 0f9f9f900h,0f7f700f7h
+ DD 0b6b6b600h,0dbdb00dbh
+ DD 02f2f2f00h,003030003h
+ DD 0fdfdfd00h,0dada00dah
+ DD 0b4b4b400h,03f3f003fh
+ DD 059595900h,094940094h
+ DD 078787800h,05c5c005ch
+ DD 098989800h,002020002h
+ DD 006060600h,04a4a004ah
+ DD 06a6a6a00h,033330033h
+ DD 0e7e7e700h,067670067h
+ DD 046464600h,0f3f300f3h
+ DD 071717100h,07f7f007fh
+ DD 0bababa00h,0e2e200e2h
+ DD 0d4d4d400h,09b9b009bh
+ DD 025252500h,026260026h
+ DD 0ababab00h,037370037h
+ DD 042424200h,03b3b003bh
+ DD 088888800h,096960096h
+ DD 0a2a2a200h,04b4b004bh
+ DD 08d8d8d00h,0bebe00beh
+ DD 0fafafa00h,02e2e002eh
+ DD 072727200h,079790079h
+ DD 007070700h,08c8c008ch
+ DD 0b9b9b900h,06e6e006eh
+ DD 055555500h,08e8e008eh
+ DD 0f8f8f800h,0f5f500f5h
+ DD 0eeeeee00h,0b6b600b6h
+ DD 0acacac00h,0fdfd00fdh
+ DD 00a0a0a00h,059590059h
+ DD 036363600h,098980098h
+ DD 049494900h,06a6a006ah
+ DD 02a2a2a00h,046460046h
+ DD 068686800h,0baba00bah
+ DD 03c3c3c00h,025250025h
+ DD 038383800h,042420042h
+ DD 0f1f1f100h,0a2a200a2h
+ DD 0a4a4a400h,0fafa00fah
+ DD 040404000h,007070007h
+ DD 028282800h,055550055h
+ DD 0d3d3d300h,0eeee00eeh
+ DD 07b7b7b00h,00a0a000ah
+ DD 0bbbbbb00h,049490049h
+ DD 0c9c9c900h,068680068h
+ DD 043434300h,038380038h
+ DD 0c1c1c100h,0a4a400a4h
+ DD 015151500h,028280028h
+ DD 0e3e3e300h,07b7b007bh
+ DD 0adadad00h,0c9c900c9h
+ DD 0f4f4f400h,0c1c100c1h
+ DD 077777700h,0e3e300e3h
+ DD 0c7c7c700h,0f4f400f4h
+ DD 080808000h,0c7c700c7h
+ DD 09e9e9e00h,09e9e009eh
+ DD 000e0e0e0h,038003838h
+ DD 000050505h,041004141h
+ DD 000585858h,016001616h
+ DD 000d9d9d9h,076007676h
+ DD 000676767h,0d900d9d9h
+ DD 0004e4e4eh,093009393h
+ DD 000818181h,060006060h
+ DD 000cbcbcbh,0f200f2f2h
+ DD 000c9c9c9h,072007272h
+ DD 0000b0b0bh,0c200c2c2h
+ DD 000aeaeaeh,0ab00ababh
+ DD 0006a6a6ah,09a009a9ah
+ DD 000d5d5d5h,075007575h
+ DD 000181818h,006000606h
+ DD 0005d5d5dh,057005757h
+ DD 000828282h,0a000a0a0h
+ DD 000464646h,091009191h
+ DD 000dfdfdfh,0f700f7f7h
+ DD 000d6d6d6h,0b500b5b5h
+ DD 000272727h,0c900c9c9h
+ DD 0008a8a8ah,0a200a2a2h
+ DD 000323232h,08c008c8ch
+ DD 0004b4b4bh,0d200d2d2h
+ DD 000424242h,090009090h
+ DD 000dbdbdbh,0f600f6f6h
+ DD 0001c1c1ch,007000707h
+ DD 0009e9e9eh,0a700a7a7h
+ DD 0009c9c9ch,027002727h
+ DD 0003a3a3ah,08e008e8eh
+ DD 000cacacah,0b200b2b2h
+ DD 000252525h,049004949h
+ DD 0007b7b7bh,0de00dedeh
+ DD 0000d0d0dh,043004343h
+ DD 000717171h,05c005c5ch
+ DD 0005f5f5fh,0d700d7d7h
+ DD 0001f1f1fh,0c700c7c7h
+ DD 000f8f8f8h,03e003e3eh
+ DD 000d7d7d7h,0f500f5f5h
+ DD 0003e3e3eh,08f008f8fh
+ DD 0009d9d9dh,067006767h
+ DD 0007c7c7ch,01f001f1fh
+ DD 000606060h,018001818h
+ DD 000b9b9b9h,06e006e6eh
+ DD 000bebebeh,0af00afafh
+ DD 000bcbcbch,02f002f2fh
+ DD 0008b8b8bh,0e200e2e2h
+ DD 000161616h,085008585h
+ DD 000343434h,00d000d0dh
+ DD 0004d4d4dh,053005353h
+ DD 000c3c3c3h,0f000f0f0h
+ DD 000727272h,09c009c9ch
+ DD 000959595h,065006565h
+ DD 000abababh,0ea00eaeah
+ DD 0008e8e8eh,0a300a3a3h
+ DD 000bababah,0ae00aeaeh
+ DD 0007a7a7ah,09e009e9eh
+ DD 000b3b3b3h,0ec00ecech
+ DD 000020202h,080008080h
+ DD 000b4b4b4h,02d002d2dh
+ DD 000adadadh,06b006b6bh
+ DD 000a2a2a2h,0a800a8a8h
+ DD 000acacach,02b002b2bh
+ DD 000d8d8d8h,036003636h
+ DD 0009a9a9ah,0a600a6a6h
+ DD 000171717h,0c500c5c5h
+ DD 0001a1a1ah,086008686h
+ DD 000353535h,04d004d4dh
+ DD 000cccccch,033003333h
+ DD 000f7f7f7h,0fd00fdfdh
+ DD 000999999h,066006666h
+ DD 000616161h,058005858h
+ DD 0005a5a5ah,096009696h
+ DD 000e8e8e8h,03a003a3ah
+ DD 000242424h,009000909h
+ DD 000565656h,095009595h
+ DD 000404040h,010001010h
+ DD 000e1e1e1h,078007878h
+ DD 000636363h,0d800d8d8h
+ DD 000090909h,042004242h
+ DD 000333333h,0cc00cccch
+ DD 000bfbfbfh,0ef00efefh
+ DD 000989898h,026002626h
+ DD 000979797h,0e500e5e5h
+ DD 000858585h,061006161h
+ DD 000686868h,01a001a1ah
+ DD 000fcfcfch,03f003f3fh
+ DD 000ececech,03b003b3bh
+ DD 0000a0a0ah,082008282h
+ DD 000dadadah,0b600b6b6h
+ DD 0006f6f6fh,0db00dbdbh
+ DD 000535353h,0d400d4d4h
+ DD 000626262h,098009898h
+ DD 000a3a3a3h,0e800e8e8h
+ DD 0002e2e2eh,08b008b8bh
+ DD 000080808h,002000202h
+ DD 000afafafh,0eb00ebebh
+ DD 000282828h,00a000a0ah
+ DD 000b0b0b0h,02c002c2ch
+ DD 000747474h,01d001d1dh
+ DD 000c2c2c2h,0b000b0b0h
+ DD 000bdbdbdh,06f006f6fh
+ DD 000363636h,08d008d8dh
+ DD 000222222h,088008888h
+ DD 000383838h,00e000e0eh
+ DD 000646464h,019001919h
+ DD 0001e1e1eh,087008787h
+ DD 000393939h,04e004e4eh
+ DD 0002c2c2ch,00b000b0bh
+ DD 000a6a6a6h,0a900a9a9h
+ DD 000303030h,00c000c0ch
+ DD 000e5e5e5h,079007979h
+ DD 000444444h,011001111h
+ DD 000fdfdfdh,07f007f7fh
+ DD 000888888h,022002222h
+ DD 0009f9f9fh,0e700e7e7h
+ DD 000656565h,059005959h
+ DD 000878787h,0e100e1e1h
+ DD 0006b6b6bh,0da00dadah
+ DD 000f4f4f4h,03d003d3dh
+ DD 000232323h,0c800c8c8h
+ DD 000484848h,012001212h
+ DD 000101010h,004000404h
+ DD 000d1d1d1h,074007474h
+ DD 000515151h,054005454h
+ DD 000c0c0c0h,030003030h
+ DD 000f9f9f9h,07e007e7eh
+ DD 000d2d2d2h,0b400b4b4h
+ DD 000a0a0a0h,028002828h
+ DD 000555555h,055005555h
+ DD 000a1a1a1h,068006868h
+ DD 000414141h,050005050h
+ DD 000fafafah,0be00bebeh
+ DD 000434343h,0d000d0d0h
+ DD 000131313h,0c400c4c4h
+ DD 000c4c4c4h,031003131h
+ DD 0002f2f2fh,0cb00cbcbh
+ DD 000a8a8a8h,02a002a2ah
+ DD 000b6b6b6h,0ad00adadh
+ DD 0003c3c3ch,00f000f0fh
+ DD 0002b2b2bh,0ca00cacah
+ DD 000c1c1c1h,070007070h
+ DD 000ffffffh,0ff00ffffh
+ DD 000c8c8c8h,032003232h
+ DD 000a5a5a5h,069006969h
+ DD 000202020h,008000808h
+ DD 000898989h,062006262h
+ DD 000000000h,000000000h
+ DD 000909090h,024002424h
+ DD 000474747h,0d100d1d1h
+ DD 000efefefh,0fb00fbfbh
+ DD 000eaeaeah,0ba00babah
+ DD 000b7b7b7h,0ed00ededh
+ DD 000151515h,045004545h
+ DD 000060606h,081008181h
+ DD 000cdcdcdh,073007373h
+ DD 000b5b5b5h,06d006d6dh
+ DD 000121212h,084008484h
+ DD 0007e7e7eh,09f009f9fh
+ DD 000bbbbbbh,0ee00eeeeh
+ DD 000292929h,04a004a4ah
+ DD 0000f0f0fh,0c300c3c3h
+ DD 000b8b8b8h,02e002e2eh
+ DD 000070707h,0c100c1c1h
+ DD 000040404h,001000101h
+ DD 0009b9b9bh,0e600e6e6h
+ DD 000949494h,025002525h
+ DD 000212121h,048004848h
+ DD 000666666h,099009999h
+ DD 000e6e6e6h,0b900b9b9h
+ DD 000cececeh,0b300b3b3h
+ DD 000edededh,07b007b7bh
+ DD 000e7e7e7h,0f900f9f9h
+ DD 0003b3b3bh,0ce00ceceh
+ DD 000fefefeh,0bf00bfbfh
+ DD 0007f7f7fh,0df00dfdfh
+ DD 000c5c5c5h,071007171h
+ DD 000a4a4a4h,029002929h
+ DD 000373737h,0cd00cdcdh
+ DD 000b1b1b1h,06c006c6ch
+ DD 0004c4c4ch,013001313h
+ DD 000919191h,064006464h
+ DD 0006e6e6eh,09b009b9bh
+ DD 0008d8d8dh,063006363h
+ DD 000767676h,09d009d9dh
+ DD 000030303h,0c000c0c0h
+ DD 0002d2d2dh,04b004b4bh
+ DD 000dededeh,0b700b7b7h
+ DD 000969696h,0a500a5a5h
+ DD 000262626h,089008989h
+ DD 0007d7d7dh,05f005f5fh
+ DD 000c6c6c6h,0b100b1b1h
+ DD 0005c5c5ch,017001717h
+ DD 000d3d3d3h,0f400f4f4h
+ DD 000f2f2f2h,0bc00bcbch
+ DD 0004f4f4fh,0d300d3d3h
+ DD 000191919h,046004646h
+ DD 0003f3f3fh,0cf00cfcfh
+ DD 000dcdcdch,037003737h
+ DD 000797979h,05e005e5eh
+ DD 0001d1d1dh,047004747h
+ DD 000525252h,094009494h
+ DD 000ebebebh,0fa00fafah
+ DD 000f3f3f3h,0fc00fcfch
+ DD 0006d6d6dh,05b005b5bh
+ DD 0005e5e5eh,097009797h
+ DD 000fbfbfbh,0fe00fefeh
+ DD 000696969h,05a005a5ah
+ DD 000b2b2b2h,0ac00acach
+ DD 000f0f0f0h,03c003c3ch
+ DD 000313131h,04c004c4ch
+ DD 0000c0c0ch,003000303h
+ DD 000d4d4d4h,035003535h
+ DD 000cfcfcfh,0f300f3f3h
+ DD 0008c8c8ch,023002323h
+ DD 000e2e2e2h,0b800b8b8h
+ DD 000757575h,05d005d5dh
+ DD 000a9a9a9h,06a006a6ah
+ DD 0004a4a4ah,092009292h
+ DD 000575757h,0d500d5d5h
+ DD 000848484h,021002121h
+ DD 000111111h,044004444h
+ DD 000454545h,051005151h
+ DD 0001b1b1bh,0c600c6c6h
+ DD 000f5f5f5h,07d007d7dh
+ DD 000e4e4e4h,039003939h
+ DD 0000e0e0eh,083008383h
+ DD 000737373h,0dc00dcdch
+ DD 000aaaaaah,0aa00aaaah
+ DD 000f1f1f1h,07c007c7ch
+ DD 000ddddddh,077007777h
+ DD 000595959h,056005656h
+ DD 000141414h,005000505h
+ DD 0006c6c6ch,01b001b1bh
+ DD 000929292h,0a400a4a4h
+ DD 000545454h,015001515h
+ DD 000d0d0d0h,034003434h
+ DD 000787878h,01e001e1eh
+ DD 000707070h,01c001c1ch
+ DD 000e3e3e3h,0f800f8f8h
+ DD 000494949h,052005252h
+ DD 000808080h,020002020h
+ DD 000505050h,014001414h
+ DD 000a7a7a7h,0e900e9e9h
+ DD 000f6f6f6h,0bd00bdbdh
+ DD 000777777h,0dd00ddddh
+ DD 000939393h,0e400e4e4h
+ DD 000868686h,0a100a1a1h
+ DD 000838383h,0e000e0e0h
+ DD 0002a2a2ah,08a008a8ah
+ DD 000c7c7c7h,0f100f1f1h
+ DD 0005b5b5bh,0d600d6d6h
+ DD 000e9e9e9h,07a007a7ah
+ DD 000eeeeeeh,0bb00bbbbh
+ DD 0008f8f8fh,0e300e3e3h
+ DD 000010101h,040004040h
+ DD 0003d3d3dh,04f004f4fh
+PUBLIC Camellia_cbc_encrypt
+
+ALIGN 16
+Camellia_cbc_encrypt PROC PUBLIC
+ mov QWORD PTR[8+rsp],rdi ;WIN64 prologue
+ mov QWORD PTR[16+rsp],rsi
+ mov rax,rsp
+$L$SEH_begin_Camellia_cbc_encrypt::
+ mov rdi,rcx
+ mov rsi,rdx
+ mov rdx,r8
+ mov rcx,r9
+ mov r8,QWORD PTR[40+rsp]
+ mov r9,QWORD PTR[48+rsp]
+
+
+
+ cmp rdx,0
+ je $L$cbc_abort
+ push rbx
+
+ push rbp
+
+ push r12
+
+ push r13
+
+ push r14
+
+ push r15
+
+$L$cbc_prologue::
+
+ mov rbp,rsp
+
+ sub rsp,64
+ and rsp,-64
+
+
+
+ lea r10,QWORD PTR[((-64-63))+rcx]
+ sub r10,rsp
+ neg r10
+ and r10,03C0h
+ sub rsp,r10
+
+
+ mov r12,rdi
+ mov r13,rsi
+ mov rbx,r8
+ mov r14,rcx
+ mov r15d,DWORD PTR[272+rcx]
+
+ mov QWORD PTR[40+rsp],r8
+ mov QWORD PTR[48+rsp],rbp
+
+
+$L$cbc_body::
+ lea rbp,QWORD PTR[$L$Camellia_SBOX]
+
+ mov ecx,32
+ALIGN 4
+$L$cbc_prefetch_sbox::
+ mov rax,QWORD PTR[rbp]
+ mov rsi,QWORD PTR[32+rbp]
+ mov rdi,QWORD PTR[64+rbp]
+ mov r11,QWORD PTR[96+rbp]
+ lea rbp,QWORD PTR[128+rbp]
+ loop $L$cbc_prefetch_sbox
+ sub rbp,4096
+ shl r15,6
+ mov rcx,rdx
+ lea r15,QWORD PTR[r15*1+r14]
+
+ cmp r9d,0
+ je $L$CBC_DECRYPT
+
+ and rdx,-16
+ and rcx,15
+ lea rdx,QWORD PTR[rdx*1+r12]
+ mov QWORD PTR[rsp],r14
+ mov QWORD PTR[8+rsp],rdx
+ mov QWORD PTR[16+rsp],rcx
+
+ cmp rdx,r12
+ mov r8d,DWORD PTR[rbx]
+ mov r9d,DWORD PTR[4+rbx]
+ mov r10d,DWORD PTR[8+rbx]
+ mov r11d,DWORD PTR[12+rbx]
+ je $L$cbc_enc_tail
+ jmp $L$cbc_eloop
+
+ALIGN 16
+$L$cbc_eloop::
+ xor r8d,DWORD PTR[r12]
+ xor r9d,DWORD PTR[4+r12]
+ xor r10d,DWORD PTR[8+r12]
+ bswap r8d
+ xor r11d,DWORD PTR[12+r12]
+ bswap r9d
+ bswap r10d
+ bswap r11d
+
+ call _x86_64_Camellia_encrypt
+
+ mov r14,QWORD PTR[rsp]
+ bswap r8d
+ mov rdx,QWORD PTR[8+rsp]
+ bswap r9d
+ mov rcx,QWORD PTR[16+rsp]
+ bswap r10d
+ mov DWORD PTR[r13],r8d
+ bswap r11d
+ mov DWORD PTR[4+r13],r9d
+ mov DWORD PTR[8+r13],r10d
+ lea r12,QWORD PTR[16+r12]
+ mov DWORD PTR[12+r13],r11d
+ cmp r12,rdx
+ lea r13,QWORD PTR[16+r13]
+ jne $L$cbc_eloop
+
+ cmp rcx,0
+ jne $L$cbc_enc_tail
+
+ mov r13,QWORD PTR[40+rsp]
+ mov DWORD PTR[r13],r8d
+ mov DWORD PTR[4+r13],r9d
+ mov DWORD PTR[8+r13],r10d
+ mov DWORD PTR[12+r13],r11d
+ jmp $L$cbc_done
+
+ALIGN 16
+$L$cbc_enc_tail::
+ xor rax,rax
+ mov QWORD PTR[((0+24))+rsp],rax
+ mov QWORD PTR[((8+24))+rsp],rax
+ mov QWORD PTR[16+rsp],rax
+
+$L$cbc_enc_pushf::
+ pushfq
+ cld
+ mov rsi,r12
+ lea rdi,QWORD PTR[((8+24))+rsp]
+ DD 09066A4F3h
+ popfq
+$L$cbc_enc_popf::
+
+ lea r12,QWORD PTR[24+rsp]
+ lea rax,QWORD PTR[((16+24))+rsp]
+ mov QWORD PTR[8+rsp],rax
+ jmp $L$cbc_eloop
+
+ALIGN 16
+$L$CBC_DECRYPT::
+ xchg r15,r14
+ add rdx,15
+ and rcx,15
+ and rdx,-16
+ mov QWORD PTR[rsp],r14
+ lea rdx,QWORD PTR[rdx*1+r12]
+ mov QWORD PTR[8+rsp],rdx
+ mov QWORD PTR[16+rsp],rcx
+
+ mov rax,QWORD PTR[rbx]
+ mov rbx,QWORD PTR[8+rbx]
+ jmp $L$cbc_dloop
+ALIGN 16
+$L$cbc_dloop::
+ mov r8d,DWORD PTR[r12]
+ mov r9d,DWORD PTR[4+r12]
+ mov r10d,DWORD PTR[8+r12]
+ bswap r8d
+ mov r11d,DWORD PTR[12+r12]
+ bswap r9d
+ mov QWORD PTR[((0+24))+rsp],rax
+ bswap r10d
+ mov QWORD PTR[((8+24))+rsp],rbx
+ bswap r11d
+
+ call _x86_64_Camellia_decrypt
+
+ mov r14,QWORD PTR[rsp]
+ mov rdx,QWORD PTR[8+rsp]
+ mov rcx,QWORD PTR[16+rsp]
+
+ bswap r8d
+ mov rax,QWORD PTR[r12]
+ bswap r9d
+ mov rbx,QWORD PTR[8+r12]
+ bswap r10d
+ xor r8d,DWORD PTR[((0+24))+rsp]
+ bswap r11d
+ xor r9d,DWORD PTR[((4+24))+rsp]
+ xor r10d,DWORD PTR[((8+24))+rsp]
+ lea r12,QWORD PTR[16+r12]
+ xor r11d,DWORD PTR[((12+24))+rsp]
+ cmp r12,rdx
+ je $L$cbc_ddone
+
+ mov DWORD PTR[r13],r8d
+ mov DWORD PTR[4+r13],r9d
+ mov DWORD PTR[8+r13],r10d
+ mov DWORD PTR[12+r13],r11d
+
+ lea r13,QWORD PTR[16+r13]
+ jmp $L$cbc_dloop
+
+ALIGN 16
+$L$cbc_ddone::
+ mov rdx,QWORD PTR[40+rsp]
+ cmp rcx,0
+ jne $L$cbc_dec_tail
+
+ mov DWORD PTR[r13],r8d
+ mov DWORD PTR[4+r13],r9d
+ mov DWORD PTR[8+r13],r10d
+ mov DWORD PTR[12+r13],r11d
+
+ mov QWORD PTR[rdx],rax
+ mov QWORD PTR[8+rdx],rbx
+ jmp $L$cbc_done
+ALIGN 16
+$L$cbc_dec_tail::
+ mov DWORD PTR[((0+24))+rsp],r8d
+ mov DWORD PTR[((4+24))+rsp],r9d
+ mov DWORD PTR[((8+24))+rsp],r10d
+ mov DWORD PTR[((12+24))+rsp],r11d
+
+$L$cbc_dec_pushf::
+ pushfq
+ cld
+ lea rsi,QWORD PTR[((8+24))+rsp]
+ lea rdi,QWORD PTR[r13]
+ DD 09066A4F3h
+ popfq
+$L$cbc_dec_popf::
+
+ mov QWORD PTR[rdx],rax
+ mov QWORD PTR[8+rdx],rbx
+ jmp $L$cbc_done
+
+ALIGN 16
+$L$cbc_done::
+ mov rcx,QWORD PTR[48+rsp]
+
+ mov r15,QWORD PTR[rcx]
+
+ mov r14,QWORD PTR[8+rcx]
+
+ mov r13,QWORD PTR[16+rcx]
+
+ mov r12,QWORD PTR[24+rcx]
+
+ mov rbp,QWORD PTR[32+rcx]
+
+ mov rbx,QWORD PTR[40+rcx]
+
+ lea rsp,QWORD PTR[48+rcx]
+
+$L$cbc_abort::
+ mov rdi,QWORD PTR[8+rsp] ;WIN64 epilogue
+ mov rsi,QWORD PTR[16+rsp]
+ DB 0F3h,0C3h ;repret
+
+$L$SEH_end_Camellia_cbc_encrypt::
+Camellia_cbc_encrypt ENDP
+
+DB 67,97,109,101,108,108,105,97,32,102,111,114,32,120,56,54
+DB 95,54,52,32,98,121,32,60,97,112,112,114,111,64,111,112
+DB 101,110,115,115,108,46,111,114,103,62,0
+EXTERN __imp_RtlVirtualUnwind:NEAR
+
+ALIGN 16
+common_se_handler PROC PRIVATE
+ push rsi
+ push rdi
+ push rbx
+ push rbp
+ push r12
+ push r13
+ push r14
+ push r15
+ pushfq
+ lea rsp,QWORD PTR[((-64))+rsp]
+
+ mov rax,QWORD PTR[120+r8]
+ mov rbx,QWORD PTR[248+r8]
+
+ mov rsi,QWORD PTR[8+r9]
+ mov r11,QWORD PTR[56+r9]
+
+ mov r10d,DWORD PTR[r11]
+ lea r10,QWORD PTR[r10*1+rsi]
+ cmp rbx,r10
+ jb $L$in_prologue
+
+ mov rax,QWORD PTR[152+r8]
+
+ mov r10d,DWORD PTR[4+r11]
+ lea r10,QWORD PTR[r10*1+rsi]
+ cmp rbx,r10
+ jae $L$in_prologue
+
+ lea rax,QWORD PTR[40+rax]
+ mov rbx,QWORD PTR[((-8))+rax]
+ mov rbp,QWORD PTR[((-16))+rax]
+ mov r13,QWORD PTR[((-24))+rax]
+ mov r14,QWORD PTR[((-32))+rax]
+ mov r15,QWORD PTR[((-40))+rax]
+ mov QWORD PTR[144+r8],rbx
+ mov QWORD PTR[160+r8],rbp
+ mov QWORD PTR[224+r8],r13
+ mov QWORD PTR[232+r8],r14
+ mov QWORD PTR[240+r8],r15
+
+$L$in_prologue::
+ mov rdi,QWORD PTR[8+rax]
+ mov rsi,QWORD PTR[16+rax]
+ mov QWORD PTR[152+r8],rax
+ mov QWORD PTR[168+r8],rsi
+ mov QWORD PTR[176+r8],rdi
+
+ jmp $L$common_seh_exit
+common_se_handler ENDP
+
+
+ALIGN 16
+cbc_se_handler PROC PRIVATE
+ push rsi
+ push rdi
+ push rbx
+ push rbp
+ push r12
+ push r13
+ push r14
+ push r15
+ pushfq
+ lea rsp,QWORD PTR[((-64))+rsp]
+
+ mov rax,QWORD PTR[120+r8]
+ mov rbx,QWORD PTR[248+r8]
+
+ lea r10,QWORD PTR[$L$cbc_prologue]
+ cmp rbx,r10
+ jb $L$in_cbc_prologue
+
+ lea r10,QWORD PTR[$L$cbc_body]
+ cmp rbx,r10
+ jb $L$in_cbc_frame_setup
+
+ mov rax,QWORD PTR[152+r8]
+
+ lea r10,QWORD PTR[$L$cbc_abort]
+ cmp rbx,r10
+ jae $L$in_cbc_prologue
+
+
+ lea r10,QWORD PTR[$L$cbc_enc_pushf]
+ cmp rbx,r10
+ jbe $L$in_cbc_no_flag
+ lea rax,QWORD PTR[8+rax]
+ lea r10,QWORD PTR[$L$cbc_enc_popf]
+ cmp rbx,r10
+ jb $L$in_cbc_no_flag
+ lea rax,QWORD PTR[((-8))+rax]
+ lea r10,QWORD PTR[$L$cbc_dec_pushf]
+ cmp rbx,r10
+ jbe $L$in_cbc_no_flag
+ lea rax,QWORD PTR[8+rax]
+ lea r10,QWORD PTR[$L$cbc_dec_popf]
+ cmp rbx,r10
+ jb $L$in_cbc_no_flag
+ lea rax,QWORD PTR[((-8))+rax]
+
+$L$in_cbc_no_flag::
+ mov rax,QWORD PTR[48+rax]
+ lea rax,QWORD PTR[48+rax]
+
+$L$in_cbc_frame_setup::
+ mov rbx,QWORD PTR[((-8))+rax]
+ mov rbp,QWORD PTR[((-16))+rax]
+ mov r12,QWORD PTR[((-24))+rax]
+ mov r13,QWORD PTR[((-32))+rax]
+ mov r14,QWORD PTR[((-40))+rax]
+ mov r15,QWORD PTR[((-48))+rax]
+ mov QWORD PTR[144+r8],rbx
+ mov QWORD PTR[160+r8],rbp
+ mov QWORD PTR[216+r8],r12
+ mov QWORD PTR[224+r8],r13
+ mov QWORD PTR[232+r8],r14
+ mov QWORD PTR[240+r8],r15
+
+$L$in_cbc_prologue::
+ mov rdi,QWORD PTR[8+rax]
+ mov rsi,QWORD PTR[16+rax]
+ mov QWORD PTR[152+r8],rax
+ mov QWORD PTR[168+r8],rsi
+ mov QWORD PTR[176+r8],rdi
+
+ALIGN 4
+$L$common_seh_exit::
+
+ mov rdi,QWORD PTR[40+r9]
+ mov rsi,r8
+ mov ecx,154
+ DD 0a548f3fch
+
+ mov rsi,r9
+ xor rcx,rcx
+ mov rdx,QWORD PTR[8+rsi]
+ mov r8,QWORD PTR[rsi]
+ mov r9,QWORD PTR[16+rsi]
+ mov r10,QWORD PTR[40+rsi]
+ lea r11,QWORD PTR[56+rsi]
+ lea r12,QWORD PTR[24+rsi]
+ mov QWORD PTR[32+rsp],r10
+ mov QWORD PTR[40+rsp],r11
+ mov QWORD PTR[48+rsp],r12
+ mov QWORD PTR[56+rsp],rcx
+ call QWORD PTR[__imp_RtlVirtualUnwind]
+
+ mov eax,1
+ lea rsp,QWORD PTR[64+rsp]
+ popfq
+ pop r15
+ pop r14
+ pop r13
+ pop r12
+ pop rbp
+ pop rbx
+ pop rdi
+ pop rsi
+ DB 0F3h,0C3h ;repret
+cbc_se_handler ENDP
+
+.text$ ENDS
+.pdata SEGMENT READONLY ALIGN(4)
+ALIGN 4
+ DD imagerel $L$SEH_begin_Camellia_EncryptBlock_Rounds
+ DD imagerel $L$SEH_end_Camellia_EncryptBlock_Rounds
+ DD imagerel $L$SEH_info_Camellia_EncryptBlock_Rounds
+
+ DD imagerel $L$SEH_begin_Camellia_DecryptBlock_Rounds
+ DD imagerel $L$SEH_end_Camellia_DecryptBlock_Rounds
+ DD imagerel $L$SEH_info_Camellia_DecryptBlock_Rounds
+
+ DD imagerel $L$SEH_begin_Camellia_Ekeygen
+ DD imagerel $L$SEH_end_Camellia_Ekeygen
+ DD imagerel $L$SEH_info_Camellia_Ekeygen
+
+ DD imagerel $L$SEH_begin_Camellia_cbc_encrypt
+ DD imagerel $L$SEH_end_Camellia_cbc_encrypt
+ DD imagerel $L$SEH_info_Camellia_cbc_encrypt
+
+.pdata ENDS
+.xdata SEGMENT READONLY ALIGN(8)
+ALIGN 8
+$L$SEH_info_Camellia_EncryptBlock_Rounds::
+DB 9,0,0,0
+ DD imagerel common_se_handler
+ DD imagerel $L$enc_prologue,imagerel $L$enc_epilogue
+$L$SEH_info_Camellia_DecryptBlock_Rounds::
+DB 9,0,0,0
+ DD imagerel common_se_handler
+ DD imagerel $L$dec_prologue,imagerel $L$dec_epilogue
+$L$SEH_info_Camellia_Ekeygen::
+DB 9,0,0,0
+ DD imagerel common_se_handler
+ DD imagerel $L$key_prologue,imagerel $L$key_epilogue
+$L$SEH_info_Camellia_cbc_encrypt::
+DB 9,0,0,0
+ DD imagerel cbc_se_handler
+
+.xdata ENDS
+END