//
// ssl_get_algorithm2 from 0xfb6770 to 0xfb67d4 (100 bytes)
//
// 3 xrefs:
// > ssl_handshake_md @ 0xfbb354
// > ssl_prf_md @ 0xfbb368
// > ??> @ 0x79a38
//
// 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:15 +0000
//
__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;
}