//
// cocos2d::CCUserDefault::sharedUserDefault from 0x1006b0d20 to 0x1006b0dd2 (178 bytes)
//
// 26 xrefs:
// > sub_10059A8E0 @ 0x10059aa8c
// > sub_10059B800 @ 0x10059b8e7
// > sub_10059BB70 @ 0x10059bb79
// > sub_10059BBA0 @ 0x10059bba9
// > sub_10059BD90 @ 0x10059be88
// > sub_10059BD90 @ 0x10059bf43
// > sub_10059BFA0 @ 0x10059bfb5
// > sub_10059BFA0 @ 0x10059c06b
// > sub_10059BFA0 @ 0x10059c098
// > cocos2d::CCUserDefault::getBoolForKey @ 0x1006afdbb
// > cocos2d::CCUserDefault::getBoolForKey @ 0x1006afde2
// > sub_1006AFEB0 @ 0x1006aff2f
// > sub_1006AFEB0 @ 0x1006b0004
// > cocos2d::CCUserDefault::setBoolForKey @ 0x1006b008e
// > cocos2d::CCUserDefault::getIntegerForKey @ 0x1006b020f
// > cocos2d::CCUserDefault::getIntegerForKey @ 0x1006b0236
// > cocos2d::CCUserDefault::setIntegerForKey @ 0x1006b034e
// > cocos2d::CCUserDefault::getFloatForKey @ 0x1006b0493
// > cocos2d::CCUserDefault::getFloatForKey @ 0x1006b04ba
// > cocos2d::CCUserDefault::setFloatForKey @ 0x1006b05d0
// > cocos2d::CCUserDefault::getDoubleForKey @ 0x1006b071f
// > cocos2d::CCUserDefault::getDoubleForKey @ 0x1006b0746
// > cocos2d::CCUserDefault::setDoubleForKey @ 0x1006b0860
// > cocos2d::CCUserDefault::getStringForKey @ 0x1006b09d6
// > cocos2d::CCUserDefault::getStringForKey @ 0x1006b0a80
// > cocos2d::CCUserDefault::setStringForKey @ 0x1006b0c6d
//
// 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
//
void *cocos2d::CCUserDefault::sharedUserDefault()
{
void *result; // rax
NSArray *v1; // rax
id v2; // rax
const std::string::value_type *v3; // rax
if ( byte_100BE8C20 )
{
result = qword_100BE8C00;
if ( qword_100BE8C00 )
return result;
LABEL_5:
result = operator new(1u);
qword_100BE8C00 = result;
return result;
}
v1 = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, 1u, 1);
v2 = -[NSArray objectAtIndex:](v1, "objectAtIndex:", 0);
v3 = (const std::string::value_type *)objc_msgSend(v2, "UTF8String");
std::string::assign(&stru_100BE8C08, v3);
std::string::append(&stru_100BE8C08, "/");
std::string::append(&stru_100BE8C08, "UserDefault.xml");
byte_100BE8C20 = 1;
result = qword_100BE8C00;
if ( !qword_100BE8C00 )
goto LABEL_5;
return result;
}