//
// cocos2d::CCUserDefault::setDoubleForKey from 0x1006b0820 to 0x1006b0902 (226 bytes)
//
// 1 xrefs:
// > cocos2d::CCUserDefault::getDoubleForKey @ 0x1006b06e7
//
// 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 12:35:24 +0000
//
id __fastcall cocos2d::CCUserDefault::setDoubleForKey(double a1, __int64 a2, char *a3)
{
_QWORD *v4; // rax
__int64 v5; // r14
__int64 v6; // rdi
const char *data; // rsi
NSUserDefaults *v8; // r14
NSNumber *v9; // r15
NSString *v10; // rax
__int64 v12[5]; // [rsp+8h] [rbp-28h] BYREF
v12[0] = 0;
v4 = (_QWORD *)sub_1006AFEB0(a3, v12);
if ( v4 )
{
v5 = v12[0];
v6 = v4[2];
sub_10005C340(v6, v4);
cocos2d::CCUserDefault::sharedUserDefault(v6);
if ( (*(_BYTE *)&stru_100BE8C08.__r_.__value_.__s.0 & 1) != 0 )
data = stru_100BE8C08.__r_.__value_.__l.__data_;
else
data = stru_100BE8C08.__r_.__value_.__s.__data_;
sub_10005FED0(v5, data, 0);
if ( v5 )
(*(void (__fastcall **)(__int64))(*(_QWORD *)v5 + 136LL))(v5);
}
v8 = +[NSUserDefaults standardUserDefaults](&OBJC_CLASS___NSUserDefaults, "standardUserDefaults");
v9 = +[NSNumber numberWithDouble:](&OBJC_CLASS___NSNumber, "numberWithDouble:", a1);
v10 = +[NSString stringWithUTF8String:](&OBJC_CLASS___NSString, "stringWithUTF8String:", a3);
return -[NSUserDefaults setObject:forKey:](v8, "setObject:forKey:", v9, v10);
}