//
// sub_100505178 from 0x100505178 to 0x1005052e8 (368 bytes)
//
// 1 xrefs:
// > sub_1005048D8 @ 0x100504c60
//
// 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_100505178(__int64 a1)
{
__int64 v2; // x0
__int64 v3; // x0
__int64 v4; // x0
__int64 v6; // x0
void *v7; // x20
_QWORD *v8; // x20
__int64 v9; // x0
__int64 v10; // x0
__int64 v11; // x0
void *v12[2]; // [xsp+0h] [xbp-40h] BYREF
char v13; // [xsp+17h] [xbp-29h]
void *__p[2]; // [xsp+18h] [xbp-28h] BYREF
char v15; // [xsp+2Fh] [xbp-11h]
if ( *(_BYTE *)(a1 + 808) == 1 )
{
*(_BYTE *)(a1 + 808) = 0;
*(_DWORD *)(a1 + 676) = 0;
v2 = *(_QWORD *)(a1 + 920);
if ( v2 )
ButtonSprite::setString(v2, "Online");
v3 = *(_QWORD *)(a1 + 904);
if ( v3 )
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v3 + 344LL))(v3, 0);
v4 = *(_QWORD *)(a1 + 912);
if ( v4 )
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v4 + 344LL))(v4, 0);
sub_10051B1EC(a1);
return sub_1005059D4(a1);
}
v6 = *(_QWORD *)(a1 + 896);
if ( v6 )
{
CCTextInputNode::getString(v6, __p);
if ( v15 >= 0 )
v7 = (void *)v15;
else
v7 = __p[1];
if ( (v15 & 0x8000000000000000LL) == 0 )
{
if ( !v7 )
goto LABEL_19;
LABEL_17:
v8 = *(_QWORD **)(a1 + 896);
sub_100009900(v12, "");
CCTextInputNode::setString(v8, (__int64 *)v12);
if ( v13 < 0 )
operator delete(v12[0]);
goto LABEL_19;
}
operator delete(__p[0]);
if ( v7 )
goto LABEL_17;
}
LABEL_19:
std::string::assign((std::string *)(a1 + 872), "");
*(_BYTE *)(a1 + 808) = 1;
v9 = *(_QWORD *)(a1 + 920);
if ( v9 )
ButtonSprite::setString(v9, "Saved");
v10 = *(_QWORD *)(a1 + 904);
if ( v10 )
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v10 + 344LL))(v10, 1);
v11 = *(_QWORD *)(a1 + 912);
if ( v11 )
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v11 + 344LL))(v11, 1);
sub_100505798(a1);
return sub_10051AFD0(a1, 0);
}