//
// cocos2d::CCDictionary::valueForKey from 0x18000c550 to 0x18000c607 (183 bytes)
//
// 2 xrefs:
// > ??> @ 0x1801438a8
// > ??> @ 0x1801ade34
//
// 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
//
const struct cocos2d::CCString *__fastcall cocos2d::CCDictionary::valueForKey(cocos2d::CCDictionary *this, __int64 a2)
{
struct cocos2d::CCObject *v2; // rax
__int64 v3; // rbx
void *v4; // rcx
void *Block[3]; // [rsp+30h] [rbp-38h] BYREF
unsigned __int64 v7; // [rsp+48h] [rbp-20h]
v2 = cocos2d::CCDictionary::objectForKey(this, a2);
v3 = _RTDynamicCast(v2, 0, &cocos2d::CCObject `RTTI Type Descriptor', &cocos2d::CCString `RTTI Type Descriptor', 0);
if ( !v3 )
{
sub_180005910(Block, Buf2);
v3 = cocos2d::CCString::create(Block);
if ( v7 > 0xF )
{
v4 = Block[0];
if ( v7 + 1 >= 0x1000 )
{
v4 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v4 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free_0(v4);
}
}
return (const struct cocos2d::CCString *)v3;
}