//
// SSL_get_shared_ciphers from 0xd40e54 to 0xd40f74 (288 bytes)
//
// 1 xrefs:
// > ??> @ 0x85278
//
// 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
//
char *__fastcall SSL_get_shared_ciphers(__int64 a1, char *a2, int a3)
{
__int64 v3; // x0
int v5; // w22
__int64 v6; // x24
int v7; // w20
char *v8; // x21
const char *v9; // x23
int v10; // w19
int v11; // w2
char *v12; // x19
bool v13; // cc
__int64 v14; // x1
v3 = *(_QWORD *)(a1 + 376);
v5 = a3;
if ( !v3 )
return nullptr;
v6 = *(_QWORD *)(v3 + 232);
if ( a3 <= 1 )
return nullptr;
v7 = v6 == 0;
if ( !v6 || !(unsigned int)OPENSSL_sk_num(*(_QWORD *)(v3 + 232)) )
return nullptr;
v8 = a2;
while ( 1 )
{
v13 = v7 < (int)OPENSSL_sk_num(v6);
v14 = (unsigned int)v7++;
if ( !v13 )
{
*(v8 - 1) = 0;
return a2;
}
v9 = *(const char **)(OPENSSL_sk_value(v6, v14) + 8);
v10 = strlen(v9);
if ( v5 <= v10 )
break;
memcpy(v8, v9, v10 + 1);
v11 = ~v10;
v12 = &v8[v10];
v5 += v11;
v8 = v12 + 1;
*v12 = 58;
}
v8[-(a2 != v8)] = 0;
return a2;
}