//
// sub_100543008 from 0x100543008 to 0x10054310c (260 bytes)
//
// 1 xrefs:
// > sub_1005834D0 @ 0x100583e38
//
// 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_100543008(__int64 a1, unsigned int *a2)
{
__int64 v4; // x8
__int64 v5; // x0
__int64 v6; // x0
__int64 v7; // x1
if ( a2 )
{
v4 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 368) + 184LL))(*a2);
if ( v4 || (v4 = (*(__int64 (__fastcall **)(_QWORD))(*(_QWORD *)(a1 + 8) + 184LL))(*a2)) != 0 )
{
if ( v4 == *(_QWORD *)(a1 + 8) || (unsigned int)sub_100540498(a1, v4) )
{
sub_100588508(a2 + 48, 1, 14, "ssl_sess.c", 929);
v5 = *(_QWORD *)(a1 + 304);
if ( v5 )
sub_1005422E0(v5);
*(_QWORD *)(a1 + 304) = a2;
*(_QWORD *)(a1 + 384) = *((_QWORD *)a2 + 23);
return 1;
}
}
else
{
sub_1005E0E48(20, 195, 240, "ssl_sess.c", 909);
}
}
else
{
v6 = *(_QWORD *)(a1 + 304);
if ( v6 )
{
sub_1005422E0(v6);
*(_QWORD *)(a1 + 304) = 0;
}
v7 = **(_QWORD **)(a1 + 368);
if ( v7 == *(_QWORD *)(a1 + 8) || (unsigned int)sub_100540498(a1, v7) )
return 1;
}
return 0;
}