//
// cocos2d::CCDictionary::allKeys from 0x180009840 to 0x180009985 (325 bytes)
//
// 4 xrefs:
// > cocos2d::CCDictionary::randomObject @ 0x18000a952
// > DS_Dictionary::setDictForKey @ 0x18001ecbd
// > ??> @ 0x1801438a8
// > ??> @ 0x1801adc9c
//
// 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
//
// Hidden C++ exception states: #wind=2
struct cocos2d::CCArray *__fastcall cocos2d::CCDictionary::allKeys(cocos2d::CCDictionary *this)
{
cocos2d::CCDictElement *m_pElements; // rax
size_t num_items; // rcx
cocos2d::CCArray *v4; // rbp
cocos2d::CCDictionary::CCDictType m_eDictType; // eax
cocos2d::CCDictElement *v6; // rbx
cocos2d::CCDictElement *i; // rdi
cocos2d::CCString *v8; // rax
struct cocos2d::CCObject *v9; // rbx
cocos2d::CCDictElement *v10; // rbx
cocos2d::CCDictElement *j; // rsi
cocos2d::CCObject *v12; // rax
cocos2d::CCObject *v13; // rdi
int m_iKey; // ebx
m_pElements = this->m_pElements;
if ( !m_pElements )
return cocos2d::CCArray::create();
num_items = m_pElements->hh.tbl->num_items;
if ( (int)num_items <= 0 )
return cocos2d::CCArray::create();
v4 = cocos2d::CCArray::createWithCapacity(num_items);
m_eDictType = this->m_eDictType;
if ( m_eDictType == kCCDictStr )
{
v6 = this->m_pElements;
if ( v6 )
{
for ( i = (cocos2d::CCDictElement *)v6->hh.next; ; i = (cocos2d::CCDictElement *)i->hh.next )
{
v8 = (cocos2d::CCString *)operator new(0x58u);
v9 = v8 ? (struct cocos2d::CCObject *)cocos2d::CCString::CCString(v8, v6->m_szKey) : nullptr;
cocos2d::CCArray::addObject(v4, v9);
if ( v9 )
cocos2d::CCObject::release(v9);
v6 = i;
if ( !i )
break;
}
}
}
else if ( m_eDictType == kCCDictInt )
{
v10 = this->m_pElements;
if ( v10 )
{
for ( j = (cocos2d::CCDictElement *)v10->hh.next; ; j = (cocos2d::CCDictElement *)j->hh.next )
{
v12 = (cocos2d::CCObject *)operator new(0x40u);
v13 = v12;
if ( v12 )
{
m_iKey = v10->m_iKey;
cocos2d::CCObject::CCObject(v12);
v13->__vftable = (cocos2d::CCObject_vtbl *)&cocos2d::CCInteger::`vftable';
LODWORD(v13[1].__vftable) = m_iKey;
}
else
{
v13 = nullptr;
}
cocos2d::CCArray::addObject(v4, v13);
if ( v13 )
cocos2d::CCObject::release(v13);
v10 = j;
if ( !j )
break;
}
}
}
return v4;
}