Function at 0x4a8590
Capabilities:
Encrypt data using curve25519

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
mov esi, dword [ebp + 0x1c]
push edi
mov edi, dword [ebp + 0xc]
cmp esi, 2
je 0x4a8613
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x4a85df
push eax
push 0
lea eax, [ebp - 4]
push eax
push 0
call fcn.00483db0
add esp, 0x10
cmp dword [ebp - 4], 0xffffffff
je 0x4a85df
push 0x3a
push str.c:_cygwin_home_shachar_zon_new_pkg_lib_openssl_crypto_ec_ecx_meth.c
push 0x66
push 0x10a
push 0x10
call fcn.00457620
add esp, 0x14
xor eax, eax
pop edi
pop esi
mov esp, ebp
pop ebp
ret
cmp dword [ebp + 0x14], 0
je 0x4a860f
cmp edi, 0x40a
je 0x4a8605
cmp edi, 0x43f
je 0x4a8605
xor eax, eax
cmp edi, 0x40b
setne al
add eax, 0x38
jmp 0x4a860a
mov eax, 0x20
cmp dword [ebp + 0x18], eax
je 0x4a8613
push 0x40
jmp 0x4a85c1
push ebx
push 0x45
push str.c:_cygwin_home_shachar_zon_new_pkg_lib_openssl_crypto_ec_ecx_meth.c
push 0x40
call fcn.00457d90
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x4a864c
push 0x47
push str.c:_cygwin_home_shachar_zon_new_pkg_lib_openssl_crypto_ec_ecx_meth.c
push 0x41
push 0x10a
push 0x10
call fcn.00457620
add esp, 0x14
xor eax, eax
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
test esi, esi
jne 0x4a8665
push dword [ebp + 0x18]
mov eax, dword [ebp + 0x14]
push eax
push ebx
call fcn.0053f3e0
add esp, 0xc
jmp case.0x4a8797.1036
cmp edi, 0x40a
je 0x4a8685
cmp edi, 0x43f
je 0x4a8685
xor eax, eax
cmp edi, 0x40b
setne al
add eax, 0x38
jmp 0x4a868a
mov eax, 0x20
push 0x4f
push str.c:_cygwin_home_shachar_zon_new_pkg_lib_openssl_crypto_ec_ecx_meth.c
push eax
call fcn.00457e40
mov esi, eax
add esp, 0xc
mov dword [ebx + 0x3c], esi
test esi, esi
jne 0x4a86bd
push 0x51
push str.c:_cygwin_home_shachar_zon_new_pkg_lib_openssl_crypto_ec_ecx_meth.c
push 0x41
push 0x10a
push 0x10
call fcn.00457620
add esp, 0x14
jmp 0x4a8711
cmp dword [ebp + 0x1c], 2
jne 0x4a8752
cmp edi, 0x40a
je 0x4a86e7
cmp edi, 0x43f
je 0x4a86e7
xor eax, eax
cmp edi, 0x40b
setne al
add eax, 0x38
jmp 0x4a86ec
mov eax, 0x20
push eax
push esi
call fcn.0044ca70
add esp, 8
test eax, eax
jg 0x4a872a
push 0x56
push str.c:_cygwin_home_shachar_zon_new_pkg_lib_openssl_crypto_ec_ecx_meth.c
push esi
call fcn.00457e30
add esp, 0xc
mov dword [ebx + 0x3c], 0
push 0x78
push str.c:_cygwin_home_shachar_zon_new_pkg_lib_openssl_crypto_ec_ecx_meth.c
push ebx
call fcn.00457b80
add esp, 0xc
xor eax, eax
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
cmp edi, 0x40a
jne 0x4a8741
mov al, byte [esi + 0x1f]
and byte [esi], 0xf8
and al, 0x3f
or al, 0x40
mov byte [esi + 0x1f], al
jmp 0x4a8785
cmp edi, 0x40b
jne 0x4a8785
and byte [esi], 0xfc
or byte [esi + 0x37], 0x80
jmp 0x4a8785
cmp edi, 0x40a
je 0x4a8772
cmp edi, 0x43f
je 0x4a8772
xor eax, eax
cmp edi, 0x40b
setne al
add eax, 0x38
jmp 0x4a8777
mov eax, 0x20
push eax
mov eax, dword [ebp + 0x14]
push eax
push esi
call fcn.0053f3e0
add esp, 0xc
lea eax, [edi - 0x40a]
cmp eax, 0x36
ja case.0x4a8797.1036
movzx eax, byte [eax + 0x4a87f0]
jmp dword [eax*4 + 0x4a87dc]
push esi
push ebx
call fcn.00507b60
jmp 0x4a87c0
push esi
push ebx
call fcn.005077f0
jmp 0x4a87c0
push esi
push ebx
call fcn.005051d0
jmp 0x4a87c0
push esi
push ebx
call fcn.00507190
add esp, 8
push ebx
push edi
push dword [ebp + 8]
call fcn.00453930
add esp, 0xc
mov eax, 1
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret