//
// GJGameLevel::setLastBuildPageForTab from 0x8052bc to 0x805400 (324 bytes)
//
// 2 xrefs:
// > EditorUI::onPause @ 0x7ceb44
// > ??> @ 0x49d08
//
// 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:54:45 +0000
//
__int64 __fastcall GJGameLevel::setLastBuildPageForTab(GJGameLevel *this, const char *a2, unsigned int a3)
{
__int64 v3; // x24
cocos2d::CCObject *v4; // x23
cocos2d::CCString *v5; // x0
const char *CString; // x25
size_t v7; // x0
size_t v8; // x19
unsigned __int64 v9; // x0
char *v10; // x3
__int64 v13; // [xsp+60h] [xbp+60h] BYREF
size_t v14; // [xsp+68h] [xbp+68h]
void *v15; // [xsp+70h] [xbp+70h]
v3 = *((_QWORD *)this + 40);
v4 = (cocos2d::CCObject *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i", a2);
v5 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i", (const char *)a3);
v13 = 0;
CString = (const char *)cocos2d::CCString::getCString(v5);
v14 = 0;
v15 = nullptr;
v7 = strlen(CString);
v8 = v7;
if ( v7 > 0xFFFFFFFFFFFFFFEFLL )
sub_62C79C();
if ( v7 > 0x16 )
{
v9 = (v7 + 16) & 0xFFFFFFFFFFFFFFF0LL;
v13 = v9 | 1;
v10 = (char *)operator new(v9);
v15 = v10;
v14 = v8;
LABEL_4:
v10 = (char *)memcpy(v10, CString, v8);
goto LABEL_5;
}
LOBYTE(v13) = 2 * v7;
v10 = (char *)&v13 + 1;
if ( v7 )
goto LABEL_4;
LABEL_5:
v10[v8] = 0;
cocos2d::CCDictionary::setObject(v3, v4);
if ( (v13 & 1) != 0 )
operator delete(v15);
return _stack_chk_guard;
}