//
// EVP_PBE_find from 0x8b79c0 to 0x8b7a88 (200 bytes)
//
// 5 xrefs:
// > EVP_PBE_CipherInit @ 0x8b7ac8
// > PKCS5_v2_PBE_keyivgen @ 0x8b8788
// > PKCS5_v2_PBKDF2_keyivgen @ 0x8b8990
// > PKCS8_encrypt @ 0x8bbc40
// > ??> @ 0x6b04c
//
// 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
//
_DWORD *__fastcall EVP_PBE_find(int a1, int a2, _DWORD *a3, _DWORD *a4, _DWORD *a5)
{
_DWORD *result; // r0
unsigned int v8; // r1
int v9; // r3
_DWORD v10[5]; // [sp+Ch] [bp-14h] BYREF
if ( !a2 )
return nullptr;
v10[0] = a1;
v10[1] = a2;
if ( dword_AD48F0
&& (v8 = OPENSSL_sk_find(dword_AD48F0, (int)v10), v8 != -1)
&& (result = (_DWORD *)OPENSSL_sk_value((_DWORD *)dword_AD48F0, v8)) != nullptr
|| (result = (_DWORD *)OBJ_bsearch_((int)v10, (int)&unk_AB5204, 25, 20, (int (__fastcall *)(int, int))sub_8B7814)) != nullptr )
{
if ( a3 )
{
v9 = result[2];
*a3 = v9;
}
if ( a4 )
{
v9 = result[3];
*a4 = v9;
}
if ( a5 )
v9 = result[4];
result = &dword_0 + 1;
if ( a5 )
*a5 = v9;
}
return result;
}