//
// StatsObject::init from 0x737770 to 0x737898 (296 bytes)
//
// 2 xrefs:
// > StatsObject::create @ 0x737918
// > ??> @ 0x54a60
//
// 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 12:52:39 +0000
//
__int64 __fastcall StatsObject::init(StatsObject *this, const char *a2, int a3)
{
size_t v5; // x0
size_t v6; // x19
const char *v7; // x1
unsigned __int64 v8; // x0
__int64 v9; // x22
char *v10; // x0
char *v11; // x3
cocos2d::CCString *v12; // x0
__int64 CString; // x0
char v14; // w1
__int64 v17; // [xsp+50h] [xbp+50h] BYREF
size_t v18; // [xsp+58h] [xbp+58h]
void *v19; // [xsp+60h] [xbp+60h]
v17 = 0;
v18 = 0;
v19 = nullptr;
v5 = strlen(a2);
v6 = v5;
v7 = a2;
if ( v5 > 0xFFFFFFFFFFFFFFEFLL )
sub_62C05C();
if ( v5 > 0x16 )
{
v8 = (v5 + 16) & 0xFFFFFFFFFFFFFFF0LL;
v9 = v8 | 1;
v10 = (char *)operator new(v8);
v17 = v9;
v7 = a2;
v11 = v10;
v19 = v10;
v18 = v6;
LABEL_4:
v11 = (char *)memcpy(v11, v7, v6);
goto LABEL_5;
}
LOBYTE(v17) = 2 * v5;
v11 = (char *)&v17 + 1;
if ( v5 )
goto LABEL_4;
LABEL_5:
v11[v6] = 0;
v12 = (cocos2d::CCString *)cocos2d::CCString::create(&v17);
CString = cocos2d::CCString::getCString(v12);
v14 = v17;
*((_QWORD *)this + 7) = CString;
if ( (v14 & 1) != 0 )
operator delete(v19);
*((_DWORD *)this + 16) = a3;
return 1;
}