Function at 0x5d8690
Capabilities:
Encrypt data using curve25519

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x34
call fcn.006f5ae0
mov dword [ebp - 8], 0
cmp dword [ebp + 0x18], 2
je 0x5d87df
cmp dword [ebp + 8], 0
je 0x5d8760
mov eax, dword [ebp + 8]
push eax
push 0
lea ecx, [ebp - 0x30]
push ecx
push 0
call fcn.005d5ae0
add esp, 0x10
cmp dword [ebp - 0x30], 0xffffffff
je 0x5d8703
call fcn.00576670
push str.ossl_ecx_key_op
push 0xaa
push str.cryptoececx_backend.c
call fcn.005766c0
add esp, 0xc
push 0
push 0x66
push 0x10
call fcn.00576710
add esp, 0xc
xor eax, eax
jmp 0x5d8abe
cmp dword [ebp + 0x14], 0
jne 0x5d871c
mov edx, dword [ebp + 8]
mov eax, dword [edx]
push eax
call fcn.005795a0
add esp, 4
mov dword [ebp + 0x14], eax
jmp 0x5d8760
mov ecx, dword [ebp + 8]
mov edx, dword [ecx]
push edx
call fcn.005795a0
add esp, 4
cmp dword [ebp + 0x14], eax
je 0x5d8760
call fcn.00576670
push str.ossl_ecx_key_op
push 0xb0
push str.cryptoececx_backend.c
call fcn.005766c0
add esp, 0xc
push 0
push 0x66
push 0x10
call fcn.00576710
add esp, 0xc
xor eax, eax
jmp 0x5d8abe
cmp dword [ebp + 0xc], 0
je 0x5d87ae
cmp dword [ebp + 0x14], 0
je 0x5d87ae
cmp dword [ebp + 0x14], 0x40a
je 0x5d879f
cmp dword [ebp + 0x14], 0x43f
je 0x5d879f
cmp dword [ebp + 0x14], 0x40b
jne 0x5d8790
mov dword [ebp - 0xc], 0x38
jmp 0x5d8797
mov dword [ebp - 0xc], 0x39
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x10], eax
jmp 0x5d87a6
mov dword [ebp - 0x10], 0x20
mov ecx, dword [ebp + 0x10]
cmp ecx, dword [ebp - 0x10]
je 0x5d87df
call fcn.00576670
push str.ossl_ecx_key_op
push 0xb6
push str.cryptoececx_backend.c
call fcn.005766c0
add esp, 0xc
push 0
push 0x66
push 0x10
call fcn.00576710
add esp, 0xc
xor eax, eax
jmp 0x5d8abe
cmp dword [ebp + 0x14], 0x40a
je 0x5d8812
cmp dword [ebp + 0x14], 0x43f
je 0x5d8812
cmp dword [ebp + 0x14], 0x40b
jne 0x5d8803
mov dword [ebp - 0x14], 1
jmp 0x5d880a
mov dword [ebp - 0x14], 3
mov edx, dword [ebp - 0x14]
mov dword [ebp - 0x1c], edx
jmp 0x5d8831
cmp dword [ebp + 0x14], 0x40a
jne 0x5d8824
mov dword [ebp - 0x18], 0
jmp 0x5d882b
mov dword [ebp - 0x18], 2
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp + 0x20]
push ecx
push 1
mov edx, dword [ebp - 0x1c]
push edx
mov eax, dword [ebp + 0x1c]
push eax
call fcn.005d8100
add esp, 0x10
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jne 0x5d8884
call fcn.00576670
push str.ossl_ecx_key_op
push 0xbd
push str.cryptoececx_backend.c
call fcn.005766c0
add esp, 0xc
push 0
push 0xc0100
push 0x10
call fcn.00576710
add esp, 0xc
xor eax, eax
jmp 0x5d8abe
mov ecx, dword [ebp - 8]
add ecx, 0xc
mov dword [ebp - 0x34], ecx
cmp dword [ebp + 0x18], 0
jne 0x5d88ac
mov edx, dword [ebp + 0x10]
push edx
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp - 0x34]
push ecx
call fcn.006f6ff0
add esp, 0xc
jmp 0x5d8aab
mov edx, dword [ebp - 8]
push edx
call fcn.005d8010
add esp, 4
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x5d88f3
call fcn.00576670
push str.ossl_ecx_key_op
push 0xc7
push str.cryptoececx_backend.c
call fcn.005766c0
add esp, 0xc
push 0
push 0xc0100
push 0x10
call fcn.00576710
add esp, 0xc
jmp 0x5d8ab0
cmp dword [ebp + 0x18], 2
jne 0x5d8a1e
cmp dword [ebp + 0x14], 0
je 0x5d8a1c
cmp dword [ebp + 0x14], 0x40a
je 0x5d893a
cmp dword [ebp + 0x14], 0x43f
je 0x5d893a
cmp dword [ebp + 0x14], 0x40b
jne 0x5d892b
mov dword [ebp - 0x20], 0x38
jmp 0x5d8932
mov dword [ebp - 0x20], 0x39
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x24], eax
jmp 0x5d8941
mov dword [ebp - 0x24], 0x20
push 0
mov ecx, dword [ebp - 0x24]
push ecx
mov edx, dword [ebp - 4]
push edx
mov eax, dword [ebp + 0x1c]
push eax
call fcn.00583700
add esp, 0x10
test eax, eax
jg 0x5d8960
jmp 0x5d8ab0
cmp dword [ebp + 0x14], 0x40a
jne 0x5d89ce
mov ecx, 1
imul edx, ecx, 0
mov eax, dword [ebp - 4]
movzx ecx, byte [eax + edx]
and ecx, 0xf8
mov edx, 1
imul eax, edx, 0
mov edx, dword [ebp - 4]
mov byte [edx + eax], cl
mov eax, 1
imul ecx, eax, 0x1f
mov edx, dword [ebp - 4]
movzx eax, byte [edx + ecx]
and eax, 0x7f
mov ecx, 1
imul edx, ecx, 0x1f
mov ecx, dword [ebp - 4]
mov byte [ecx + edx], al
mov edx, 1
imul eax, edx, 0x1f
mov ecx, dword [ebp - 4]
movzx edx, byte [ecx + eax]
or edx, 0x40
mov eax, 1
imul ecx, eax, 0x1f
mov eax, dword [ebp - 4]
mov byte [eax + ecx], dl
jmp 0x5d8a1c
cmp dword [ebp + 0x14], 0x40b
jne 0x5d8a1c
mov ecx, 1
imul edx, ecx, 0
mov eax, dword [ebp - 4]
movzx ecx, byte [eax + edx]
and ecx, 0xfc
mov edx, 1
imul eax, edx, 0
mov edx, dword [ebp - 4]
mov byte [edx + eax], cl
mov eax, 1
imul ecx, eax, 0x37
mov edx, dword [ebp - 4]
movzx eax, byte [edx + ecx]
or eax, 0x80
mov ecx, 1
imul edx, ecx, 0x37
mov ecx, dword [ebp - 4]
mov byte [ecx + edx], al
jmp 0x5d8a6c
cmp dword [ebp + 0x14], 0x40a
je 0x5d8a51
cmp dword [ebp + 0x14], 0x43f
je 0x5d8a51
cmp dword [ebp + 0x14], 0x40b
jne 0x5d8a42
mov dword [ebp - 0x28], 0x38
jmp 0x5d8a49
mov dword [ebp - 0x28], 0x39
mov edx, dword [ebp - 0x28]
mov dword [ebp - 0x2c], edx
jmp 0x5d8a58
mov dword [ebp - 0x2c], 0x20
mov eax, dword [ebp - 0x2c]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp - 4]
push edx
call fcn.006f6ff0
add esp, 0xc
mov eax, dword [ebp - 8]
push eax
call fcn.005d8ad0
add esp, 4
test eax, eax
jne 0x5d8aab
call fcn.00576670
push str.ossl_ecx_key_op
push 0xdb
push str.cryptoececx_backend.c
call fcn.005766c0
add esp, 0xc
push 0
push 0xa6
push 0x10
call fcn.00576710
add esp, 0xc
jmp 0x5d8ab0
mov eax, dword [ebp - 8]
jmp 0x5d8abe
mov ecx, dword [ebp - 8]
push ecx
call fcn.005d8040
add esp, 4
xor eax, eax
mov esp, ebp
pop ebp
ret