//
// cocos2d::CCDictionary::objectForKey from 0x18000a4f0 to 0x18000a86c (892 bytes)
//
// 63 xrefs:
// > CCContentManager::addDictDS @ 0x180005f45
// > cocos2d::CCDictionary::randomObject @ 0x18000aa4c
// > cocos2d::CCDictionary::valueForKey @ 0x18000c495
// > DS_Dictionary::setDictForKey @ 0x18001eeba
// > cocos2d::CCLabelAtlas::initWithString @ 0x180047766
// > cocos2d::CCLabelAtlas::initWithString @ 0x18004782d
// > cocos2d::CCLabelAtlas::initWithString @ 0x180047a3d
// > cocos2d::CCLabelAtlas::initWithString @ 0x180047b07
// > cocos2d::CCLabelAtlas::initWithString @ 0x180047bd0
// > cocos2d::FNTConfigLoadFile @ 0x180048d20
// > cocos2d::CCFileUtils::getNewFilename @ 0x180072301
// > cocos2d::CCFileUtils::loadFilenameLookupDictionaryFromFile @ 0x180072aad
// > cocos2d::CCFileUtils::loadFilenameLookupDictionaryFromFile @ 0x180072b58
// > cocos2d::CCFileUtils::loadFilenameLookupDictionaryFromFile @ 0x180072bfd
// > cocos2d::CCShaderCache::programForKey @ 0x18008c1cc
// > cocos2d::CCAnimationCache::addAnimationsWithDictionary @ 0x18008d3cf
// > cocos2d::CCAnimationCache::addAnimationsWithDictionary @ 0x18008d480
// > cocos2d::CCAnimationCache::addAnimationsWithDictionary @ 0x18008d5c2
// > cocos2d::CCAnimationCache::parseVersion1 @ 0x18008d8ea
// > cocos2d::CCAnimationCache::parseVersion2 @ 0x18008dd83
// > cocos2d::CCAnimationCache::parseVersion2 @ 0x18008df94
// > cocos2d::CCSpriteFrameCache::addSpriteFramesWithDictionary @ 0x18009392a
// > cocos2d::CCSpriteFrameCache::addSpriteFramesWithDictionary @ 0x1800939cb
// > cocos2d::CCSpriteFrameCache::addSpriteFramesWithDictionary @ 0x180093bc8
// > cocos2d::CCSpriteFrameCache::addSpriteFramesWithDictionary @ 0x18009423a
// > cocos2d::CCSpriteFrameCache::addSpriteFramesWithFile @ 0x180094981
// > cocos2d::CCSpriteFrameCache::removeSpriteFrameByName @ 0x180094f84
// > cocos2d::CCSpriteFrameCache::removeSpriteFramesFromDictionary @ 0x180095274
// > cocos2d::CCSpriteFrameCache::removeSpriteFramesFromDictionary @ 0x1800953b9
// > cocos2d::CCSpriteFrameCache::removeSpriteFramesFromTexture @ 0x1800959d0
// > cocos2d::CCSpriteFrameCache::spriteFrameByName @ 0x180095d9c
// > cocos2d::CCSpriteFrameCache::spriteFrameByName @ 0x180095eab
// > cocos2d::CCSpriteFrameCache::spriteFrameByName @ 0x180095f40
// > cocos2d::CCProfilingBeginTimingBlock @ 0x180097b80
// > cocos2d::CCProfilingEndTimingBlock @ 0x180097c77
// > cocos2d::CCProfilingResetTimingBlock @ 0x180097dab
// > cocos2d::CCComponentContainer::add @ 0x180099d82
// > cocos2d::CCComponentContainer::get @ 0x18009a105
// > cocos2d::CCTextureCache::addETCImage @ 0x1800aae62
// > cocos2d::CCTextureCache::addImage @ 0x1800ab294
// > cocos2d::CCTextureCache::addImageAsync @ 0x1800aba85
// > cocos2d::CCTextureCache::addPVRImage @ 0x1800ac1e2
// > cocos2d::CCTextureCache::addUIImage @ 0x1800ac5e5
// > cocos2d::CCTextureCache::reloadTexture @ 0x1800acf28
// > cocos2d::CCTextureCache::textureForKey @ 0x1800ad518
// > cocos2d::CCTextureCache::textureForKey @ 0x1800ad5a4
// > cocos2d::CCTileMapAtlas::setTile @ 0x1800aed10
// > cocos2d::CCTMXLayer::propertyNamed @ 0x1800b028f
// > cocos2d::CCTMXObjectGroup::objectNamed @ 0x1800b12f6
// > cocos2d::CCTMXObjectGroup::propertyNamed @ 0x1800b13fc
// > cocos2d::CCTMXTiledMap::propertyNamed @ 0x1800b1d8f
// > cocos2d::CCConfiguration::getBool @ 0x1800c07f9
// > cocos2d::CCConfiguration::getCString @ 0x1800c0923
// > cocos2d::CCConfiguration::getNumber @ 0x1800c0a28
// > cocos2d::CCConfiguration::getObject @ 0x1800c0b7c
// > cocos2d::CCConfiguration::loadConfigFile @ 0x1800c0f6a
// > cocos2d::CCConfiguration::loadConfigFile @ 0x1800c1038
// > cocos2d::CCConfiguration::loadConfigFile @ 0x1800c1106
// > cocos2d::CCConfiguration::loadConfigFile @ 0x1800c11d5
// > ??> @ 0x18013a9f0
// > ??> @ 0x18013aa58
// > ??> @ 0x18014cf68
// > ??> @ 0x1801b7ce4
//
// This function is hookable on this platform (idp: pc, 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 11:21:19 +0000
//
__int64 __fastcall cocos2d::CCDictionary::objectForKey(__int64 a1, __int64 a2)
{
__int64 v5; // r12
int v6; // esi
int v7; // edi
unsigned int v8; // r14d
const char *v9; // rcx
unsigned __int8 *v10; // rbp
unsigned int v11; // r15d
__int64 v12; // r8
int v13; // r14d
unsigned int v14; // esi
int v15; // eax
int v16; // ecx
int v17; // edi
unsigned int v18; // r14d
unsigned int v19; // esi
int v20; // edi
unsigned int v21; // r14d
unsigned int v22; // esi
const char *v23; // rcx
unsigned int v24; // esi
int v25; // edi
unsigned int v26; // r14d
unsigned int v27; // esi
int v28; // edi
unsigned int v29; // r14d
unsigned int v30; // esi
int v31; // edi
unsigned __int64 v32; // rcx
__int64 v33; // r14
__int64 v34; // rdi
__int64 v35; // r14
__int64 v36; // rdi
unsigned __int64 v37; // rbp
const char *v38; // rcx
const char *v39; // rcx
const void *v40; // rsi
size_t v41; // rax
__int64 v42; // rax
if ( !*(_DWORD *)(a1 + 64) )
return 0;
v5 = 0;
if ( *(_QWORD *)(a1 + 56) )
{
v6 = -17973521;
v7 = -1640531527;
v8 = -1640531527;
if ( *(_QWORD *)(a2 + 24) <= 0xFu )
{
v10 = (unsigned __int8 *)a2;
v9 = (const char *)a2;
}
else
{
v9 = *(const char **)a2;
v10 = *(unsigned __int8 **)a2;
}
v11 = strlen(v9);
if ( v11 >= 0xC )
{
v12 = v11 / 0xC;
do
{
v11 -= 12;
v13 = v10[4] + ((v10[5] + ((v10[6] + (v10[7] << 8)) << 8)) << 8) + v8;
v14 = v10[8] + ((v10[9] + ((v10[10] + (v10[11] << 8)) << 8)) << 8) + v6;
v15 = *v10;
v16 = (v10[1] + ((v10[2] + (v10[3] << 8)) << 8)) << 8;
v10 += 12;
v17 = (v14 >> 13) ^ (v15 + v16 - v14 - v13 + v7);
v18 = (v17 << 8) ^ (v13 - v17 - v14);
v19 = (v18 >> 13) ^ (v14 - v18 - v17);
v20 = (v19 >> 12) ^ (v17 - v19 - v18);
v21 = (v20 << 16) ^ (v18 - v20 - v19);
v22 = (v21 >> 5) ^ (v19 - v21 - v20);
v7 = (v22 >> 3) ^ (v20 - v22 - v21);
v8 = (v7 << 10) ^ (v21 - v22 - v7);
v6 = (v8 >> 15) ^ (v22 - v8 - v7);
--v12;
}
while ( v12 );
}
v23 = (const char *)a2;
if ( *(_QWORD *)(a2 + 24) > 0xFu )
v23 = *(const char **)a2;
v24 = strlen(v23) + v6;
switch ( v11 )
{
case 1u:
goto LABEL_23;
case 2u:
goto LABEL_22;
case 3u:
goto LABEL_21;
case 4u:
goto LABEL_20;
case 5u:
goto LABEL_19;
case 6u:
goto LABEL_18;
case 7u:
goto LABEL_17;
case 8u:
goto LABEL_16;
case 9u:
goto LABEL_15;
case 0xAu:
goto LABEL_14;
case 0xBu:
v24 += v10[10] << 24;
LABEL_14:
v24 += v10[9] << 16;
LABEL_15:
v24 += v10[8] << 8;
LABEL_16:
v8 += v10[7] << 24;
LABEL_17:
v8 += v10[6] << 16;
LABEL_18:
v8 += v10[5] << 8;
LABEL_19:
v8 += v10[4];
LABEL_20:
v7 += v10[3] << 24;
LABEL_21:
v7 += v10[2] << 16;
LABEL_22:
v7 += v10[1] << 8;
LABEL_23:
v7 += *v10;
break;
default:
break;
}
v25 = (v24 >> 13) ^ (v7 - v8 - v24);
v26 = (v25 << 8) ^ (v8 - v25 - v24);
v27 = (v26 >> 13) ^ (v24 - v25 - v26);
v28 = (v27 >> 12) ^ (v25 - v27 - v26);
v29 = (v28 << 16) ^ (v26 - v28 - v27);
v30 = (v29 >> 5) ^ (v27 - v29 - v28);
v31 = (v30 >> 3) ^ (v28 - v30 - v29);
v32 = (v29 - v31 - v30) ^ (v31 << 10);
v33 = *(_QWORD *)(*(_QWORD *)(a1 + 56) + 272LL);
v34 = *(_QWORD *)(*(_QWORD *)v33
+ 16 * ((unsigned int)(*(_DWORD *)(v33 + 8) - 1) & ((v32 >> 15) ^ (v30 - (unsigned int)v32 - v31))));
if ( v34 )
{
v35 = *(_QWORD *)(v33 + 32);
v36 = v34 - v35;
if ( v36 )
{
v37 = *(_QWORD *)(a2 + 24);
while ( 1 )
{
v38 = (const char *)a2;
if ( v37 > 0xF )
v38 = *(const char **)a2;
if ( *(_DWORD *)(v36 + 320) == strlen(v38) )
{
v39 = (const char *)a2;
if ( v37 <= 0xF )
{
v40 = (const void *)a2;
}
else
{
v40 = *(const void **)a2;
v39 = *(const char **)a2;
}
v41 = strlen(v39);
if ( !memcmp(*(const void **)(v36 + 312), v40, v41) )
break;
}
v42 = *(_QWORD *)(v36 + 304);
if ( v42 )
{
v36 = v42 - v35;
if ( v42 != v35 )
continue;
}
return v5;
}
return *(_QWORD *)(v36 + 264);
}
}
}
return v5;
}