//
// sub_1005054E4 from 0x1005054e4 to 0x1005055f8 (276 bytes)
//
// 1 xrefs:
// > sub_1005048D8 @ 0x100504fb4
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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 11:06:56 +0000
//
__int64 __fastcall sub_1005054E4(__int64 a1)
{
__int64 v2; // x0
void *v3; // x20
_QWORD *v4; // x20
__int64 v5; // x0
__int64 v6; // x0
__int64 v7; // x0
void *v9[2]; // [xsp+0h] [xbp-40h] BYREF
char v10; // [xsp+17h] [xbp-29h]
void *__p[2]; // [xsp+18h] [xbp-28h] BYREF
char v12; // [xsp+2Fh] [xbp-11h]
*(_BYTE *)(a1 + 809) ^= 1u;
*(_BYTE *)(a1 + 1056) = 0;
sub_1005056B4();
v2 = *(_QWORD *)(a1 + 896);
if ( v2 )
{
CCTextInputNode::getString(v2, __p);
if ( v12 >= 0 )
v3 = (void *)v12;
else
v3 = __p[1];
if ( (v12 & 0x8000000000000000LL) != 0 )
{
operator delete(__p[0]);
if ( !v3 )
goto LABEL_11;
}
else if ( !v3 )
{
goto LABEL_11;
}
v4 = *(_QWORD **)(a1 + 896);
sub_100009900(v9, "");
CCTextInputNode::setString(v4, (__int64 *)v9);
if ( v10 < 0 )
operator delete(v9[0]);
}
LABEL_11:
std::string::assign((std::string *)(a1 + 872), "");
*(_BYTE *)(a1 + 808) = 0;
*(_DWORD *)(a1 + 676) = 0;
v5 = *(_QWORD *)(a1 + 920);
if ( v5 )
ButtonSprite::setString(v5, "Online");
v6 = *(_QWORD *)(a1 + 904);
if ( v6 )
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v6 + 344LL))(v6, 0);
v7 = *(_QWORD *)(a1 + 912);
if ( v7 )
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v7 + 344LL))(v7, 0);
sub_100505798(a1);
sub_10051B1EC(a1);
return sub_1005059D4(a1);
}