//
// EVP_PBE_find from 0xe61ac0 to 0xe61ba8 (232 bytes)
//
// 5 xrefs:
// > EVP_PBE_CipherInit @ 0xe61bf0
// > PKCS5_v2_PBE_keyivgen @ 0xe62b98
// > PKCS5_v2_PBKDF2_keyivgen @ 0xe62dc8
// > PKCS8_encrypt @ 0xe66128
// > ??> @ 0xb2578
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
__int64 __fastcall EVP_PBE_find(int a1, int a2, _DWORD *a3, _DWORD *a4, _QWORD *a5)
{
unsigned int v5; // w5
int v9; // w1
__int64 v10; // x0
_DWORD v12[6]; // [xsp+48h] [xbp+48h] BYREF
v5 = 0;
if ( !a2 )
return v5;
v12[0] = a1;
v12[1] = a2;
if ( !qword_125F920
|| (v9 = OPENSSL_sk_find(qword_125F920, (__int64)v12), v9 == -1)
|| (v10 = OPENSSL_sk_value(qword_125F920, v9)) == 0 )
{
v10 = OBJ_bsearch_(
(__int64)v12,
(__int64)&unk_12275D0,
25,
24,
(__int64 (__fastcall *)(__int64, __int64))sub_E618C8);
v5 = 0;
if ( !v10 )
return v5;
}
if ( a3 )
*a3 = *(_DWORD *)(v10 + 8);
if ( a4 )
*a4 = *(_DWORD *)(v10 + 12);
if ( !a5 )
return 1;
*a5 = *(_QWORD *)(v10 + 16);
return 1;
}