//
// ssl_get_algorithm2 from 0xd3841c to 0xd38480 (100 bytes)
//
// 3 xrefs:
// > ssl_handshake_md @ 0xd3d000
// > ssl_prf_md @ 0xd3d014
// > ??> @ 0x584b8
//
// 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_get_algorithm2(__int64 a1)
{
__int64 v1; // x1
__int64 v2; // x1
__int64 v3; // x2
__int64 result; // x0
v1 = *(_QWORD *)(a1 + 144);
if ( !v1 )
return -1;
v2 = *(_QWORD *)(v1 + 552);
if ( !v2 )
return -1;
v3 = *(unsigned int *)(v2 + 56);
if ( (*(_DWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 8) + 192LL) + 104LL) & 4) != 0 )
{
result = 1028;
if ( v3 != 2313 )
return *(unsigned int *)(v2 + 56);
}
else
{
if ( (*(_DWORD *)(v2 + 20) & 0x1C8) == 0 )
return *(unsigned int *)(v2 + 56);
result = 2313;
if ( v3 != 1285 )
return *(unsigned int *)(v2 + 56);
}
return result;
}