//
// ssl_get_sign_pkey from 0xd41ab0 to 0xd41b5c (172 bytes)
//
// 2 xrefs:
// > tls_construct_server_key_exchange @ 0xd52044
// > ??> @ 0x68d30
//
// 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_sign_pkey(__int64 a1, __int64 a2, _QWORD *a3)
{
int v3; // w4
_QWORD *v4; // x5
__int64 v5; // x3
int v6; // w1
v3 = *(_DWORD *)(a2 + 24);
v4 = *(_QWORD **)(a1 + 328);
if ( (v3 & 2) == 0 || (v5 = v4[15], v6 = 2, !v5) )
{
if ( (v3 & 1) != 0 )
{
v5 = v4[10];
v6 = 1;
if ( v5 )
goto LABEL_3;
v5 = v4[5];
v6 = 0;
if ( v5 )
goto LABEL_3;
}
else if ( (v3 & 8) != 0 )
{
v5 = v4[20];
v6 = 3;
if ( v5 )
goto LABEL_3;
}
ERR_put_error(20, 183, 68, "ssl/ssl_lib.c", 2813);
return 0;
}
LABEL_3:
if ( a3 )
{
*a3 = *(_QWORD *)(*(_QWORD *)(a1 + 144) + 8LL * v6 + 728);
return v4[5 * v6 + 5];
}
return v5;
}