//
// GameLevelManager::getIntForKey from 0x804bf0 to 0x804d14 (292 bytes)
//
// 11 xrefs:
// > MoreSearchLayer::updateAudioLabel @ 0x7def98
// > MoreSearchLayer::updateAudioLabel @ 0x7defac
// > MoreSearchLayer::audioNext @ 0x7df12c
// > MoreSearchLayer::audioPrevious @ 0x7df178
// > LevelSearchLayer::getSearchObject @ 0x7dff94
// > LevelSearchLayer::getSearchObject @ 0x7dffa8
// > LevelSearchLayer::getSearchObject @ 0x7e0078
// > MoreSearchLayer::init @ 0x7e1a7c
// > LevelSearchLayer::init @ 0x7e3e54
// > DemonFilterSelectLayer::init @ 0x7e47b8
// > ??> @ 0x753a0
//
// 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 GameLevelManager::getIntForKey(GameLevelManager *this, const char *a2)
{
__int64 v2; // x23
size_t v3; // x0
size_t v4; // x19
const char *v5; // x1
unsigned __int64 v6; // x0
__int64 v7; // x22
char *v8; // x0
char *v9; // x3
cocos2d::CCString *v10; // x0
unsigned int v11; // w19
__int64 v14; // [xsp+50h] [xbp+50h] BYREF
size_t v15; // [xsp+58h] [xbp+58h]
void *v16; // [xsp+60h] [xbp+60h]
v2 = *((_QWORD *)this + 94);
v14 = 0;
v15 = 0;
v16 = nullptr;
v3 = strlen(a2);
v4 = v3;
v5 = a2;
if ( v3 > 0xFFFFFFFFFFFFFFEFLL )
sub_62C79C();
if ( v3 > 0x16 )
{
v6 = (v3 + 16) & 0xFFFFFFFFFFFFFFF0LL;
v7 = v6 | 1;
v8 = (char *)operator new(v6);
v14 = v7;
v5 = a2;
v9 = v8;
v16 = v8;
v15 = v4;
LABEL_4:
v9 = (char *)memcpy(v9, v5, v4);
goto LABEL_5;
}
LOBYTE(v14) = 2 * v3;
v9 = (char *)&v14 + 1;
if ( v3 )
goto LABEL_4;
LABEL_5:
v9[v4] = 0;
v10 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v2, &v14);
v11 = cocos2d::CCString::intValue(v10);
if ( (v14 & 1) != 0 )
operator delete(v16);
return v11;
}