//
// KeybindingsLayer::objectsForPage from 0x10060b3a0 to 0x10060b55d (445 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
cocos2d::CCArray *__fastcall KeybindingsLayer::objectsForPage(KeybindingsLayer *a1, int a2)
{
double v2; // xmm0_8
cocos2d::CCDictionary *m_values; // r14
cocos2d::CCString *v4; // rax
const char *CString; // r13
size_t v6; // rax
size_t v7; // r12
char *v8; // r14
size_t v9; // r15
__int64 v10; // rdi
cocos2d::CCArray *v11; // rbx
cocos2d::CCDictionary *v12; // r13
cocos2d::CCString *v13; // rax
const char *v14; // r12
size_t v15; // rax
size_t v16; // r14
char *v17; // r13
size_t v18; // r15
char v20; // [rsp+0h] [rbp-50h]
__int64 v22; // [rsp+8h] [rbp-48h]
__int64 v23; // [rsp+8h] [rbp-48h]
size_t __dst; // [rsp+10h] [rbp-40h] BYREF
size_t v25; // [rsp+18h] [rbp-38h]
void *__p; // [rsp+20h] [rbp-30h]
m_values = a1->m_values;
v4 = (cocos2d::CCString *)sub_1007AB580("object_%i", v20);
CString = cocos2d::CCString::getCString(v4);
v6 = strlen(CString);
if ( v6 >= 0xFFFFFFFFFFFFFFF8LL )
goto LABEL_23;
v7 = v6;
v22 = (__int64)m_values;
if ( v6 >= 0x17 )
{
v9 = 26;
if ( (v6 | 7) != 0x17 )
v9 = (v6 | 7) + 1;
v8 = (char *)operator new(v9);
__p = v8;
__dst = v9 + 1;
v25 = v7;
goto LABEL_8;
}
LOBYTE(__dst) = 2 * v6;
v8 = (char *)&__dst + 1;
if ( v6 )
LABEL_8:
memmove(v8, CString, v7);
v8[v7] = 0;
v10 = v22;
v11 = (cocos2d::CCArray *)cocos2d::CCDictionary::objectForKey_1(v22, (char *)&__dst);
if ( (__dst & 1) != 0 )
{
v10 = (__int64)__p;
operator delete(__p);
}
if ( !v11 )
{
v11 = (cocos2d::CCArray *)sub_10071F9E0(v10, &__dst);
v12 = a1->m_values;
v13 = (cocos2d::CCString *)sub_1007AB580("object_%i", (char)a1);
v14 = cocos2d::CCString::getCString(v13);
v15 = strlen(v14);
if ( v15 < 0xFFFFFFFFFFFFFFF8LL )
{
v16 = v15;
v23 = (__int64)v12;
if ( v15 >= 0x17 )
{
v18 = 26;
if ( (v15 | 7) != 0x17 )
v18 = (v15 | 7) + 1;
v17 = (char *)operator new(v18);
__p = v17;
__dst = v18 + 1;
v25 = v16;
}
else
{
LOBYTE(__dst) = 2 * v15;
v17 = (char *)&__dst + 1;
if ( !v15 )
{
LABEL_20:
v17[v16] = 0;
cocos2d::CCDictionary::setObject_1(v23, v11, (char *)&__dst);
if ( (__dst & 1) != 0 )
operator delete(__p);
return v11;
}
}
memmove(v17, v14, v16);
goto LABEL_20;
}
LABEL_23:
sub_100006BF0(v2);
}
return v11;
}