Function at 0x6740d0
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0xb8
mov qword [rsp + 0x108], rdx
mov rbx, r9
mov r12, rcx
mov qword [rsp + 0x110], r8
call sym.EC_KEY_get0_group
mov rcx, rax
mov r14, rax
call sym.ec_field_size
mov rcx, qword [rsp + 0x108]
mov qword [rsp + 0x60], rax
mov rdi, rax
call sym.EVP_MD_get_size
mov rcx, r12
mov esi, eax
call sym.ossl_ec_key_get_libctx
mov rcx, r12
mov qword [rsp + 0x58], rax
call sym.ossl_ec_key_get0_propq
mov qword [rsp + 0x68], rax
test rdi, rdi
je 0x674370
test esi, esi
jle 0x674370
mov rax, qword [rsp + 0x128]
mov rcx, qword [rsp + 0x120]
mov edx, 0xff
mov r8, qword [rax]
call sym.memset
lea rdx, [rsp + 0x110]
lea r9, [0x007cad00]
xor ecx, ecx
mov r8d, ebx
call sym.ASN1_item_d2i
mov r13, rax
test rax, rax
je 0x674800
mov rax, qword [rax + 0x10]
cmp dword [rax], esi
jne 0x674470
mov rdx, qword [r13 + 0x18]
mov rdi, qword [rsp + 0x128]
movsxd rbx, dword [rdx]
mov dword [rsp + 0x7c], ebx
mov qword [rsp + 0x70], rbx
cmp qword [rdi], rbx
jb 0x674428
mov rdi, qword [rdx + 8]
mov rax, qword [rax + 8]
mov rcx, qword [rsp + 0x58]
mov qword [rsp + 0x88], rdi
mov qword [rsp + 0x90], rax
call sym.BN_CTX_new_ex
mov r15, rax
test rax, rax
je 0x674830
mov rcx, rax
call sym.BN_CTX_start
mov rcx, r15
call sym.BN_CTX_get
mov rcx, r15
mov qword [rsp + 0x98], rax
call sym.BN_CTX_get
mov rbx, rax
test rax, rax
je 0x674870
mov rcx, qword [rsp + 0x70]
mov r8d, 0x14f
lea rdx, str..._openssl_3.1.1_crypto_sm2_sm2_crypt.c
call sym.CRYPTO_zalloc
mov r8d, 0x150
lea rdx, str..._openssl_3.1.1_crypto_sm2_sm2_crypt.c
mov qword [rsp + 0x80], rax
mov rax, qword [rsp + 0x60]
add rax, rax
mov rcx, rax
mov qword [rsp + 0xa0], rax
call sym.CRYPTO_zalloc
lea rdx, str..._openssl_3.1.1_crypto_sm2_sm2_crypt.c
mov r8d, 0x151
mov rdi, rax
movsxd rax, esi
mov rcx, rax
mov qword [rsp + 0xa8], rax
call sym.CRYPTO_zalloc
mov r10, qword [rsp + 0x80]
mov rbp, rax
test r10, r10
sete dl
test rdi, rdi
sete al
or dl, al
jne 0x6749e0
test rbp, rbp
je 0x6749e0
mov rcx, r14
mov qword [rsp + 0x80], r10
call sym.EC_POINT_new
mov r10, qword [rsp + 0x80]
test rax, rax
mov rsi, rax
je 0x6748b0
mov r9, qword [r13 + 8]
mov qword [rsp + 0x20], r15
mov rdx, rax
mov rcx, r14
mov r8, qword [r13]
mov qword [rsp + 0x80], r10
call sym.EC_POINT_set_affine_coordinates
mov r10, qword [rsp + 0x80]
test eax, eax
je 0x67432e
mov rcx, r12
mov qword [rsp + 0x80], r10
call sym.EC_KEY_get0_private_key
mov qword [rsp + 0x28], r15
xor r8d, r8d
mov r9, rsi
mov qword [rsp + 0x20], rax
mov rdx, rsi
mov rcx, r14
call sym.EC_POINT_mul
mov r10, qword [rsp + 0x80]
test eax, eax
jne 0x6744a0
mov qword [rsp + 0x58], r10
xor ebx, ebx
call sym.ERR_new
lea r8, str.ossl_sm2_decrypt
mov edx, 0x163
lea rcx, str..._openssl_3.1.1_crypto_sm2_sm2_crypt.c
call sym.ERR_set_debug
xor r8d, r8d
mov edx, 0x80010
mov ecx, 0x35
call sym.ERR_set_error
mov r10, qword [rsp + 0x58]
jmp 0x674381
xor ebx, ebx
xor r10d, r10d
xor ebp, ebp
xor edi, edi
xor r13d, r13d
xor esi, esi
xor r15d, r15d
mov rax, qword [rsp + 0x128]
xor edx, edx
mov qword [rsp + 0x58], r10
xor r12d, r12d
mov rcx, qword [rsp + 0x120]
mov r8, qword [rax]
call sym.memset
mov r10, qword [rsp + 0x58]
mov rcx, r10
mov r8d, 0x18d
lea rdx, str..._openssl_3.1.1_crypto_sm2_sm2_crypt.c
call sym.CRYPTO_free
mov rcx, rdi
mov r8d, 0x18e
lea rdx, str..._openssl_3.1.1_crypto_sm2_sm2_crypt.c
call sym.CRYPTO_free
mov r8d, 0x18f
lea rdx, str..._openssl_3.1.1_crypto_sm2_sm2_crypt.c
mov rcx, rbp
call sym.CRYPTO_free
mov rcx, rsi
call sym.EC_POINT_free
mov rcx, r15
call sym.BN_CTX_free
lea rdx, [0x007cad00]
mov rcx, r13
call sym.ASN1_item_free
mov rcx, rbx
call sym.EVP_MD_CTX_free
mov eax, r12d
add rsp, 0xb8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
call sym.ERR_new
lea r8, str.ossl_sm2_decrypt
mov edx, 0x13c
lea rcx, str..._openssl_3.1.1_crypto_sm2_sm2_crypt.c
call sym.ERR_set_debug
xor r8d, r8d
mov edx, 0x6b
mov ecx, 0x35
xor ebx, ebx
xor ebp, ebp
xor edi, edi
call sym.ERR_set_error
xor esi, esi
xor r10d, r10d
xor r15d, r15d
jmp 0x674381
call sym.ERR_new
lea r8, str.ossl_sm2_decrypt
mov edx, 0x134
lea rcx, str..._openssl_3.1.1_crypto_sm2_sm2_crypt.c
call sym.ERR_set_debug
xor r8d, r8d
mov edx, 0x68
jmp 0x67444d
mov qword [rsp + 0x20], r15
mov r9, rbx
mov rdx, rsi
mov rcx, r14
mov r12, qword [rsp + 0x98]
mov r8, r12
call sym.EC_POINT_get_affine_coordinates
mov r10, qword [rsp + 0x80]
test eax, eax
je 0x67432e
mov r14, qword [rsp + 0x60]
mov rdx, rdi
mov rcx, r12
mov r8d, r14d
call sym.BN_bn2binpad
mov r10, qword [rsp + 0x80]
test eax, eax
js 0x6748f0
lea r12, [rdi + r14]
mov r8d, r14d
mov rcx, rbx
mov rdx, r12
call sym.BN_bn2binpad
mov r10, qword [rsp + 0x80]
test eax, eax
js 0x6748f0
mov rax, qword [rsp + 0x68]
mov rdx, qword [rsp + 0x70]
mov rcx, r10
mov r8, rdi
mov qword [rsp + 0x28], 0
mov r9, qword [rsp + 0xa0]
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0x58]
mov qword [rsp + 0x20], 0
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x108]
mov qword [rsp + 0x58], r10
mov qword [rsp + 0x30], rax
call sym.ossl_ecdh_kdf_X9_63
mov r10, qword [rsp + 0x58]
test eax, eax
je 0x6748f0
mov eax, dword [rsp + 0x7c]
test eax, eax
je 0x6746fd
mov r11, qword [rsp + 0x88]
mov rax, qword [rsp + 0x120]
mov ebx, dword [rsp + 0x7c]
lea rdx, [r11 + 1]
sub rax, rdx
mov r8d, ebx
lea ecx, [rbx - 1]
cmp rax, 0xe
jbe 0x6749a7
cmp ecx, 6
jbe 0x6749a7
cmp ecx, 0xe
jbe 0x6749d7
shr ebx, 4
xor eax, eax
mov r8, r11
mov edx, ebx
shl rdx, 4
nop word [rax + rax]
movdqu xmm2, xmmword [r8 + rax]
movdqu xmm0, xmmword [r10 + rax]
mov rbx, qword [rsp + 0x120]
pxor xmm0, xmm2
movups xmmword [rbx + rax], xmm0
add rax, 0x10
cmp rax, rdx
jne 0x6745d0
mov ebx, dword [rsp + 0x7c]
mov eax, ebx
and eax, 0xfffffff0
mov edx, eax
cmp ebx, eax
je 0x6746fd
sub ebx, eax
sub ecx, eax
mov r8d, ebx
cmp ecx, 6
jbe 0x674649
mov rbx, qword [rsp + 0x88]
movq xmm1, qword [r10 + rax]
movq xmm0, qword [rbx + rax]
mov rbx, qword [rsp + 0x120]
pxor xmm0, xmm1
movq qword [rbx + rax], xmm0
mov eax, r8d
and eax, 0xfffffff8
add edx, eax
cmp eax, r8d
je 0x6746fd
mov rbx, qword [rsp + 0x88]
movsxd rax, edx
mov r11, qword [rsp + 0x120]
movzx ecx, byte [rbx + rax]
xor cl, byte [r10 + rax]
mov byte [r11 + rax], cl
mov r11d, dword [rsp + 0x7c]
lea eax, [rdx + 1]
cmp r11d, eax
je 0x6746fd
cdqe
mov r14, qword [rsp + 0x120]
movzx ecx, byte [r10 + rax]
xor cl, byte [rbx + rax]
mov byte [r14 + rax], cl
lea eax, [rdx + 2]
cmp r11d, eax
je 0x6746fd
cdqe
movzx ecx, byte [r10 + rax]
xor cl, byte [rbx + rax]
mov byte [r14 + rax], cl
lea eax, [rdx + 3]
cmp r11d, eax
je 0x6746fd
cdqe
movzx ecx, byte [r10 + rax]
xor cl, byte [rbx + rax]
mov byte [r14 + rax], cl
lea eax, [rdx + 4]
cmp r11d, eax
je 0x6746fd
cdqe
movzx ecx, byte [r10 + rax]
xor cl, byte [rbx + rax]
mov byte [r14 + rax], cl
lea eax, [rdx + 5]
cmp eax, r11d
je 0x6746fd
cdqe
movzx ecx, byte [rbx + rax]
xor cl, byte [r10 + rax]
mov byte [r14 + rax], cl
lea eax, [rdx + 6]
cmp r11d, eax
je 0x6746fd
cdqe
movzx edx, byte [r10 + rax]
xor dl, byte [rbx + rax]
mov byte [r14 + rax], dl
mov qword [rsp + 0x58], r10
call sym.EVP_MD_CTX_new
mov r10, qword [rsp + 0x58]
test rax, rax
mov rbx, rax
je 0x67496e
mov rdx, qword [rsp + 0x108]
mov rcx, rax
mov qword [rsp + 0x58], r10
call sym.EVP_DigestInit
mov r10, qword [rsp + 0x58]
test eax, eax
je 0x674930
mov r14, qword [rsp + 0x60]
mov rdx, rdi
mov rcx, rbx
mov qword [rsp + 0x58], r10
mov r8, r14
call sym.EVP_DigestUpdate
mov r10, qword [rsp + 0x58]
test eax, eax
je 0x674930
mov r8, qword [rsp + 0x70]
mov rdx, qword [rsp + 0x120]
mov rcx, rbx
call sym.EVP_DigestUpdate
mov r10, qword [rsp + 0x58]
test eax, eax
je 0x674930
mov r8, r14
mov rdx, r12
mov rcx, rbx
call sym.EVP_DigestUpdate
mov r10, qword [rsp + 0x58]
test eax, eax
je 0x674930
xor r8d, r8d
mov rdx, rbp
mov rcx, rbx
call sym.EVP_DigestFinal
mov r10, qword [rsp + 0x58]
test eax, eax
je 0x674930
mov r8, qword [rsp + 0xa8]
mov rdx, qword [rsp + 0x90]
mov rcx, rbp
call sym.CRYPTO_memcmp
mov r10, qword [rsp + 0x58]
test eax, eax
jne 0x674a22
mov rax, qword [rsp + 0x128]
mov rdx, qword [rsp + 0x70]
mov r12d, 1
mov qword [rax], rdx
jmp 0x6743a8
call sym.ERR_new
lea r8, str.ossl_sm2_decrypt
mov edx, 0x12f
lea rcx, str..._openssl_3.1.1_crypto_sm2_sm2_crypt.c
call sym.ERR_set_debug
xor r8d, r8d
mov edx, 0x64
jmp 0x67444d
call sym.ERR_new
lea r8, str.ossl_sm2_decrypt
xor ebx, ebx
xor ebp, ebp
mov edx, 0x142
lea rcx, str..._openssl_3.1.1_crypto_sm2_sm2_crypt.c
xor edi, edi
xor esi, esi
call sym.ERR_set_debug
xor r8d, r8d
mov edx, 0xc0100
mov ecx, 0x35
call sym.ERR_set_error
xor r10d, r10d
jmp 0x674381
call sym.ERR_new
lea r8, str.ossl_sm2_decrypt
xor ebp, ebp
xor edi, edi
mov edx, 0x14b
lea rcx, str..._openssl_3.1.1_crypto_sm2_sm2_crypt.c
xor esi, esi
call sym.ERR_set_debug
xor r8d, r8d
mov edx, 0x80003
mov ecx, 0x35
call sym.ERR_set_error
xor r10d, r10d
jmp 0x674381
mov qword [rsp + 0x58], r10
xor ebx, ebx
call sym.ERR_new
lea r8, str.ossl_sm2_decrypt
mov edx, 0x15a
lea rcx, str..._openssl_3.1.1_crypto_sm2_sm2_crypt.c
call sym.ERR_set_debug
xor r8d, r8d
mov edx, 0xc0100
mov ecx, 0x35
call sym.ERR_set_error
mov r10, qword [rsp + 0x58]
jmp 0x674381
mov qword [rsp + 0x58], r10
xor ebx, ebx
call sym.ERR_new
lea r8, str.ossl_sm2_decrypt
mov edx, 0x16b
lea rcx, str..._openssl_3.1.1_crypto_sm2_sm2_crypt.c
call sym.ERR_set_debug
xor r8d, r8d
mov edx, 0xc0103
mov ecx, 0x35
call sym.ERR_set_error
mov r10, qword [rsp + 0x58]
jmp 0x674381
mov qword [rsp + 0x58], r10
call sym.ERR_new
lea r8, str.ossl_sm2_decrypt
mov edx, 0x17d
lea rcx, str..._openssl_3.1.1_crypto_sm2_sm2_crypt.c
call sym.ERR_set_debug
xor r8d, r8d
mov edx, 0x80006
mov ecx, 0x35
call sym.ERR_set_error
mov r10, qword [rsp + 0x58]
jmp 0x674381
call sym.ERR_new
lea r8, str.ossl_sm2_decrypt
mov edx, 0x174
lea rcx, str..._openssl_3.1.1_crypto_sm2_sm2_crypt.c
call sym.ERR_set_debug
xor r8d, r8d
mov edx, 0xc0100
mov ecx, 0x35
call sym.ERR_set_error
mov r10, qword [rsp + 0x58]
jmp 0x674381
mov eax, dword [rsp + 0x7c]
mov r8, qword [rsp + 0x88]
xor edx, edx
mov rbx, qword [rsp + 0x120]
movzx ecx, byte [r10 + rdx]
xor cl, byte [r8 + rdx]
mov byte [rbx + rdx], cl
add rdx, 1
cmp rdx, rax
jne 0x6749b5
jmp 0x6746fd
xor edx, edx
xor eax, eax
jmp 0x674614
mov qword [rsp + 0x58], r10
xor ebx, ebx
xor esi, esi
call sym.ERR_new
lea r8, str.ossl_sm2_decrypt
mov edx, 0x154
lea rcx, str..._openssl_3.1.1_crypto_sm2_sm2_crypt.c
call sym.ERR_set_debug
xor r8d, r8d
mov edx, 0xc0100
mov ecx, 0x35
call sym.ERR_set_error
mov r10, qword [rsp + 0x58]
jmp 0x674381
call sym.ERR_new
lea r8, str.ossl_sm2_decrypt
mov edx, 0x182
lea rcx, str..._openssl_3.1.1_crypto_sm2_sm2_crypt.c
call sym.ERR_set_debug
xor r8d, r8d
mov edx, 0x66
mov ecx, 0x35
call sym.ERR_set_error
mov r10, qword [rsp + 0x58]
jmp 0x674381