Function at 0x673710
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0xd8
mov r13, rcx
mov qword [rsp + 0x128], rdx
mov qword [rsp + 0x130], r8
mov qword [rsp + 0x138], r9
call sym.EVP_MD_CTX_new
mov rcx, r13
mov r14, rax
call sym.EC_KEY_get0_group
mov rcx, rax
mov r12, rax
call sym.EC_GROUP_get0_order
mov rcx, r13
mov rbx, rax
call sym.EC_KEY_get0_public_key
mov rcx, qword [rsp + 0x128]
mov qword [rsp + 0x70], rax
call sym.EVP_MD_get_size
mov rcx, r13
mov dword [rsp + 0x6c], eax
mov edi, eax
call sym.ossl_ec_key_get_libctx
mov rcx, r13
mov qword [rsp + 0x60], rax
call sym.ossl_ec_key_get0_propq
pxor xmm0, xmm0
mov qword [rsp + 0x78], rax
movaps xmmword [rsp + 0xc0], xmm0
test r14, r14
je 0x673a70
test edi, edi
jle 0x673a70
mov rcx, r12
call sym.ec_field_size
mov qword [rsp + 0x80], rax
test rax, rax
je 0x673988
mov rcx, r12
call sym.EC_POINT_new
mov rcx, r12
mov r15, rax
call sym.EC_POINT_new
mov rcx, qword [rsp + 0x60]
mov rbp, rax
call sym.BN_CTX_new_ex
test r15, r15
sete dl
test rbp, rbp
mov r13, rax
sete al
or dl, al
jne 0x673a90
test r13, r13
je 0x673a90
mov rcx, r13
call sym.BN_CTX_start
mov rcx, r13
call sym.BN_CTX_get
mov rcx, r13
mov qword [rsp + 0x88], rax
call sym.BN_CTX_get
mov rcx, r13
mov qword [rsp + 0x90], rax
call sym.BN_CTX_get
mov rcx, r13
mov qword [rsp + 0xa0], rax
call sym.BN_CTX_get
mov rcx, r13
mov qword [rsp + 0x98], rax
call sym.BN_CTX_get
mov rsi, rax
test rax, rax
je 0x673b20
mov rax, qword [rsp + 0x80]
mov r8d, 0xac
lea rdx, str..._openssl_3.1.1_crypto_sm2_sm2_crypt.c
add rax, rax
mov rcx, rax
mov qword [rsp + 0xa8], rax
call sym.CRYPTO_zalloc
movsxd rcx, dword [rsp + 0x6c]
mov r8d, 0xad
lea rdx, str..._openssl_3.1.1_crypto_sm2_sm2_crypt.c
mov rdi, rax
call sym.CRYPTO_zalloc
mov qword [rsp + 0x58], rax
test rdi, rdi
je 0x674004
test rax, rax
je 0x674004
mov rax, qword [rsp + 0x148]
mov rcx, qword [rsp + 0x140]
xor edx, edx
mov r8, qword [rax]
call sym.memset
mov rdx, rbx
mov r9, r13
xor r8d, r8d
mov rcx, qword [rsp + 0x88]
call sym.BN_priv_rand_range_ex
mov ebx, eax
test eax, eax
je 0x673ae0
mov qword [rsp + 0x28], r13
xor r9d, r9d
mov rdx, r15
mov rcx, r12
mov qword [rsp + 0x20], 0
mov r8, qword [rsp + 0x88]
call sym.EC_POINT_mul
test eax, eax
je 0x67394b
mov qword [rsp + 0x20], r13
mov r9, qword [rsp + 0x98]
mov rdx, r15
mov rcx, r12
mov r8, qword [rsp + 0x90]
call sym.EC_POINT_get_affine_coordinates
test eax, eax
jne 0x673b68
call sym.ERR_new
lea r8, str.ossl_sm2_encrypt
mov edx, 0xbf
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
xor r12d, r12d
xor esi, esi
xor ebx, ebx
call sym.ERR_set_error
jmp 0x6739d1
call sym.ERR_new
lea r8, str.ossl_sm2_encrypt
mov edx, 0x94
lea rcx, str..._openssl_3.1.1_crypto_sm2_sm2_crypt.c
xor r12d, r12d
xor edi, edi
xor esi, esi
call sym.ERR_set_debug
xor r8d, r8d
mov edx, 0xc0103
xor ebp, ebp
mov ecx, 0x35
xor r15d, r15d
xor r13d, r13d
xor ebx, ebx
call sym.ERR_set_error
mov qword [rsp + 0x58], 0
mov rcx, r12
call sym.EVP_MD_free
mov rcx, qword [rsp + 0xc8]
call sym.ASN1_OCTET_STRING_free
mov rcx, qword [rsp + 0xc0]
call sym.ASN1_OCTET_STRING_free
mov rcx, rsi
mov r8d, 0x104
lea rdx, str..._openssl_3.1.1_crypto_sm2_sm2_crypt.c
call sym.CRYPTO_free
mov rcx, rdi
mov r8d, 0x105
lea rdx, str..._openssl_3.1.1_crypto_sm2_sm2_crypt.c
call sym.CRYPTO_free
mov rcx, qword [rsp + 0x58]
mov r8d, 0x106
lea rdx, str..._openssl_3.1.1_crypto_sm2_sm2_crypt.c
call sym.CRYPTO_free
mov rcx, r14
call sym.EVP_MD_CTX_free
mov rcx, r13
call sym.BN_CTX_free
mov rcx, r15
call sym.EC_POINT_free
mov rcx, rbp
call sym.EC_POINT_free
mov eax, ebx
add rsp, 0xd8
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_encrypt
mov edx, 0x8e
jmp 0x673999
call sym.ERR_new
lea r8, str.ossl_sm2_encrypt
xor edi, edi
xor esi, esi
mov edx, 0x9c
lea rcx, str..._openssl_3.1.1_crypto_sm2_sm2_crypt.c
xor r12d, r12d
xor ebx, ebx
call sym.ERR_set_debug
xor r8d, r8d
mov edx, 0xc0100
mov ecx, 0x35
call sym.ERR_set_error
mov qword [rsp + 0x58], 0
jmp 0x6739d1
call sym.ERR_new
mov edx, 0xb7
xor r12d, r12d
xor esi, esi
lea r8, str.ossl_sm2_encrypt
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
jmp 0x6739d1
call sym.ERR_new
lea r8, str.ossl_sm2_encrypt
xor edi, edi
xor ebx, ebx
mov edx, 0xa8
lea rcx, str..._openssl_3.1.1_crypto_sm2_sm2_crypt.c
xor r12d, r12d
call sym.ERR_set_debug
xor r8d, r8d
mov edx, 0x80003
mov ecx, 0x35
call sym.ERR_set_error
mov qword [rsp + 0x58], 0
jmp 0x6739d1
mov qword [rsp + 0x28], r13
mov r9, qword [rsp + 0x70]
xor r8d, r8d
mov rdx, rbp
mov rax, qword [rsp + 0x88]
mov rcx, r12
mov qword [rsp + 0x20], rax
call sym.EC_POINT_mul
test eax, eax
je 0x67394b
mov qword [rsp + 0x20], r13
mov r9, rsi
mov rdx, rbp
mov rcx, r12
mov rbx, qword [rsp + 0xa0]
mov r8, rbx
call sym.EC_POINT_get_affine_coordinates
test eax, eax
je 0x67394b
mov r8d, dword [rsp + 0x80]
mov rdx, rdi
mov rcx, rbx
call sym.BN_bn2binpad
test eax, eax
js 0x673f30
mov rbx, qword [rsp + 0x80]
mov rcx, rsi
lea rax, [rdi + rbx]
mov r8d, ebx
mov rdx, rax
mov qword [rsp + 0x70], rax
call sym.BN_bn2binpad
test eax, eax
js 0x673f30
mov rcx, qword [rsp + 0x138]
mov r8d, 0xc9
lea rdx, str..._openssl_3.1.1_crypto_sm2_sm2_crypt.c
call sym.CRYPTO_zalloc
mov rsi, rax
test rax, rax
je 0x67402e
mov rax, qword [rsp + 0x78]
mov r8, rdi
mov rcx, rsi
mov qword [rsp + 0x28], 0
mov r9, qword [rsp + 0xa8]
mov rdx, qword [rsp + 0x138]
mov qword [rsp + 0x20], 0
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0x60]
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x128]
mov qword [rsp + 0x30], rax
call sym.ossl_ecdh_kdf_X9_63
mov ebx, eax
test eax, eax
je 0x673f90
cmp qword [rsp + 0x138], 0
je 0x673dc4
mov rax, qword [rsp + 0x138]
lea r8, [rax - 1]
cmp r8, 0xe
jbe 0x673ffd
mov rdx, rax
mov rcx, qword [rsp + 0x130]
xor eax, eax
and rdx, 0xfffffffffffffff0
nop dword [rax]
movdqu xmm0, xmmword [rsi + rax]
movdqu xmm2, xmmword [rcx + rax]
pxor xmm0, xmm2
movups xmmword [rsi + rax], xmm0
add rax, 0x10
cmp rdx, rax
jne 0x673cb8
mov rax, qword [rsp + 0x138]
and rax, 0xfffffffffffffff0
test byte [rsp + 0x138], 0xf
je 0x673dc4
mov rcx, qword [rsp + 0x138]
sub r8, rax
sub rcx, rax
cmp r8, 6
jbe 0x673d31
mov rbx, qword [rsp + 0x130]
lea rdx, [rsi + rax]
movq xmm1, qword [rdx]
movq xmm0, qword [rbx + rax]
pxor xmm0, xmm1
movq qword [rdx], xmm0
mov rdx, rcx
and rdx, 0xfffffffffffffff8
add rax, rdx
cmp rcx, rdx
je 0x673dc4
mov rbx, qword [rsp + 0x130]
movzx edx, byte [rbx + rax]
xor byte [rsi + rax], dl
lea rdx, [rax + 1]
cmp rdx, qword [rsp + 0x138]
je 0x673dc4
movzx ecx, byte [rbx + rax + 1]
xor byte [rsi + rdx], cl
lea rdx, [rax + 2]
cmp rdx, qword [rsp + 0x138]
je 0x673dc4
movzx ecx, byte [rbx + rax + 2]
xor byte [rsi + rdx], cl
lea rdx, [rax + 3]
cmp qword [rsp + 0x138], rdx
je 0x673dc4
movzx ecx, byte [rbx + rax + 3]
xor byte [rsi + rdx], cl
lea rdx, [rax + 4]
cmp qword [rsp + 0x138], rdx
je 0x673dc4
movzx ecx, byte [rbx + rax + 4]
xor byte [rsi + rdx], cl
lea rdx, [rax + 5]
cmp qword [rsp + 0x138], rdx
je 0x673dc4
movzx ecx, byte [rbx + rax + 5]
xor byte [rsi + rdx], cl
lea rdx, [rax + 6]
cmp qword [rsp + 0x138], rdx
je 0x673dc4
movzx eax, byte [rbx + rax + 6]
xor byte [rsi + rdx], al
mov rcx, qword [rsp + 0x128]
call sym.EVP_MD_get0_name
mov r8, qword [rsp + 0x78]
mov rcx, qword [rsp + 0x60]
mov rdx, rax
call sym.EVP_MD_fetch
mov r12, rax
test rax, rax
je 0x673fc7
mov rdx, rax
mov rcx, r14
call sym.EVP_DigestInit
test eax, eax
je 0x673f5a
mov rbx, qword [rsp + 0x80]
mov rdx, rdi
mov rcx, r14
mov r8, rbx
call sym.EVP_DigestUpdate
test eax, eax
je 0x673f5a
mov r8, qword [rsp + 0x138]
mov rdx, qword [rsp + 0x130]
mov rcx, r14
call sym.EVP_DigestUpdate
test eax, eax
je 0x673f5a
mov rdx, qword [rsp + 0x70]
mov r8, rbx
mov rcx, r14
call sym.EVP_DigestUpdate
test eax, eax
je 0x673f5a
mov rdx, qword [rsp + 0x58]
xor r8d, r8d
mov rcx, r14
call sym.EVP_DigestFinal
test eax, eax
je 0x673f5a
movq xmm0, qword [rsp + 0x90]
movhps xmm0, qword [rsp + 0x98]
movaps xmmword [rsp + 0xb0], xmm0
call sym.ASN1_OCTET_STRING_new
mov qword [rsp + 0xc0], rax
call sym.ASN1_OCTET_STRING_new
mov rcx, qword [rsp + 0xc0]
mov qword [rsp + 0xc8], rax
test rcx, rcx
je 0x674093
test rax, rax
je 0x674093
mov r8d, dword [rsp + 0x6c]
mov rdx, qword [rsp + 0x58]
call sym.ASN1_OCTET_STRING_set
test eax, eax
je 0x67407d
mov r8d, dword [rsp + 0x138]
mov rcx, qword [rsp + 0xc8]
mov rdx, rsi
call sym.ASN1_OCTET_STRING_set
test eax, eax
je 0x67407d
lea rdx, [rsp + 0x140]
lea rcx, [rsp + 0xb0]
lea r8, [0x007cad00]
call sym.ASN1_item_i2d
test eax, eax
js 0x674067
mov rbx, qword [rsp + 0x148]
cdqe
mov qword [rbx], rax
mov ebx, 1
jmp 0x6739d1
call sym.ERR_new
lea r8, str.ossl_sm2_encrypt
mov edx, 0xc5
lea rcx, str..._openssl_3.1.1_crypto_sm2_sm2_crypt.c
call sym.ERR_set_debug
xor r8d, r8d
mov edx, 0xc0103
jmp 0x673970
call sym.ERR_new
lea r8, str.ossl_sm2_encrypt
mov edx, 0xe3
xor ebx, ebx
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
jmp 0x6739d1
call sym.ERR_new
lea r8, str.ossl_sm2_encrypt
mov edx, 0xd2
xor r12d, r12d
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
jmp 0x6739d1
call sym.ERR_new
lea r8, str.ossl_sm2_encrypt
mov edx, 0xdb
lea rcx, str..._openssl_3.1.1_crypto_sm2_sm2_crypt.c
xor ebx, ebx
call sym.ERR_set_debug
xor r8d, r8d
mov edx, 0xc0103
mov ecx, 0x35
call sym.ERR_set_error
jmp 0x6739d1
xor eax, eax
jmp 0x673ced
call sym.ERR_new
lea r8, str.ossl_sm2_encrypt
mov edx, 0xb0
lea rcx, str..._openssl_3.1.1_crypto_sm2_sm2_crypt.c
call sym.ERR_set_debug
xor r8d, r8d
mov edx, 0xc0100
jmp 0x673970
call sym.ERR_new
mov edx, 0xcb
xor r12d, r12d
xor ebx, ebx
lea r8, str.ossl_sm2_encrypt
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
jmp 0x6739d1
call sym.ERR_new
lea r8, str.ossl_sm2_encrypt
mov edx, 0xf9
jmp 0x673fd8
call sym.ERR_new
lea r8, str.ossl_sm2_encrypt
mov edx, 0xf2
jmp 0x673fd8
call sym.ERR_new
lea r8, str.ossl_sm2_encrypt
mov edx, 0xed
xor ebx, ebx
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
jmp 0x6739d1