Function at 0x58c830
Capabilities:
Encrypt data using openssl rsa

Disassembly:
push ebx
push ebp
mov ebp, dword [esp + 0x10]
push esi
mov esi, ecx
xor edx, edx
mov eax, dword [ebp + 0x48]
mov ecx, dword [ebp + 0x40]
mov ebx, dword [ebp]
add ecx, eax
add ecx, ebx
cmp eax, edx
push edi
jne 0x58c853
mov eax, dword [esi + 0x28]
mov dword [ebp + 0x4c], eax
mov eax, dword [esi + 0x28]
mov ebx, dword [ebp + 0x4c]
mov edi, dword [esi + 0x2c]
sub eax, ebx
cmp eax, edi
jbe 0x58c87d
cmp dword [ebp + 0x50], edx
je 0x58c876
pop edi
mov dword [ebp + 0x50], edx
pop esi
pop ebp
mov eax, 0xffffff98
pop ebx
ret 8
mov dword [ebp + 0x50], 1
mov ebx, dword [esp + 0x14]
mov eax, dword [ebx]
mov edi, eax
sub edi, dword [esi + 0x28]
mov dword [esi + 0x28], eax
cmp dword [esi + 0x38], edx
je 0x58c8e1
mov dword [esi + 0x38], edx
mov eax, dword [ebp + 0x44]
sub eax, dword [ebp + 0x48]
cmp eax, 0xc
jae 0x58c8aa
pop edi
pop esi
pop ebp
mov eax, 0xffffff98
pop ebx
ret 8
cmp dword [esi + 0x30], edx
je 0x58c8e1
mov dword [ecx], edx
mov dword [ecx + 4], edx
mov eax, dword [esi + 0x30]
xor edx, edx
add ecx, 0xc0
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
shl eax, 2
div dword [esi + 0x34]
or eax, 0x1000000
mov dword [ecx - 0xb8], eax
mov edx, dword [ebp + 0x48]
add edx, 0xc
mov dword [ebp + 0x48], edx
xor edx, edx
mov al, byte [ebx + 4]
cmp al, 0xf0
jae 0x58c945
mov eax, dword [ebp + 0x44]
mov esi, dword [ebp + 0x48]
sub eax, esi
cmp eax, 0xc
jae 0x58c901
pop edi
pop esi
pop ebp
mov eax, 0xffffff98
pop ebx
ret 8
mov dword [ecx + 4], edx
xor edx, edx
mov dword [ecx], edi
mov dh, byte [ebx + 6]
mov dl, byte [ebx + 5]
xor eax, eax
mov al, byte [ebx + 4]
shl edx, 8
or edx, eax
mov dword [ecx + 8], edx
mov dl, byte [ebx + 4]
and dl, 0xf0
cmp dl, 0xb0
jne 0x58c933
cmp byte [ebx + 5], 7
jne 0x58c933
or dword [ecx + 8], 0x40000000
mov eax, dword [ebp + 0x48]
pop edi
add eax, 0xc
pop esi
mov dword [ebp + 0x48], eax
pop ebp
xor eax, eax
pop ebx
ret 8
je 0x58ca48
cmp al, 0xf7
je 0x58ca48
cmp byte [ebx + 5], 0x51
je 0x58c986
cmp dword [esi + 0x9c], edx
je 0x58c97a
mov eax, dword [ebx + 0xc]
push eax
call fcn.0060730a
mov eax, dword [esi + 0x9c]
add esp, 4
dec eax
mov dword [esi + 0x9c], eax
pop edi
pop esi
pop ebp
mov eax, 0xffffff97
pop ebx
ret 8
mov eax, dword [ebp + 0x44]
sub eax, dword [ebp + 0x48]
cmp eax, 0xc
jae 0x58c9be
cmp dword [esi + 0x9c], edx
je 0x58c9b2
mov ecx, dword [ebx + 0xc]
push ecx
call fcn.0060730a
mov eax, dword [esi + 0x9c]
add esp, 4
dec eax
mov dword [esi + 0x9c], eax
pop edi
pop esi
pop ebp
mov eax, 0xffffff98
pop ebx
ret 8
mov dword [ecx], edi
mov dword [ecx + 4], edx
mov edi, dword [ebx + 0xc]
xor eax, eax
xor edx, edx
mov ah, byte [edi]
mov dl, byte [edi + 2]
mov al, byte [edi + 1]
shl eax, 8
or eax, edx
xor edx, edx
mov dword [ecx + 8], eax
mov dword [esi + 0x30], eax
mov eax, dword [ecx + 8]
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
shl eax, 2
div dword [esi + 0x34]
xor edx, edx
or eax, 0x1000000
mov dword [ecx + 8], eax
mov eax, dword [esi + 0x14]
lea eax, [eax + eax*2]
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
shl eax, 5
div dword [esi + 0x30]
mov dword [esi + 0x2c], eax
mov eax, dword [esi + 0x9c]
test eax, eax
je 0x58ca36
mov eax, dword [ebx + 0xc]
push eax
call fcn.0060730a
mov eax, dword [esi + 0x9c]
add esp, 4
dec eax
mov dword [esi + 0x9c], eax
mov eax, dword [ebp + 0x48]
pop edi
add eax, 0xc
pop esi
mov dword [ebp + 0x48], eax
pop ebp
xor eax, eax
pop ebx
ret 8
cmp dword [esi + 0x9c], edx
je 0x58ca69
mov ecx, dword [ebx + 0xc]
push ecx
call fcn.0060730a
mov eax, dword [esi + 0x9c]
add esp, 4
dec eax
mov dword [esi + 0x9c], eax
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret 8