//
// GameManager::stringForCustomObject from 0x718508 to 0x718690 (392 bytes)
//
// 3 xrefs:
// > EditorUI::onCreateObject @ 0x7ca3ac
// > EditorUI::createCustomItems @ 0xbdfbb0
// > ??> @ 0x71d28
//
// 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:17 +0000
//
__int64 *__usercall GameManager::stringForCustomObject@(
GameManager *this@,
const char *a2@,
__int64 *a3@)
{
__int64 v4; // x24
cocos2d::CCString *v5; // x0
const char *CString; // x25
size_t v7; // x0
size_t v8; // x19
unsigned __int64 v9; // x0
char *v10; // x3
cocos2d::CCString *v11; // x19
const char *v12; // x0
size_t v13; // x0
char *v15; // [xsp+58h] [xbp+58h]
__int64 v16; // [xsp+60h] [xbp+60h] BYREF
size_t v17; // [xsp+68h] [xbp+68h]
void *v18; // [xsp+70h] [xbp+70h]
v4 = *((_QWORD *)this + 57);
v5 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i", a2);
v16 = 0;
CString = (const char *)cocos2d::CCString::getCString(v5);
v17 = 0;
v18 = nullptr;
v7 = strlen(CString);
v8 = v7;
if ( v7 > 0xFFFFFFFFFFFFFFEFLL )
sub_62BE7C();
if ( v7 > 0x16 )
{
v9 = (v7 + 16) & 0xFFFFFFFFFFFFFFF0LL;
v16 = v9 | 1;
v10 = (char *)operator new(v9);
v18 = v10;
v17 = v8;
LABEL_4:
v10 = (char *)memcpy(v10, CString, v8);
goto LABEL_5;
}
LOBYTE(v16) = 2 * v7;
v10 = (char *)&v16 + 1;
if ( v7 )
goto LABEL_4;
LABEL_5:
v10[v8] = 0;
v11 = (cocos2d::CCString *)cocos2d::CCDictionary::objectForKey(v4, &v16);
if ( (v16 & 1) != 0 )
{
operator delete(v18);
if ( v11 )
goto LABEL_7;
LABEL_12:
*a3 = 0;
a3[1] = 0;
a3[2] = 0;
std::string::__init(a3, &byte_11B8890, 0);
return a3;
}
if ( !v11 )
goto LABEL_12;
LABEL_7:
v12 = (const char *)cocos2d::CCString::getCString(v11);
*a3 = 0;
a3[1] = 0;
a3[2] = 0;
v15 = (char *)v12;
v13 = strlen(v12);
std::string::__init(a3, v15, v13);
return a3;
}