Function at 0x5e68b0
Capabilities:
Encrypt or decrypt via wincrypt

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x3c
mov ebx, dword [esp + 0x50]
mov esi, dword [esp + 0x5c]
test ebx, ebx
mov edi, ebx
jle 0x5e69eb
mov edi, dword [0x7ed96c]
mov dword [esp], esi
call sym._RSA_get0_engine
mov dword [esp], eax
mov dword [esp + 4], edi
call sym._ENGINE_get_ex_data
mov dword [esp + 4], str.Called_capi_rsa_priv_dec___n
mov dword [esp], eax
call sym._CAPI_trace
mov eax, dword [0x7ed968]
mov dword [esp], esi
mov dword [esp + 4], eax
call sym._RSA_get_ex_data
test eax, eax
mov edi, eax
je 0x5e6b32
cmp dword [esp + 0x60], 1
je 0x5e6a80
cmp dword [esp + 0x60], 3
jne 0x5e69f5
mov ebp, 0x20
mov dword [esp + 8], 0x3bc
mov dword [esp + 4], str.engines_e_capi.c
mov dword [esp], ebx
call sym._CRYPTO_malloc
test eax, eax
mov esi, eax
je 0x5e6b77
mov edx, dword [esp + 0x54]
lea eax, [eax + ebx - 1]
lea ecx, [esi - 1]
mov dword [esp + 0x50], ebx
lea esi, [esi]
movzx ebx, byte [edx]
sub eax, 1
add edx, 1
mov byte [eax + 1], bl
cmp ecx, eax
jne 0x5e6960
lea eax, [esp + 0x20]
mov ebx, dword [esp + 0x50]
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], ebp
mov dword [esp + 8], 1
mov dword [esp + 0x14], eax
mov dword [esp + 4], 0
mov eax, dword [edi + 8]
mov dword [esp + 0x20], ebx
mov dword [esp], eax
call dword [sym.imp.ADVAPI32.dll_CryptDecrypt]
sub esp, 0x18
test eax, eax
je 0x5e6a87
mov edi, dword [esp + 0x20]
mov eax, dword [esp + 0x58]
mov dword [esp + 4], esi
mov dword [esp + 8], edi
mov dword [esp], eax
call sym._memcpy
mov dword [esp + 4], edi
mov dword [esp], esi
call sym._OPENSSL_cleanse
mov dword [esp + 8], 0x3cf
mov dword [esp + 4], str.engines_e_capi.c
mov dword [esp], esi
call sym._CRYPTO_free
add esp, 0x3c
mov eax, edi
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [esp + 0x60]
lea ebx, [esp + 0x26]
mov dword [esp + 8], 0x83b519
mov dword [esp + 4], 0xa
mov dword [esp], ebx
mov dword [esp + 0xc], eax
call sym._BIO_snprintf
mov eax, dword [0x9475b4]
test eax, eax
jne 0x5e6a2c
call sym._ERR_get_next_error_library
mov dword [0x9475b4], eax
mov dword [esp], eax
mov dword [esp + 0x10], 0x3b5
mov edi, 0xffffffff
mov dword [esp + 0xc], str.engines_e_capi.c
mov dword [esp + 8], 0x7f
mov dword [esp + 4], 0x6e
call sym._ERR_put_error
mov dword [esp + 8], ebx
mov dword [esp + 4], str.padding
mov dword [esp], 2
call sym._ERR_add_error_data
add esp, 0x3c
mov eax, edi
pop ebx
pop esi
pop edi
pop ebp
ret
xor ebp, ebp
jmp 0x5e6929
mov eax, dword [0x9475b4]
test eax, eax
jne 0x5e6a9a
call sym._ERR_get_next_error_library
mov dword [0x9475b4], eax
lea ebx, [esp + 0x26]
mov dword [esp], eax
mov dword [esp + 0x10], 0x3c6
mov dword [esp + 0xc], str.engines_e_capi.c
mov dword [esp + 8], 0x6a
mov edi, 0xffffffff
mov dword [esp + 4], 0x6e
call sym._ERR_put_error
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 8], 0x83b39d
mov dword [esp + 0xc], eax
mov dword [esp + 4], 0xa
mov dword [esp], ebx
call sym._BIO_snprintf
mov dword [esp + 8], ebx
mov dword [esp + 4], str.Error_code_0x
mov dword [esp], 2
call sym._ERR_add_error_data
mov eax, dword [esp + 0x20]
mov dword [esp], esi
mov dword [esp + 4], eax
call sym._OPENSSL_cleanse
mov dword [esp + 8], 0x3c9
mov dword [esp + 4], str.engines_e_capi.c
mov dword [esp], esi
call sym._CRYPTO_free
jmp 0x5e69eb
mov eax, dword [0x9475b4]
test eax, eax
jne 0x5e6b45
call sym._ERR_get_next_error_library
mov dword [0x9475b4], eax
mov dword [esp + 0x10], 0x3a4
mov dword [esp + 0xc], str.engines_e_capi.c
mov edi, 0xffffffff
mov dword [esp + 8], 0x66
mov dword [esp + 4], 0x6e
mov dword [esp], eax
call sym._ERR_put_error
jmp 0x5e69eb
mov eax, dword [0x9475b4]
test eax, eax
jne 0x5e6b8a
call sym._ERR_get_next_error_library
mov dword [0x9475b4], eax
mov eax, dword [0x9475b4]
mov dword [esp + 0x10], 0x3bd
mov edi, 0xffffffff
mov dword [esp + 0xc], str.engines_e_capi.c
mov dword [esp + 8], 0x41
mov dword [esp + 4], 0x6e
mov dword [esp], eax
call sym._ERR_put_error
jmp 0x5e69eb