//
// ssl_get_server_cert_serverinfo from 0xfbfeb0 to 0xfbffb0 (256 bytes)
//
// 2 xrefs:
// > sub_FC253C @ 0xfc2568
// > ??> @ 0x5bf00
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 13:15:20 +0000
//
__int64 __fastcall ssl_get_server_cert_serverinfo(__int64 a1, __int64 *a2, _QWORD *a3)
{
__int64 v3; // x20
__int64 v5; // x0
int cert_index; // w0
__int64 v7; // x3
__int64 result; // x0
_QWORD *v9; // x3
v3 = *(_QWORD *)(a1 + 328);
v5 = *(_QWORD *)(*(_QWORD *)(a1 + 144) + 552LL);
*a3 = 0;
cert_index = ssl_cipher_get_cert_index(v5);
switch ( cert_index )
{
case 0:
cert_index = *(_QWORD *)(*(_QWORD *)(a1 + 328) + 32LL) == 0;
break;
case 8:
v9 = *(_QWORD **)(a1 + 328);
cert_index = 6;
if ( v9[34] )
break;
cert_index = 5;
if ( v9[29] )
break;
cert_index = 4;
if ( v9[24] )
break;
LABEL_10:
ERR_put_error(20, 322, 68, "ssl/ssl_lib.c", 2768);
return 0;
case -1:
goto LABEL_10;
}
v7 = v3 + 40LL * cert_index;
result = *(_QWORD *)(v7 + 56);
if ( result )
{
*a2 = result;
result = 1;
*a3 = *(_QWORD *)(v7 + 64);
}
return result;
}