// // cocos2d::CCUserDefault::getFloatForKey from 0x1006b0400 to 0x1006b058c (396 bytes) // // 1 xrefs: // > cocos2d::CCUserDefault::getFloatForKey_1 @ 0x1006b03f8 // // 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 // float __fastcall cocos2d::CCUserDefault::getFloatForKey(float result, __int64 a2, char *a3) { _QWORD *v4; // rax _QWORD *v5; // r14 __int64 v6; // rdi const char *v7; // rdi float v8; // xmm0_4 NSUserDefaults *v9; // rax __int64 v10; // rbx __int64 v11; // rdi const char *data; // rsi __int64 v13; // r15 __int64 v14; // rdi const char *v15; // rsi NSUserDefaults *v16; // r14 NSString *v17; // rax id v18; // rax __int64 v19; // [rsp+8h] [rbp-28h] BYREF float v20; // [rsp+14h] [rbp-1Ch] v20 = result; v19 = 0; v4 = (_QWORD *)sub_1006AFEB0(a3, &v19); if ( v4 ) { v5 = v4; v6 = v4[6]; if ( v6 ) { v7 = (const char *)sub_10005AD20((int *)(v6 + 24)); v8 = atof(v7); v20 = v8; cocos2d::CCUserDefault::setFloatForKey(v7, a3); v9 = +[NSUserDefaults standardUserDefaults](&OBJC_CLASS___NSUserDefaults, "standardUserDefaults"); -[NSUserDefaults synchronize](v9, "synchronize"); v10 = v19; v11 = v5[2]; sub_10005C340(v11, v5); cocos2d::CCUserDefault::sharedUserDefault(v11); 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(v10, data, 0); if ( v10 ) (*(void (__fastcall **)(__int64))(*(_QWORD *)v10 + 136LL))(v10); return v20; } v13 = v19; v14 = v4[2]; sub_10005C340(v14, v4); cocos2d::CCUserDefault::sharedUserDefault(v14); if ( (*(_BYTE *)&stru_100BE8C08.__r_.__value_.__s.0 & 1) != 0 ) v15 = stru_100BE8C08.__r_.__value_.__l.__data_; else v15 = stru_100BE8C08.__r_.__value_.__s.__data_; sub_10005FED0(v13, v15, 0); if ( v13 ) (*(void (__fastcall **)(__int64))(*(_QWORD *)v13 + 136LL))(v13); } v16 = +[NSUserDefaults standardUserDefaults](&OBJC_CLASS___NSUserDefaults, "standardUserDefaults"); v17 = +[NSString stringWithUTF8String:](&OBJC_CLASS___NSString, "stringWithUTF8String:", a3); v18 = -[NSUserDefaults objectForKey:](v16, "objectForKey:", v17); if ( v18 ) { objc_msgSend(v18, "floatValue"); return result; } return v20; }
GD Web Decomp Icon

GD Web Decomp

Raw Source