//
// ssl_get_sign_pkey from 0x798f94 to 0x799060 (204 bytes)
//
// 2 xrefs:
// > tls_construct_server_key_exchange @ 0x7aa608
// > ??> @ 0x5c02c
//
// 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_sign_pkey(int a1, int a2, _DWORD *a3)
{
int v3; // r12
_DWORD *v4; // r3
int v5; // r1
int v6; // r12
v3 = *(_DWORD *)(a2 + 16);
v4 = *(_DWORD **)(a1 + 200);
if ( (v3 & 2) == 0 || (v5 = v4[16]) == 0 )
{
if ( (v3 & 1) != 0 )
{
v5 = v4[11];
if ( v5 )
{
v6 = 1;
goto LABEL_5;
}
v5 = v4[6];
if ( v5 )
{
v6 = 0;
goto LABEL_5;
}
}
else if ( (v3 & 8) != 0 )
{
v5 = v4[21];
if ( v5 )
{
v6 = 3;
goto LABEL_5;
}
}
ERR_put_error(20, 183, 68, "ssl/ssl_lib.c", 2813);
return 0;
}
v6 = 2;
LABEL_5:
if ( a3 )
{
*a3 = *(_DWORD *)(*(_DWORD *)(a1 + 104) + 4 * v6 + 628);
return v4[5 * v6 + 6];
}
return v5;
}