//
// ssl_get_sign_pkey from 0x9adb98 to 0x9adc64 (204 bytes)
//
// 2 xrefs:
// > tls_construct_server_key_exchange @ 0x9bf20c
// > ??> @ 0x75aac
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 12:06:54 +0000
//
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;
}