//
// sub_100582FE8 from 0x100582fe8 to 0x1005830d8 (240 bytes)
//
// 1 xrefs:
// > sub_1005877D4 @ 0x1005877d4
//
// 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 sub_100582FE8(__int64 a1, const char *a2)
{
__int64 v4; // x21
__int64 *v5; // x23
__int64 v7; // x0
__int64 v8; // x0
char v9[256]; // [xsp+18h] [xbp-138h] BYREF
v4 = sub_1005D6BE0(a2);
if ( v4 )
{
v5 = (__int64 *)(a1 + 35464);
if ( *(_QWORD *)(a1 + 35464) )
{
sub_1005D70C4();
sub_1005D6580(*v5);
*v5 = 0;
}
if ( (unsigned int)sub_1005D6FFC(v4) )
{
*v5 = v4;
return 0;
}
else
{
v7 = sub_1005D6580(v4);
v8 = sub_1005E11DC(v7);
sub_1005E14A4(v8, v9, 256);
sub_100552734(a1, "Failed to initialise SSL Engine '%s':\n%s", a2, v9);
return 66;
}
}
else
{
sub_100552734(a1, "SSL Engine '%s' not found", a2);
return 53;
}
}