//
// SSL_get0_alpn_selected from 0xd41218 to 0xd4124c (52 bytes)
//
// 2 xrefs:
// > sub_BB5160 @ 0xbb5420
// > ??> @ 0x59ef8
//
// 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 SSL_get0_alpn_selected(__int64 a1, _QWORD *a2, _DWORD *a3)
{
__int64 v3; // x3
__int64 v4; // x3
__int64 result; // x0
*a2 = 0;
v3 = *(_QWORD *)(a1 + 144);
if ( v3 && (v4 = *(_QWORD *)(v3 + 976), (*a2 = v4) != 0) )
{
result = *(unsigned int *)(*(_QWORD *)(a1 + 144) + 984LL);
*a3 = result;
}
else
{
*a3 = 0;
return 0;
}
return result;
}