//
// sub_BB8DAC from 0xbb8dac to 0xbb8ea0 (244 bytes)
//
// 1 xrefs:
// > sub_B839AC @ 0xbba884
//
// 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_BB8DAC(__int64 a1, const char *a2)
{
__int64 v4; // x20
__int64 v6; // x0
__int64 error; // x0
char v8[256]; // [xsp+58h] [xbp+58h] BYREF
v4 = ENGINE_by_id(a2);
if ( v4 )
{
if ( *(_QWORD *)(a1 + 35912) )
{
ENGINE_finish();
ENGINE_free(*(_QWORD *)(a1 + 35912));
*(_QWORD *)(a1 + 35912) = 0;
}
if ( (unsigned int)ENGINE_init(v4) )
{
*(_QWORD *)(a1 + 35912) = v4;
return 0;
}
else
{
v6 = ENGINE_free(v4);
error = ERR_get_error(v6);
ERR_error_string_n(error, v8, 256);
sub_B7B690(a1, "Failed to initialise SSL Engine '%s':\n%s", a2, v8);
return 66;
}
}
else
{
sub_B7B690(a1, "SSL Engine '%s' not found", a2);
return 53;
}
}