//
// cocos2d::CCConfiguration::getNumber from 0x1800c09f0 to 0x1800c0b44 (340 bytes)
//
// 3 xrefs:
// > cocos2d::CCDirector::setDefaultValues @ 0x1800c2ccc
// > ??> @ 0x18014cf68
// > ??> @ 0x1801c3378
//
// 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:22:25 +0000
//
// Hidden C++ exception states: #wind=1
double __fastcall cocos2d::CCConfiguration::getNumber(cocos2d::CCConfiguration *this, char *a2, double a3)
{
__int64 v4; // rdi
void *v5; // r8
__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_180005A10(Block, a2);
v4 = cocos2d::CCDictionary::objectForKey(*((_QWORD *)this + 11), (__int64)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 )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free_0(v5);
}
si128 = _mm_load_si128((const __m128i *)&xmmword_1800EC500);
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;
}