//
// sub_10054B9CC from 0x10054b9cc to 0x10054ba7c (176 bytes)
//
// 3 xrefs:
// > sub_10054D6EC @ 0x10054d728
// > sub_100558DA8 @ 0x10055bbb4
// > sub_100566E34 @ 0x100566eec
//
// 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_10054B9CC(__int64 result)
{
__int64 v1; // x19
_QWORD *v2; // x21
__int64 v3; // x0
v1 = result;
v2 = *(_QWORD **)(result + 1952);
if ( v2 )
{
sub_10056FCA8(result, 2, 2);
do
{
v3 = sub_10054BA7C(v1, *v2, *(_QWORD *)(v1 + 1968), *(unsigned __int8 *)(v1 + 977));
if ( v3 )
*(_QWORD *)(v1 + 1968) = v3;
else
sub_1005524A4(v1, "ignoring failed cookie_init for %s\n", (const char *)*v2);
v2 = (_QWORD *)v2[1];
}
while ( v2 );
sub_100574898(*(_QWORD *)(v1 + 1952));
*(_QWORD *)(v1 + 1952) = 0;
return sub_10056FCF4(v1, 2);
}
return result;
}