//
// sub_10022E8B0 from 0x10022e8b0 to 0x10022ece4 (1076 bytes)
//
// 1 xrefs:
// > ProfilePage::loadPageFromUserInfo @ 0x10022c8a8
//
// 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:01:16 +0000
//
void __fastcall sub_10022E8B0(__int64 a1)
{
__int64 v2; // x0
std::string::size_type v3; // x9
char v4; // w8
std::string::size_type size; // x10
std::string::size_type v6; // x11
__int64 v7; // x9
std::string::size_type v8; // x8
const char *p_dst; // x20
void **v10; // x21
void **v11; // x22
void **v12; // x23
int v13; // w25
void **v14; // x24
void **v15; // x8
void **v16; // x9
__int64 v17; // x0
char *CString; // x0
__int64 v19; // x8
__int64 v20; // x0
int v21; // w22
std::string::size_type v22; // x21
std::string *v23; // x8
const char *v24; // x9
__int64 v25; // x0
const std::string::value_type *v26; // x0
__int128 *v27; // x8
__int64 v28; // x20
std::string *v29; // x20
__int64 v30; // x8
__int128 *v31; // x8
const char *v32; // x8
__int64 v33; // x0
const std::string::value_type *v34; // x0
int v35; // w20
std::string::size_type v36; // x19
std::string *v37; // x1
std::string *v38; // x1
__int64 v39; // x19
void *v40[2]; // [xsp+30h] [xbp-140h] BYREF
char v41; // [xsp+47h] [xbp-129h]
void *__p[2]; // [xsp+48h] [xbp-128h] BYREF
char v43; // [xsp+5Fh] [xbp-111h]
void *v44[2]; // [xsp+60h] [xbp-110h] BYREF
char v45; // [xsp+77h] [xbp-F9h]
void *v46[2]; // [xsp+78h] [xbp-F8h] BYREF
char v47; // [xsp+8Fh] [xbp-E1h]
void *v48[2]; // [xsp+90h] [xbp-E0h] BYREF
char v49; // [xsp+A7h] [xbp-C9h]
void *v50[2]; // [xsp+A8h] [xbp-C8h] BYREF
char v51; // [xsp+BFh] [xbp-B1h]
__int128 __dst; // [xsp+C0h] [xbp-B0h] BYREF
__int64 v53; // [xsp+D0h] [xbp-A0h]
std::string v54; // [xsp+E0h] [xbp-90h] BYREF
std::string v55; // [xsp+100h] [xbp-70h] BYREF
if ( !*(_QWORD *)(a1 + 728) )
return;
v2 = GameLevelManager::sharedState();
sub_1000A7734(v2, *(_DWORD *)(*(_QWORD *)(a1 + 728) + 376LL), (__int64)&v55);
v3 = HIBYTE(v55.__r_.__value_.__r.__words[2]);
v4 = HIBYTE(v55.__r_.__value_.__r.__words[2]);
size = v55.__r_.__value_.__l.__size_;
if ( (v55.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL )
v6 = HIBYTE(v55.__r_.__value_.__r.__words[2]);
else
v6 = v55.__r_.__value_.__l.__size_;
if ( !v6 )
{
v7 = *(_QWORD *)(a1 + 728);
if ( *(char *)(v7 + 343) < 0 )
{
sub_1000097D0(&v54, *(void **)(v7 + 320), *(_QWORD *)(v7 + 328));
if ( (*((_BYTE *)&v55.__r_.__value_.__s + 23) & 0x80) == 0 )
goto LABEL_9;
}
else
{
v54 = *(std::string *)(v7 + 320);
if ( (*((_BYTE *)&v55.__r_.__value_.__s + 23) & 0x80) == 0 )
{
LABEL_9:
v55 = v54;
v3 = HIBYTE(v54.__r_.__value_.__r.__words[2]);
size = v54.__r_.__value_.__l.__size_;
v4 = HIBYTE(v54.__r_.__value_.__r.__words[2]);
goto LABEL_10;
}
}
operator delete(v55.__r_.__value_.__l.__data_);
goto LABEL_9;
}
LABEL_10:
if ( v4 >= 0 )
v8 = v3;
else
v8 = size;
if ( !v8 )
std::string::assign(&v55, "-");
p_dst = (const char *)&__dst;
GameToolbox::pointsToString(*(unsigned int *)(*(_QWORD *)(a1 + 728) + 380LL), (__int64)&__dst);
if ( v53 < 0 )
p_dst = (const char *)__dst;
v10 = v50;
GameToolbox::pointsToString(*(unsigned int *)(*(_QWORD *)(a1 + 728) + 384LL), (__int64)v50);
if ( v51 < 0 )
v10 = (void **)v50[0];
v11 = v48;
GameToolbox::pointsToString(*(unsigned int *)(*(_QWORD *)(a1 + 728) + 388LL), (__int64)v48);
if ( v49 < 0 )
v11 = (void **)v48[0];
v12 = v46;
GameToolbox::pointsToString(*(unsigned int *)(*(_QWORD *)(a1 + 728) + 404LL), (__int64)v46);
if ( v47 < 0 )
v12 = (void **)v46[0];
GameToolbox::pointsToString(*(unsigned int *)(*(_QWORD *)(a1 + 728) + 408LL), (__int64)v44);
v13 = v45;
v14 = (void **)v44[0];
GameToolbox::pointsToString(*(unsigned int *)(*(_QWORD *)(a1 + 728) + 392LL), (__int64)__p);
v15 = v44;
if ( v13 < 0 )
v15 = v14;
if ( v43 >= 0 )
v16 = __p;
else
v16 = (void **)__p[0];
v17 = sub_1003065B0(
"Stars: %s\n"
"Moons: %s\n"
"Diamonds: %s\n"
"Secret Coins: %s\n"
"User Coins: %s\n"
"Demons: %s",
p_dst,
(const char *)v10,
(const char *)v11,
(const char *)v12,
(const char *)v15,
(const char *)v16);
CString = (char *)cocos2d::CCString::getCString(v17);
sub_100009900(&v54, CString);
if ( v43 < 0 )
operator delete(__p[0]);
if ( v45 < 0 )
operator delete(v44[0]);
if ( v47 < 0 )
operator delete(v46[0]);
if ( v49 < 0 )
operator delete(v48[0]);
if ( v51 < 0 )
operator delete(v50[0]);
if ( SHIBYTE(v53) < 0 )
operator delete((void *)__dst);
v19 = *(_QWORD *)(a1 + 728);
v20 = *(unsigned int *)(v19 + 400);
if ( (int)v20 >= 1 )
{
v21 = SHIBYTE(v54.__r_.__value_.__r.__words[2]);
v22 = v54.__r_.__value_.__r.__words[0];
GameToolbox::pointsToString(v20, (__int64)&__dst);
v23 = &v54;
if ( v21 < 0 )
v23 = (std::string *)v22;
if ( v53 >= 0 )
v24 = (const char *)&__dst;
else
v24 = (const char *)__dst;
v25 = sub_1003065B0("%s\nCreator Points: %s", (const char *)v23, v24);
v26 = (const std::string::value_type *)cocos2d::CCString::getCString(v25);
std::string::assign(&v54, v26);
if ( SHIBYTE(v53) < 0 )
operator delete((void *)__dst);
v19 = *(_QWORD *)(a1 + 728);
}
if ( *(char *)(v19 + 559) < 0 )
{
sub_1000097D0(&__dst, *(void **)(v19 + 536), *(_QWORD *)(v19 + 544));
}
else
{
v27 = (__int128 *)(v19 + 536);
__dst = *v27;
v53 = *((_QWORD *)v27 + 2);
}
if ( (SHIBYTE(v53) & 0x80000000) == 0 )
{
if ( !HIBYTE(v53) )
goto LABEL_66;
LABEL_56:
if ( (v54.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL )
v29 = &v54;
else
v29 = (std::string *)v54.__r_.__value_.__r.__words[0];
v30 = *(_QWORD *)(a1 + 728);
if ( *(char *)(v30 + 559) < 0 )
{
sub_1000097D0(&__dst, *(void **)(v30 + 536), *(_QWORD *)(v30 + 544));
}
else
{
v31 = (__int128 *)(v30 + 536);
__dst = *v31;
v53 = *((_QWORD *)v31 + 2);
}
v32 = (const char *)&__dst;
if ( v53 < 0 )
v32 = (const char *)__dst;
v33 = sub_1003065B0("%s\nDiscord: @%s", (const char *)v29, v32);
v34 = (const std::string::value_type *)cocos2d::CCString::getCString(v33);
std::string::assign(&v54, v34);
if ( SHIBYTE(v53) < 0 )
operator delete((void *)__dst);
goto LABEL_66;
}
v28 = *((_QWORD *)&__dst + 1);
operator delete((void *)__dst);
if ( v28 )
goto LABEL_56;
LABEL_66:
v35 = SHIBYTE(v55.__r_.__value_.__r.__words[2]);
v36 = v55.__r_.__value_.__r.__words[0];
if ( (v54.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL )
v37 = &v54;
else
v37 = (std::string *)v54.__r_.__value_.__r.__words[0];
sub_100009900(v40, (char *)v37);
if ( v35 >= 0 )
v38 = &v55;
else
v38 = (std::string *)v36;
v39 = FLAlertLayer::create_1(0, v38, v40, "OK", 0, 300.0);
if ( v41 < 0 )
operator delete(v40[0]);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v39 + 1312LL))(v39);
if ( SHIBYTE(v54.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v54.__r_.__value_.__l.__data_);
if ( SHIBYTE(v55.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v55.__r_.__value_.__l.__data_);
}