//
// sub_10023E224 from 0x10023e224 to 0x10023e450 (556 bytes)
//
// 1 xrefs:
// > GameManager::recountUserStats @ 0x1003b7158
//
// 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:23 +0000
//
__int64 __fastcall sub_10023E224(__int64 a1)
{
__int64 v1; // x19
_QWORD *v2; // x0
__int64 v3; // x20
std::string *p_str; // x8
std::string::size_type size; // x22
std::string *v6; // x9
std::string::size_type v7; // x11
std::string *v8; // x10
__int64 v9; // x8
__int64 v10; // x23
std::string::size_type v11; // x21
std::string *v12; // x1
__int64 v13; // x0
__int64 v14; // x25
bool v15; // zf
std::string::size_type v16; // x11
std::string *v17; // x8
_BYTE *v18; // x9
_BYTE *v19; // x10
std::string::size_type v20; // x11
__int64 v21; // x8
__int64 v22; // x21
__int64 v23; // x0
int v24; // w22
__int64 v25; // x0
unsigned int v26; // w0
unsigned int v27; // w8
std::string __str; // [xsp+8h] [xbp-88h] BYREF
std::allocator __a[8]; // [xsp+20h] [xbp-70h] BYREF
char v31; // [xsp+37h] [xbp-59h]
std::string v32; // [xsp+38h] [xbp-58h] BYREF
v1 = cocos2d::CCDictionary::create(a1);
v2 = sub_100009900(
&__str,
"1,3,2,4,3,4,5,5,6,6,7,6,8,7,9,8,10,8,11,9,19,10,20,10,21,10,22,10,26,10,27,10,28,10,29,10,30,10,31,10,32,4,33,5"
",34,6,35,8,36,8,37,5,38,5,39,6,40,7,41,8,42,8,43,8,44,9,45,6,46,10,47,10,48,10,49,10,50,10,52,4,53,3,54,4,55,4,"
"56,5,57,6,58,7,59,8,60,8,61,8,62,9,63,9,64,10,65,10,66,10");
v3 = sub_1002E736C(v2);
if ( (__str.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL )
p_str = &__str;
else
p_str = (std::string *)__str.__r_.__value_.__r.__words[0];
if ( (__str.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL )
size = HIBYTE(__str.__r_.__value_.__r.__words[2]);
else
size = __str.__r_.__value_.__l.__size_;
if ( size )
{
v6 = (std::string *)((char *)p_str + size);
v7 = size;
v8 = p_str;
while ( v8->__r_.__value_.__s.__data_[0] != 44 )
{
v8 = (std::string *)((char *)v8 + 1);
if ( !--v7 )
{
v8 = (std::string *)((char *)p_str + size);
break;
}
}
v9 = (char *)v8 - (char *)p_str;
if ( v8 == v6 )
v10 = -1;
else
v10 = v9;
}
else
{
v10 = -1;
}
v11 = 0;
do
{
std::string::basic_string(&v32, &__str, v11, v10 - v11, __a);
if ( SHIBYTE(v32.__r_.__value_.__r.__words[2]) < 0 )
{
if ( v11 == size && !v32.__r_.__value_.__l.__size_ )
goto LABEL_26;
v12 = (std::string *)v32.__r_.__value_.__r.__words[0];
}
else
{
if ( v11 == size && !*((_BYTE *)&v32.__r_.__value_.__s + 23) )
goto LABEL_26;
v12 = &v32;
}
sub_100009900(__a, (char *)v12);
v13 = sub_1003064AC(__a);
sub_1002E74E0(v3, v13);
if ( v31 < 0 )
operator delete(*(void **)&__a[0].std::__non_trivial_if);
LABEL_26:
if ( v10 == -1 )
goto LABEL_27;
v11 = v10 + 1;
v16 = __str.__r_.__value_.__l.__size_;
if ( (__str.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL )
v17 = &__str;
else
v17 = (std::string *)__str.__r_.__value_.__r.__words[0];
if ( (__str.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL )
v16 = HIBYTE(__str.__r_.__value_.__r.__words[2]);
if ( v16 <= v11 )
{
LABEL_27:
v14 = -1;
}
else
{
v18 = (char *)v17 + v16;
v19 = (char *)v17 + v11;
v20 = ~v10 + v16;
while ( *v19 != 44 )
{
++v19;
if ( !--v20 )
{
v19 = v18;
break;
}
}
v21 = v19 - (_BYTE *)v17;
if ( v19 == v18 )
v14 = -1;
else
v14 = v21;
}
if ( SHIBYTE(v32.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v32.__r_.__value_.__l.__data_);
v15 = v10 == -1;
v10 = v14;
}
while ( !v15 );
if ( SHIBYTE(__str.__r_.__value_.__r.__words[2]) < 0 )
operator delete(__str.__r_.__value_.__l.__data_);
if ( (unsigned int)sub_1002E757C(v3) >= 2 )
{
v22 = 0;
do
{
v23 = cocos2d::CCArray::stringAtIndex(v3, v22);
v24 = cocos2d::CCString::intValue(v23);
v25 = cocos2d::CCArray::stringAtIndex(v3, (unsigned int)(v22 + 1));
cocos2d::CCDictionary::setObject_1(v1, v25, v24);
v26 = sub_1002E757C(v3);
v27 = v22 + 3;
v22 = (unsigned int)(v22 + 2);
}
while ( v27 < v26 );
}
return v1;
}