Function at 0x4c1f60
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 r14, rcx
mov qword [rsp + 0x108], rdx
mov qword [rsp + 0x110], r8
mov qword [rsp + 0x118], r9
call sym.EVP_MD_CTX_new
mov rcx, r14
mov r13, rax
call sym.EC_KEY_get0_group
mov rcx, rax
mov r12, rax
call sym.EC_GROUP_get0_order
mov rcx, r14
mov rsi, rax
call sym.EC_KEY_get0_public_key
mov rcx, qword [rsp + 0x108]
mov qword [rsp + 0x58], rax
call sym.EVP_MD_size
pxor xmm0, xmm0
mov dword [rsp + 0x54], eax
movups xmmword [rsp + 0xa0], xmm0
test r13, r13
je 0x4c2258
test eax, eax
jle 0x4c2258
mov rcx, r12
call sym.ec_field_size
mov qword [rsp + 0x60], rax
test rax, rax
je 0x4c2188
mov rcx, r12
call sym.EC_POINT_new
mov rcx, r12
mov r15, rax
call sym.EC_POINT_new
mov rbx, rax
call sym.BN_CTX_new
test r15, r15
sete dl
test rbx, rbx
mov r14, rax
sete al
or dl, al
jne 0x4c2268
test r14, r14
je 0x4c2268
mov rcx, r14
call sym.BN_CTX_start
mov rcx, r14
call sym.BN_CTX_get
mov rcx, r14
mov qword [rsp + 0x68], rax
call sym.BN_CTX_get
mov rcx, r14
mov qword [rsp + 0x70], rax
call sym.BN_CTX_get
mov rcx, r14
mov qword [rsp + 0x80], rax
call sym.BN_CTX_get
mov rcx, r14
mov qword [rsp + 0x78], rax
call sym.BN_CTX_get
mov rbp, rax
test rax, rax
je 0x4c22c0
mov rax, qword [rsp + 0x60]
mov r8d, 0xaa
lea rdx, str.crypto_sm2_sm2_crypt.c
add rax, rax
mov rcx, rax
mov qword [rsp + 0x88], rax
call sym.CRYPTO_zalloc
movsxd rcx, dword [rsp + 0x54]
mov r8d, 0xab
lea rdx, str.crypto_sm2_sm2_crypt.c
mov rdi, rax
call sym.CRYPTO_zalloc
mov qword [rsp + 0x48], rax
test rdi, rdi
je 0x4c22a0
test rax, rax
je 0x4c22a0
mov rax, qword [rsp + 0x128]
mov rcx, qword [rsp + 0x120]
xor edx, edx
mov r8, qword [rax]
call sym.memset
mov rcx, qword [rsp + 0x68]
mov rdx, rsi
call sym.BN_priv_rand_range
mov esi, eax
test eax, eax
je 0x4c2728
mov qword [rsp + 0x28], r14
mov r8, qword [rsp + 0x68]
xor r9d, r9d
mov rdx, r15
mov qword [rsp + 0x20], 0
mov rcx, r12
call sym.EC_POINT_mul
test eax, eax
je 0x4c2159
mov qword [rsp + 0x20], r14
mov r9, qword [rsp + 0x78]
mov rdx, r15
mov rcx, r12
mov r8, qword [rsp + 0x70]
call sym.EC_POINT_get_affine_coordinates
test eax, eax
jne 0x4c2300
mov dword [rsp + 0x20], 0xbd
lea r9, str.crypto_sm2_sm2_crypt.c
mov r8d, 0x10
mov edx, 0x67
mov ecx, 0x35
xor ebp, ebp
xor esi, esi
call sym.ERR_put_error
jmp 0x4c21c3
mov dword [rsp + 0x20], 0x92
lea r9, str.crypto_sm2_sm2_crypt.c
mov edx, 0x67
xor edi, edi
xor ebp, ebp
mov r8d, 0x44
mov ecx, 0x35
xor ebx, ebx
xor r15d, r15d
call sym.ERR_put_error
xor r14d, r14d
xor esi, esi
mov qword [rsp + 0x48], 0
mov rcx, qword [rsp + 0xa8]
call sym.ASN1_OCTET_STRING_free
mov rcx, qword [rsp + 0xa0]
call sym.ASN1_OCTET_STRING_free
mov rcx, rbp
mov r8d, 0xfc
lea rdx, str.crypto_sm2_sm2_crypt.c
call sym.CRYPTO_free
mov rcx, rdi
mov r8d, 0xfd
lea rdx, str.crypto_sm2_sm2_crypt.c
call sym.CRYPTO_free
mov rcx, qword [rsp + 0x48]
mov r8d, 0xfe
lea rdx, str.crypto_sm2_sm2_crypt.c
call sym.CRYPTO_free
mov rcx, r13
call sym.EVP_MD_CTX_free
mov rcx, r14
call sym.BN_CTX_free
mov rcx, r15
call sym.EC_POINT_free
mov rcx, rbx
call sym.EC_POINT_free
mov eax, esi
add rsp, 0xb8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov dword [rsp + 0x20], 0x8c
jmp 0x4c2190
lea r9, str.crypto_sm2_sm2_crypt.c
mov edx, 0x67
xor edi, edi
xor ebp, ebp
mov dword [rsp + 0x20], 0x9a
mov r8d, 0x41
mov ecx, 0x35
xor esi, esi
call sym.ERR_put_error
mov qword [rsp + 0x48], 0
jmp 0x4c21c3
mov dword [rsp + 0x20], 0xae
lea r9, str.crypto_sm2_sm2_crypt.c
mov r8d, 0x41
jmp 0x4c216e
lea r9, str.crypto_sm2_sm2_crypt.c
mov edx, 0x67
xor edi, edi
xor esi, esi
mov dword [rsp + 0x20], 0xa6
mov r8d, 3
mov ecx, 0x35
call sym.ERR_put_error
mov qword [rsp + 0x48], 0
jmp 0x4c21c3
mov rax, qword [rsp + 0x68]
mov qword [rsp + 0x28], r14
xor r8d, r8d
mov rdx, rbx
mov r9, qword [rsp + 0x58]
mov rcx, r12
mov qword [rsp + 0x20], rax
call sym.EC_POINT_mul
test eax, eax
je 0x4c2159
mov qword [rsp + 0x20], r14
mov r9, rbp
mov rdx, rbx
mov rcx, r12
mov rsi, qword [rsp + 0x80]
mov r8, rsi
call sym.EC_POINT_get_affine_coordinates
test eax, eax
je 0x4c2159
mov r8d, dword [rsp + 0x60]
mov rdx, rdi
mov rcx, rsi
call sym.BN_bn2binpad
test eax, eax
js 0x4c2753
mov rax, qword [rsp + 0x60]
mov rcx, rbp
lea r12, [rdi + rax]
mov r8d, eax
mov rdx, r12
call sym.BN_bn2binpad
test eax, eax
js 0x4c2753
mov rcx, qword [rsp + 0x118]
mov r8d, 0xc7
lea rdx, str.crypto_sm2_sm2_crypt.c
call sym.CRYPTO_zalloc
mov rbp, rax
test rax, rax
je 0x4c27c1
mov rax, qword [rsp + 0x108]
mov r8, rdi
mov rcx, rbp
mov qword [rsp + 0x28], 0
mov r9, qword [rsp + 0x88]
mov rdx, qword [rsp + 0x118]
mov qword [rsp + 0x20], 0
mov qword [rsp + 0x30], rax
call sym.ECDH_KDF_X9_62
mov esi, eax
test eax, eax
je 0x4c2798
cmp qword [rsp + 0x118], 0
je 0x4c25eb
lea rax, [rbp + 0xf]
sub rax, qword [rsp + 0x110]
cmp rax, 0x1e
jbe 0x4c27ec
mov rax, qword [rsp + 0x118]
sub rax, 1
cmp rax, 0xe
jbe 0x4c27ec
mov rdx, qword [rsp + 0x118]
mov rcx, qword [rsp + 0x110]
xor eax, eax
and rdx, 0xfffffffffffffff0
movdqu xmm0, xmmword [rbp + rax]
movdqu xmm1, xmmword [rcx + rax]
pxor xmm0, xmm1
movups xmmword [rbp + rax], xmm0
add rax, 0x10
cmp rdx, rax
jne 0x4c2442
mov rax, qword [rsp + 0x118]
and rax, 0xfffffffffffffff0
test byte [rsp + 0x118], 0xf
je 0x4c25eb
mov rsi, qword [rsp + 0x110]
movzx edx, byte [rsi + rax]
xor byte [rbp + rax], dl
lea rdx, [rax + 1]
cmp qword [rsp + 0x118], rdx
je 0x4c25eb
movzx ecx, byte [rsi + rax + 1]
xor byte [rbp + rdx], cl
lea rdx, [rax + 2]
cmp qword [rsp + 0x118], rdx
je 0x4c25eb
movzx ecx, byte [rsi + rax + 2]
xor byte [rbp + rdx], cl
lea rdx, [rax + 3]
cmp qword [rsp + 0x118], rdx
je 0x4c25eb
movzx ecx, byte [rsi + rax + 3]
xor byte [rbp + rdx], cl
lea rdx, [rax + 4]
cmp qword [rsp + 0x118], rdx
je 0x4c25eb
movzx ecx, byte [rsi + rax + 4]
xor byte [rbp + rdx], cl
lea rdx, [rax + 5]
cmp qword [rsp + 0x118], rdx
je 0x4c25eb
movzx ecx, byte [rsi + rax + 5]
xor byte [rbp + rdx], cl
lea rdx, [rax + 6]
cmp qword [rsp + 0x118], rdx
je 0x4c25eb
movzx ecx, byte [rsi + rax + 6]
xor byte [rbp + rdx], cl
lea rdx, [rax + 7]
cmp qword [rsp + 0x118], rdx
je 0x4c25eb
movzx ecx, byte [rsi + rax + 7]
xor byte [rbp + rdx], cl
lea rdx, [rax + 8]
cmp qword [rsp + 0x118], rdx
je 0x4c25eb
movzx ecx, byte [rsi + rax + 8]
xor byte [rbp + rdx], cl
lea rdx, [rax + 9]
cmp qword [rsp + 0x118], rdx
je 0x4c25eb
movzx ecx, byte [rsi + rax + 9]
xor byte [rbp + rdx], cl
lea rdx, [rax + 0xa]
cmp qword [rsp + 0x118], rdx
je 0x4c25eb
movzx ecx, byte [rsi + rax + 0xa]
xor byte [rbp + rdx], cl
lea rdx, [rax + 0xb]
cmp qword [rsp + 0x118], rdx
je 0x4c25eb
movzx ecx, byte [rsi + rax + 0xb]
xor byte [rbp + rdx], cl
lea rdx, [rax + 0xc]
cmp qword [rsp + 0x118], rdx
je 0x4c25eb
movzx ecx, byte [rsi + rax + 0xc]
xor byte [rbp + rdx], cl
lea rdx, [rax + 0xd]
cmp qword [rsp + 0x118], rdx
je 0x4c25eb
movzx ecx, byte [rsi + rax + 0xd]
xor byte [rbp + rdx], cl
lea rdx, [rax + 0xe]
cmp qword [rsp + 0x118], rdx
je 0x4c25eb
movzx eax, byte [rsi + rax + 0xe]
xor byte [rbp + rdx], al
mov rdx, qword [rsp + 0x108]
mov rcx, r13
call sym.EVP_DigestInit
test eax, eax
je 0x4c276d
mov rsi, qword [rsp + 0x60]
mov rdx, rdi
mov rcx, r13
mov r8, rsi
call sym.EVP_DigestUpdate
test eax, eax
je 0x4c276d
mov r8, qword [rsp + 0x118]
mov rdx, qword [rsp + 0x110]
mov rcx, r13
call sym.EVP_DigestUpdate
test eax, eax
je 0x4c276d
mov r8, rsi
mov rdx, r12
mov rcx, r13
call sym.EVP_DigestUpdate
test eax, eax
je 0x4c276d
mov rdx, qword [rsp + 0x48]
xor r8d, r8d
mov rcx, r13
call sym.EVP_DigestFinal
test eax, eax
je 0x4c276d
movq xmm0, qword [rsp + 0x70]
movhps xmm0, qword [rsp + 0x78]
movups xmmword [rsp + 0x90], xmm0
call sym.ASN1_OCTET_STRING_new
mov qword [rsp + 0xa0], rax
call sym.ASN1_OCTET_STRING_new
mov rcx, qword [rsp + 0xa0]
mov qword [rsp + 0xa8], rax
test rcx, rcx
je 0x4c2814
test rax, rax
je 0x4c2814
mov r8d, dword [rsp + 0x54]
mov rdx, qword [rsp + 0x48]
call sym.ASN1_OCTET_STRING_set
test eax, eax
je 0x4c2849
mov r8d, dword [rsp + 0x118]
mov rcx, qword [rsp + 0xa8]
mov rdx, rbp
call sym.ASN1_OCTET_STRING_set
test eax, eax
je 0x4c2849
lea rdx, [rsp + 0x120]
lea rcx, [rsp + 0x90]
lea r8, [0x005e6660]
call sym.ASN1_item_i2d
test eax, eax
js 0x4c281e
mov rsi, qword [rsp + 0x128]
cdqe
mov qword [rsi], rax
mov esi, 1
jmp 0x4c21c3
mov dword [rsp + 0x20], 0xb5
lea r9, str.crypto_sm2_sm2_crypt.c
mov r8d, 0x44
xor ebp, ebp
mov edx, 0x67
mov ecx, 0x35
call sym.ERR_put_error
jmp 0x4c21c3
mov dword [rsp + 0x20], 0xc3
lea r9, str.crypto_sm2_sm2_crypt.c
mov r8d, 0x44
jmp 0x4c216e
mov dword [rsp + 0x20], 0xdc
lea r9, str.crypto_sm2_sm2_crypt.c
mov r8d, 6
xor esi, esi
mov edx, 0x67
mov ecx, 0x35
call sym.ERR_put_error
jmp 0x4c21c3
mov r8d, 6
mov edx, 0x67
mov ecx, 0x35
mov dword [rsp + 0x20], 0xd0
lea r9, str.crypto_sm2_sm2_crypt.c
call sym.ERR_put_error
jmp 0x4c21c3
mov dword [rsp + 0x20], 0xc9
lea r9, str.crypto_sm2_sm2_crypt.c
mov r8d, 0x41
mov edx, 0x67
xor esi, esi
mov ecx, 0x35
call sym.ERR_put_error
jmp 0x4c21c3
mov rcx, qword [rsp + 0x110]
mov r8, qword [rsp + 0x118]
xor eax, eax
movzx edx, byte [rcx + rax]
xor byte [rbp + rax], dl
add rax, 1
cmp r8, rax
jne 0x4c27fe
jmp 0x4c25eb
mov dword [rsp + 0x20], 0xe6
jmp 0x4c27c9
mov dword [rsp + 0x20], 0xf2
lea r9, str.crypto_sm2_sm2_crypt.c
mov r8d, 0x44
mov edx, 0x67
xor esi, esi
mov ecx, 0x35
call sym.ERR_put_error
jmp 0x4c21c3
mov dword [rsp + 0x20], 0xeb
jmp 0x4c2826