//
// X509_find_by_subject from 0x83eb18 to 0x83eb74 (92 bytes)
//
// 5 xrefs:
// > OCSP_basic_verify @ 0x81fa40
// > OCSP_basic_verify @ 0x81fe68
// > OCSP_request_verify @ 0x82000c
// > OCSP_request_verify @ 0x82008c
// > ??> @ 0x64d6c
//
// 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
//
int __fastcall X509_find_by_subject(_DWORD *a1, int a2)
{
signed int v4; // r4
int v5; // r6
int subject_name; // r0
int v7; // r0
unsigned int v8; // r1
v4 = 0;
do
{
v7 = OPENSSL_sk_num((int)a1);
v8 = v4;
if ( v4++ >= v7 )
return 0;
v5 = OPENSSL_sk_value(a1, v8);
subject_name = X509_get_subject_name(v5);
}
while ( X509_NAME_cmp(subject_name, a2) );
return v5;
}