//
// ssl_get_algorithm2 from 0x78ecd8 to 0x78ed5c (132 bytes)
//
// 3 xrefs:
// > ssl_handshake_md @ 0x794140
// > ssl_prf_md @ 0x794150
// > ??> @ 0x5adcc
//
// 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
//
int __fastcall ssl_get_algorithm2(int a1)
{
int v1; // r3
int v2; // r2
int v3; // r3
bool v5; // r2
v1 = *(_DWORD *)(a1 + 104);
if ( !v1 )
return -1;
v2 = *(_DWORD *)(v1 + 528);
if ( !v2 )
return -1;
v3 = *(_DWORD *)(v2 + 48);
if ( (*(_DWORD *)(*(_DWORD *)(*(_DWORD *)(a1 + 4) + 100) + 52) & 4) != 0 )
{
if ( v3 == 2313 )
return 1028;
else
return *(_DWORD *)(v2 + 48);
}
else
{
v5 = (*(_DWORD *)(v2 + 12) & 0x1C8) != 0;
if ( v3 == 1285 && v5 )
return 2313;
else
return v3;
}
}