//
// cocos2d::CCConfiguration::getNumber from 0x1800bd250 to 0x1800bd38e (318 bytes)
//
// 4 xrefs:
// > cocos2d::CCDirector::setDefaultValues @ 0x1800bf477
// > ??> @ 0x1801438a8
// > ??> @ 0x1801b90b4
// > ??> @ 0x1801b90c0
//
// 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=1
double __fastcall cocos2d::CCConfiguration::getNumber(cocos2d::CCConfiguration *this, char *a2, double a3)
{
__int64 v4; // rbx
void *v5; // rcx
__int64 v6; // rax
__int64 v8; // rax
cocos2d::CCString *v9; // rax
void *Block[2]; // [rsp+30h] [rbp-48h] BYREF
__m128i si128; // [rsp+40h] [rbp-38h]
sub_180005910(Block, a2);
v4 = cocos2d::CCDictionary::objectForKey(*((_QWORD *)this + 11), (unsigned __int8 *)Block);
if ( si128.m128i_i64[1] > 0xFuLL )
{
v5 = Block[0];
if ( (unsigned __int64)(si128.m128i_i64[1] + 1) >= 0x1000 )
{
v5 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v5 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free_0(v5);
}
si128 = _mm_load_si128((const __m128i *)&xmmword_1800E7160);
LOBYTE(Block[0]) = 0;
if ( !v4 )
return a3;
v6 = _RTDynamicCast(v4, 0, &cocos2d::CCObject `RTTI Type Descriptor', &cocos2d::CCDouble `RTTI Type Descriptor', 0);
if ( v6 )
return *(double *)(v6 + 56);
v8 = _RTDynamicCast(v4, 0, &cocos2d::CCObject `RTTI Type Descriptor', &cocos2d::CCInteger `RTTI Type Descriptor', 0);
if ( v8 )
return (double)*(int *)(v8 + 56);
v9 = (cocos2d::CCString *)_RTDynamicCast(
v4,
0,
&cocos2d::CCObject `RTTI Type Descriptor',
&cocos2d::CCString `RTTI Type Descriptor',
0);
if ( v9 )
return cocos2d::CCString::doubleValue(v9);
else
return a3;
}