//
// StatsObject::create from 0x14014e7a0 to 0x14014e8d3 (307 bytes)
//
// 20 xrefs:
// > StatsLayer::customSetup @ 0x140669373
// > StatsLayer::customSetup @ 0x1406693d6
// > StatsLayer::customSetup @ 0x140669439
// > StatsLayer::customSetup @ 0x14066949c
// > StatsLayer::customSetup @ 0x1406694ff
// > StatsLayer::customSetup @ 0x140669562
// > StatsLayer::customSetup @ 0x1406695c5
// > StatsLayer::customSetup @ 0x140669628
// > StatsLayer::customSetup @ 0x14066968b
// > StatsLayer::customSetup @ 0x1406696ee
// > StatsLayer::customSetup @ 0x140669751
// > StatsLayer::customSetup @ 0x1406697b4
// > StatsLayer::customSetup @ 0x140669817
// > StatsLayer::customSetup @ 0x14066987a
// > StatsLayer::customSetup @ 0x1406698dd
// > StatsLayer::customSetup @ 0x140669940
// > StatsLayer::customSetup @ 0x1406699a3
// > StatsLayer::customSetup @ 0x140669a06
// > StatsLayer::customSetup @ 0x140669ab3
// > ??> @ 0x1409176cc
//
// This function is hookable on this platform (idp: pc, 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:27:16 +0000
//
// Hidden C++ exception states: #wind=2
_OWORD *__fastcall StatsObject::create(_BYTE *a1, int a2)
{
_OWORD *v4; // rbx
size_t v5; // r8
cocos2d::CCString *v6; // rax
void *v7; // rcx
void *Block[2]; // [rsp+38h] [rbp-30h] BYREF
__int64 v10; // [rsp+48h] [rbp-20h]
unsigned __int64 v11; // [rsp+50h] [rbp-18h]
v4 = operator new(0x48u);
*v4 = 0;
v4[1] = 0;
v4[2] = 0;
v4[3] = 0;
*((_QWORD *)v4 + 8) = 0;
cocos2d::CCObject::CCObject((cocos2d::CCObject *)v4);
*(_QWORD *)v4 = &StatsObject::`vftable';
*(_OWORD *)Block = 0;
v10 = 0;
v11 = 0;
v5 = -1;
do
++v5;
while ( a1[v5] );
sub_14003D230(Block, a1, v5);
v6 = (cocos2d::CCString *)cocos2d::CCString::create(Block);
*((_QWORD *)v4 + 7) = cocos2d::CCString::getCString(v6);
if ( v11 > 0xF )
{
v7 = Block[0];
if ( v11 + 1 >= 0x1000 )
{
v7 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v7 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v7);
}
*((_DWORD *)v4 + 16) = a2;
cocos2d::CCObject::autorelease((cocos2d::CCObject *)v4);
return v4;
}