//
// cocos2d::CCConfiguration::getNumber from 0x10051a050 to 0x10051a193 (323 bytes)
//
// 1 xrefs:
// > cocos2d::CCDirector::setDefaultValues @ 0x100482877
//
// 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
//
double __fastcall cocos2d::CCConfiguration::getNumber(cocos2d::CCConfiguration *a1, const char *a2, double a3)
{
__int64 v3; // rbx
size_t v4; // rax
size_t v5; // r15
char *v6; // r12
size_t v7; // r13
const void *v8; // rbx
double *v9; // rax
int *v10; // rax
cocos2d::CCString *v11; // rax
_QWORD __dst[2]; // [rsp+10h] [rbp-40h] BYREF
void *__p; // [rsp+20h] [rbp-30h]
v3 = *(_QWORD *)&a1[1].m_uIndexInArray;
v4 = strlen(a2);
if ( v4 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100006BF0(a3);
v5 = v4;
if ( v4 >= 0x17 )
{
v7 = 26;
if ( (v4 | 7) != 0x17 )
v7 = (v4 | 7) + 1;
v6 = (char *)operator new(v7);
__p = v6;
__dst[0] = v7 + 1;
__dst[1] = v5;
goto LABEL_8;
}
LOBYTE(__dst[0]) = 2 * v4;
v6 = (char *)__dst + 1;
if ( v4 )
LABEL_8:
memcpy(v6, a2, v5);
v6[v5] = 0;
v8 = (const void *)cocos2d::CCDictionary::objectForKey_1(v3, (char *)__dst);
if ( (__dst[0] & 1) != 0 )
operator delete(__p);
if ( v8 )
{
v9 = (double *)__dynamic_cast(
v8,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCObject,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCDouble,
0);
if ( v9 )
{
return v9[7];
}
else
{
v10 = (int *)__dynamic_cast(
v8,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCObject,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCInteger,
0);
if ( v10 )
{
return (double)v10[14];
}
else
{
v11 = (cocos2d::CCString *)__dynamic_cast(
v8,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCObject,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCString,
0);
if ( v11 )
return cocos2d::CCString::doubleValue(v11);
}
}
}
return a3;
}