Function at 0x4c2860
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x98
mov qword [rsp + 0xe8], rdx
mov rbx, r9
mov r14, rcx
mov qword [rsp + 0xf0], r8
call sym.EC_KEY_get0_group
mov rcx, rax
mov r13, rax
call sym.ec_field_size
mov rcx, qword [rsp + 0xe8]
mov qword [rsp + 0x48], rax
mov rsi, rax
call sym.EVP_MD_size
mov edi, eax
test rsi, rsi
je 0x4c2948
test eax, eax
jle 0x4c2948
mov rax, qword [rsp + 0x108]
mov rcx, qword [rsp + 0x100]
mov edx, 0xff
mov r8, qword [rax]
call sym.memset
lea rdx, [rsp + 0xf0]
lea r9, [0x005e6660]
xor ecx, ecx
mov r8d, ebx
call sym.ASN1_item_d2i
mov r12, rax
test rax, rax
je 0x4c2fd8
mov rax, qword [rax + 0x10]
cmp dword [rax], edi
je 0x4c2a00
mov dword [rsp + 0x20], 0x12a
lea r9, str.crypto_sm2_sm2_crypt.c
mov r8d, 0x68
mov edx, 0x66
mov ecx, 0x35
xor ebx, ebx
xor ebp, ebp
call sym.ERR_put_error
xor esi, esi
xor r10d, r10d
xor edi, edi
xor r15d, r15d
jmp 0x4c2959
xor ebx, ebx
xor r10d, r10d
xor ebp, ebp
xor esi, esi
xor r12d, r12d
xor edi, edi
xor r15d, r15d
mov rax, qword [rsp + 0x108]
xor edx, edx
mov qword [rsp + 0x48], r10
xor r13d, r13d
mov rcx, qword [rsp + 0x100]
mov r8, qword [rax]
call sym.memset
mov r10, qword [rsp + 0x48]
mov rcx, r10
mov r8d, 0x17f
lea rdx, str.crypto_sm2_sm2_crypt.c
call sym.CRYPTO_free
mov rcx, rsi
mov r8d, 0x180
lea rdx, str.crypto_sm2_sm2_crypt.c
call sym.CRYPTO_free
mov r8d, 0x181
lea rdx, str.crypto_sm2_sm2_crypt.c
mov rcx, rbp
call sym.CRYPTO_free
mov rcx, rdi
call sym.EC_POINT_free
mov rcx, r15
call sym.BN_CTX_free
lea rdx, [0x005e6660]
mov rcx, r12
call sym.ASN1_item_free
mov rcx, rbx
call sym.EVP_MD_CTX_free
mov eax, r13d
add rsp, 0x98
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov rdx, qword [r12 + 0x18]
mov rax, qword [rax + 8]
mov rbx, qword [rdx + 8]
mov qword [rsp + 0x68], rax
mov eax, dword [rdx]
mov qword [rsp + 0x60], rbx
mov dword [rsp + 0x50], eax
call sym.BN_CTX_new
mov r15, rax
test rax, rax
je 0x4c2fa0
mov rcx, rax
call sym.BN_CTX_start
mov rcx, r15
call sym.BN_CTX_get
mov rcx, r15
mov qword [rsp + 0x70], rax
call sym.BN_CTX_get
mov rbx, rax
test rax, rax
je 0x4c2ff8
movsxd rax, dword [rsp + 0x50]
mov r8d, 0x141
lea rdx, str.crypto_sm2_sm2_crypt.c
mov rcx, rax
mov qword [rsp + 0x78], rax
call sym.CRYPTO_zalloc
mov r8d, 0x142
lea rdx, str.crypto_sm2_sm2_crypt.c
mov qword [rsp + 0x58], rax
mov rax, qword [rsp + 0x48]
add rax, rax
mov rcx, rax
mov qword [rsp + 0x80], rax
call sym.CRYPTO_zalloc
lea rdx, str.crypto_sm2_sm2_crypt.c
mov r8d, 0x143
mov rsi, rax
movsxd rax, edi
mov rcx, rax
mov qword [rsp + 0x88], rax
call sym.CRYPTO_zalloc
mov r10, qword [rsp + 0x58]
mov rbp, rax
test r10, r10
sete dl
test rsi, rsi
sete al
or dl, al
jne 0x4c2f60
test rbp, rbp
je 0x4c2f60
mov rcx, r13
mov qword [rsp + 0x58], r10
call sym.EC_POINT_new
mov r10, qword [rsp + 0x58]
test rax, rax
mov rdi, rax
je 0x4c3030
mov r9, qword [r12 + 8]
mov qword [rsp + 0x20], r15
mov rdx, rax
mov rcx, r13
mov r8, qword [r12]
mov qword [rsp + 0x58], r10
call sym.EC_POINT_set_affine_coordinates
mov r10, qword [rsp + 0x58]
test eax, eax
je 0x4c2f28
mov rcx, r14
mov qword [rsp + 0x58], r10
call sym.EC_KEY_get0_private_key
mov qword [rsp + 0x28], r15
xor r8d, r8d
mov r9, rdi
mov qword [rsp + 0x20], rax
mov rdx, rdi
mov rcx, r13
call sym.EC_POINT_mul
mov r10, qword [rsp + 0x58]
test eax, eax
je 0x4c2f28
mov r14, qword [rsp + 0x70]
mov qword [rsp + 0x20], r15
mov r9, rbx
mov rdx, rdi
mov rcx, r13
mov r8, r14
call sym.EC_POINT_get_affine_coordinates
mov r10, qword [rsp + 0x58]
test eax, eax
je 0x4c2f28
mov r13, qword [rsp + 0x48]
mov rdx, rsi
mov rcx, r14
mov r8d, r13d
call sym.BN_bn2binpad
mov r10, qword [rsp + 0x58]
test eax, eax
js 0x4c304f
mov rax, r13
lea r13, [rsi + r13]
mov rcx, rbx
mov r8d, eax
mov rdx, r13
call sym.BN_bn2binpad
mov r10, qword [rsp + 0x58]
test eax, eax
js 0x4c304f
mov rax, qword [rsp + 0xe8]
mov rdx, qword [rsp + 0x78]
mov rcx, r10
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
mov r9, qword [rsp + 0x80]
mov r8, rsi
mov qword [rsp + 0x30], rax
call sym.ECDH_KDF_X9_62
mov r10, qword [rsp + 0x58]
test eax, eax
je 0x4c304f
mov eax, dword [rsp + 0x50]
test eax, eax
je 0x4c2e28
mov rax, qword [rsp + 0x100]
mov r11, qword [rsp + 0x60]
mov ebx, dword [rsp + 0x50]
add rax, 0xf
mov rdx, rax
lea ecx, [rbx - 1]
sub rdx, r11
cmp rdx, 0x1e
seta r8b
cmp ecx, 0xe
seta dl
test r8b, dl
je 0x4c30d4
sub rax, r10
cmp rax, 0x1e
jbe 0x4c30d4
shr ebx, 4
xor eax, eax
mov rcx, r11
mov edx, ebx
shl rdx, 4
movdqu xmm0, xmmword [r10 + rax]
movdqu xmm1, xmmword [rcx + rax]
mov rbx, qword [rsp + 0x100]
pxor xmm0, xmm1
movups xmmword [rbx + rax], xmm0
add rax, 0x10
cmp rax, rdx
jne 0x4c2c70
mov ebx, dword [rsp + 0x50]
mov eax, ebx
and eax, 0xfffffff0
test bl, 0xf
je 0x4c2e28
mov r11, qword [rsp + 0x60]
movsxd rdx, eax
mov r14, qword [rsp + 0x100]
movzx ecx, byte [r11 + rdx]
xor cl, byte [r10 + rdx]
mov byte [r14 + rdx], cl
lea edx, [rax + 1]
cmp ebx, edx
je 0x4c2e28
movsxd rdx, edx
movzx ecx, byte [r10 + rdx]
xor cl, byte [r11 + rdx]
mov byte [r14 + rdx], cl
lea edx, [rax + 2]
cmp ebx, edx
je 0x4c2e28
movsxd rdx, edx
movzx ecx, byte [r11 + rdx]
xor cl, byte [r10 + rdx]
mov byte [r14 + rdx], cl
lea edx, [rax + 3]
cmp ebx, edx
je 0x4c2e28
movsxd rdx, edx
movzx ecx, byte [r10 + rdx]
xor cl, byte [r11 + rdx]
mov byte [r14 + rdx], cl
lea edx, [rax + 4]
cmp ebx, edx
je 0x4c2e28
movsxd rdx, edx
movzx ecx, byte [r10 + rdx]
xor cl, byte [r11 + rdx]
mov byte [r14 + rdx], cl
lea edx, [rax + 5]
cmp ebx, edx
je 0x4c2e28
movsxd rdx, edx
movzx ecx, byte [r10 + rdx]
xor cl, byte [r11 + rdx]
mov byte [r14 + rdx], cl
lea edx, [rax + 6]
cmp ebx, edx
je 0x4c2e28
movsxd rdx, edx
movzx ecx, byte [r10 + rdx]
xor cl, byte [r11 + rdx]
mov byte [r14 + rdx], cl
lea edx, [rax + 7]
cmp edx, ebx
je 0x4c2e28
movsxd rdx, edx
movzx ecx, byte [r11 + rdx]
xor cl, byte [r10 + rdx]
mov byte [r14 + rdx], cl
lea edx, [rax + 8]
cmp ebx, edx
je 0x4c2e28
movsxd rdx, edx
movzx ecx, byte [r11 + rdx]
xor cl, byte [r10 + rdx]
mov byte [r14 + rdx], cl
lea edx, [rax + 9]
cmp ebx, edx
je 0x4c2e28
movsxd rdx, edx
movzx ecx, byte [r11 + rdx]
xor cl, byte [r10 + rdx]
mov byte [r14 + rdx], cl
lea edx, [rax + 0xa]
cmp ebx, edx
je 0x4c2e28
movsxd rdx, edx
movzx ecx, byte [r11 + rdx]
xor cl, byte [r10 + rdx]
mov byte [r14 + rdx], cl
lea edx, [rax + 0xb]
cmp ebx, edx
je 0x4c2e28
movsxd rdx, edx
movzx ecx, byte [r11 + rdx]
xor cl, byte [r10 + rdx]
mov byte [r14 + rdx], cl
lea edx, [rax + 0xc]
cmp ebx, edx
je 0x4c2e28
movsxd rdx, edx
movzx ecx, byte [r11 + rdx]
xor cl, byte [r10 + rdx]
mov byte [r14 + rdx], cl
lea edx, [rax + 0xd]
cmp ebx, edx
je 0x4c2e28
movsxd rdx, edx
add eax, 0xe
movzx ecx, byte [r11 + rdx]
xor cl, byte [r10 + rdx]
mov byte [r14 + rdx], cl
cmp ebx, eax
je 0x4c2e28
cdqe
movzx edx, byte [r10 + rax]
xor dl, byte [r11 + rax]
mov byte [r14 + rax], dl
mov qword [rsp + 0x50], r10
call sym.EVP_MD_CTX_new
mov r10, qword [rsp + 0x50]
test rax, rax
mov rbx, rax
je 0x4c30a1
mov rdx, qword [rsp + 0xe8]
mov rcx, rax
mov qword [rsp + 0x50], r10
call sym.EVP_DigestInit
mov r10, qword [rsp + 0x50]
test eax, eax
je 0x4c306e
mov r14, qword [rsp + 0x48]
mov rdx, rsi
mov rcx, rbx
mov qword [rsp + 0x50], r10
mov r8, r14
call sym.EVP_DigestUpdate
mov r10, qword [rsp + 0x50]
test eax, eax
je 0x4c306e
mov r8, qword [rsp + 0x78]
mov rdx, qword [rsp + 0x100]
mov rcx, rbx
mov qword [rsp + 0x48], r10
call sym.EVP_DigestUpdate
mov r10, qword [rsp + 0x48]
test eax, eax
je 0x4c306e
mov r8, r14
mov rdx, r13
mov rcx, rbx
call sym.EVP_DigestUpdate
mov r10, qword [rsp + 0x48]
test eax, eax
je 0x4c306e
xor r8d, r8d
mov rdx, rbp
mov rcx, rbx
call sym.EVP_DigestFinal
mov r10, qword [rsp + 0x48]
test eax, eax
je 0x4c306e
mov r8, qword [rsp + 0x88]
mov rdx, qword [rsp + 0x68]
mov rcx, rbp
call sym.CRYPTO_memcmp
mov r10, qword [rsp + 0x48]
test eax, eax
jne 0x4c3100
mov rax, qword [rsp + 0x108]
mov rdx, qword [rsp + 0x78]
mov r13d, 1
mov qword [rax], rdx
jmp 0x4c2980
mov qword [rsp + 0x48], r10
lea r9, str.crypto_sm2_sm2_crypt.c
mov r8d, 0x10
mov dword [rsp + 0x20], 0x155
mov edx, 0x66
mov ecx, 0x35
xor ebx, ebx
call sym.ERR_put_error
mov r10, qword [rsp + 0x48]
jmp 0x4c2959
lea r9, str.crypto_sm2_sm2_crypt.c
mov edx, 0x66
xor ebx, ebx
xor edi, edi
mov r8d, 0x41
mov ecx, 0x35
mov qword [rsp + 0x48], r10
mov dword [rsp + 0x20], 0x146
call sym.ERR_put_error
mov r10, qword [rsp + 0x48]
jmp 0x4c2959
lea r9, str.crypto_sm2_sm2_crypt.c
mov edx, 0x66
xor ebx, ebx
xor ebp, ebp
mov r8d, 0x41
mov ecx, 0x35
xor esi, esi
xor edi, edi
mov dword [rsp + 0x20], 0x134
call sym.ERR_put_error
xor r10d, r10d
jmp 0x4c2959
mov dword [rsp + 0x20], 0x125
lea r9, str.crypto_sm2_sm2_crypt.c
mov r8d, 0x64
jmp 0x4c2924
lea r9, str.crypto_sm2_sm2_crypt.c
mov edx, 0x66
xor ebp, ebp
xor esi, esi
mov dword [rsp + 0x20], 0x13d
mov r8d, 3
mov ecx, 0x35
xor edi, edi
call sym.ERR_put_error
xor r10d, r10d
jmp 0x4c2959
mov qword [rsp + 0x48], r10
lea r9, str.crypto_sm2_sm2_crypt.c
mov r8d, 0x41
mov dword [rsp + 0x20], 0x14c
jmp 0x4c2f42
mov qword [rsp + 0x48], r10
lea r9, str.crypto_sm2_sm2_crypt.c
mov r8d, 0x44
mov dword [rsp + 0x20], 0x15d
jmp 0x4c2f42
mov r8d, 6
mov edx, 0x66
mov ecx, 0x35
mov dword [rsp + 0x20], 0x16f
lea r9, str.crypto_sm2_sm2_crypt.c
mov qword [rsp + 0x48], r10
call sym.ERR_put_error
mov r10, qword [rsp + 0x48]
jmp 0x4c2959
mov r8d, 0x41
mov edx, 0x66
mov ecx, 0x35
mov dword [rsp + 0x20], 0x166
lea r9, str.crypto_sm2_sm2_crypt.c
mov qword [rsp + 0x48], r10
call sym.ERR_put_error
mov r10, qword [rsp + 0x48]
jmp 0x4c2959
mov r8, qword [rsp + 0x60]
xor eax, eax
mov rbx, qword [rsp + 0x100]
movzx edx, byte [r10 + rax]
xor dl, byte [r8 + rax]
mov byte [rbx + rax], dl
mov rdx, rax
add rax, 1
cmp rdx, rcx
jne 0x4c30db
jmp 0x4c2e28
mov r8d, 0x66
mov edx, 0x66
mov ecx, 0x35
mov dword [rsp + 0x20], 0x174
lea r9, str.crypto_sm2_sm2_crypt.c
call sym.ERR_put_error
mov r10, qword [rsp + 0x48]
jmp 0x4c2959