//
// cocos2d::CCUserDefault::setDoubleForKey from 0x1005def10 to 0x1005deff2 (226 bytes)
//
// 1 xrefs:
// > cocos2d::CCUserDefault::getDoubleForKey @ 0x1005dedd7
//
// 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
//
void __fastcall cocos2d::CCUserDefault::setDoubleForKey(cocos2d::CCUserDefault *a1, const char *a2, double a3)
{
_QWORD *v4; // rax
__int64 v5; // r14
const char *data; // rsi
NSUserDefaults *v7; // r14
NSNumber *v8; // r15
NSString *v9; // rax
__int64 v10[5]; // [rsp+8h] [rbp-28h] BYREF
v10[0] = 0;
v4 = (_QWORD *)sub_1005DE5A0((char *)a2, v10);
if ( v4 )
{
v5 = v10[0];
sub_100094F30(v4[2], v4);
cocos2d::CCUserDefault::sharedUserDefault();
if ( (*(_BYTE *)&stru_1009A4FD0.__r_.__value_.__s.0 & 1) != 0 )
data = stru_1009A4FD0.__r_.__value_.__l.__data_;
else
data = stru_1009A4FD0.__r_.__value_.__s.__data_;
sub_100098AC0(v5, data, 0);
if ( v5 )
(*(void (__fastcall **)(__int64))(*(_QWORD *)v5 + 136LL))(v5);
}
v7 = +[NSUserDefaults standardUserDefaults](&OBJC_CLASS___NSUserDefaults, "standardUserDefaults");
v8 = +[NSNumber numberWithDouble:](&OBJC_CLASS___NSNumber, "numberWithDouble:", a3);
v9 = +[NSString stringWithUTF8String:](&OBJC_CLASS___NSString, "stringWithUTF8String:", a2);
-[NSUserDefaults setObject:forKey:](v7, "setObject:forKey:", v8, v9);
}