// // GameSettingsLayer::valueDidChange from 0x1402c70b0 to 0x1402c749c (1004 bytes) // // 2 xrefs: // > @ 0x140766270 // > @ 0x14091dbe8 // // 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:29:22 +0000 // // Hidden C++ exception states: #wind=8 unsigned __int64 __fastcall GameSettingsLayer::valueDidChange(_QWORD *a1, int a2, float a3) { unsigned __int8 v5; // bp unsigned __int64 v6; // rdx __int64 v7; // rcx unsigned __int64 result; // rax __int64 v9; // rbx __int64 v10; // r8 __int64 v11; // rcx __int64 v12; // rcx __int64 v13; // rbx __int64 v14; // rcx unsigned __int8 v15; // bl cocos2d::CCString *v16; // rax __int64 v17; // rcx __int64 v18; // rcx __int64 v19; // rcx void *v20; // [rsp+20h] [rbp-58h] void *v21; // [rsp+20h] [rbp-58h] void *v22; // [rsp+20h] [rbp-58h] void *v23; // [rsp+20h] [rbp-58h] void *v24; // [rsp+20h] [rbp-58h] void *v25; // [rsp+20h] [rbp-58h] void *v26; // [rsp+20h] [rbp-58h] _BYTE v27[32]; // [rsp+28h] [rbp-50h] BYREF v5 = a3 != 0.0; switch ( a2 ) { case -4: result = qword_14090BFD0; if ( !qword_14090BFD0 ) { v26 = operator new(0x6E8u); qword_14090BFD0 = GameManager::GameManager((__int64)v26); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0); result = qword_14090BFD0; } *(float *)(result + 1140) = a3; break; case -3: v19 = qword_14090BF60; if ( !qword_14090BF60 ) { v25 = operator new(0x8A8u); qword_14090BF60 = FMODAudioEngine::FMODAudioEngine((__int64)v25); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BF60 + 72LL))(qword_14090BF60); v19 = qword_14090BF60; } result = (unsigned int)(int)a3; *(_DWORD *)(v19 + 620) = result; break; case -2: v13 = qword_14090BFE0; if ( !qword_14090BFE0 ) { v20 = operator new(0x3E8u); qword_14090BFE0 = sub_1402D6480(v20); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0); v13 = qword_14090BFE0; } if ( (unsigned __int8)GameStatsManager::isItemUnlocked(a1, 12, 17) ) { GameStatsManager::getItemKey(v14, v27, 17, 12, v20); v16 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(*(_QWORD *)(v13 + 896), v27); v15 = cocos2d::CCString::boolValue(v16); sub_14003D310((__int64)v27); } else { v15 = 0; } if ( !qword_14090BFE0 ) { v23 = operator new(0x3E8u); qword_14090BFE0 = sub_1402D6480(v23); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0); } result = GameStatsManager::isItemUnlocked(v14, 12, 17); if ( (_BYTE)result ) { if ( v15 != v5 ) { v17 = qword_14090BFE0; if ( !qword_14090BFE0 ) { v24 = operator new(0x3E8u); qword_14090BFE0 = sub_1402D6480(v24); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0); v17 = qword_14090BFE0; } result = GameStatsManager::toggleEnableItem(v17, 12, 17, v5); v18 = a1[135]; if ( v18 ) return (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v18 + 1440LL))(v18); } } else { (*(void (__fastcall **)(_QWORD *, __int64, _QWORD))(*a1 + 1152LL))(a1, 4294967294LL, v15); return GameSettingsLayer::showPracticeMusicSyncUnlockInfo(a1); } break; case -1: result = qword_14090BFD0; if ( !qword_14090BFD0 ) { v22 = operator new(0x6E8u); qword_14090BFD0 = GameManager::GameManager((__int64)v22); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0); result = qword_14090BFD0; } *(_BYTE *)(result + 956) = v5; v12 = a1[135]; if ( v12 ) return (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v12 + 1416LL))(v12); break; default: v6 = a1[142] & (0x100000001B3LL * (HIBYTE(a2) ^ (0x100000001B3LL * (BYTE2(a2) ^ (0x100000001B3LL * ((0x100000001B3LL * ((unsigned __int8)a2 ^ 0xCBF29CE484222325uLL)) ^ BYTE1(a2))))))); v7 = a1[139]; result = 2 * (a1[142] & (0x100000001B3LL * (HIBYTE(a2) ^ (0x100000001B3LL * (BYTE2(a2) ^ (0x100000001B3LL * ((0x100000001B3LL * ((unsigned __int8)a2 ^ 0xCBF29CE484222325uLL)) ^ BYTE1(a2)))))))); v9 = *(_QWORD *)(v7 + 16 * (a1[142] & (0x100000001B3LL * (HIBYTE(a2) ^ (0x100000001B3LL * (BYTE2(a2) ^ (0x100000001B3LL * ((0x100000001B3LL * ((unsigned __int8)a2 ^ 0xCBF29CE484222325uLL)) ^ BYTE1(a2)))))))) + 8); v10 = a1[137]; if ( v9 != v10 ) { result = *(_QWORD *)(v7 + 16 * v6); if ( a2 == *(_DWORD *)(v9 + 16) ) { LABEL_11: if ( !v9 ) v9 = a1[137]; if ( v9 != v10 ) { v11 = qword_14090BFD0; if ( !qword_14090BFD0 ) { v21 = operator new(0x6E8u); qword_14090BFD0 = GameManager::GameManager((__int64)v21); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0); v11 = qword_14090BFD0; } GameManager::setGameVariable(v11, *(_BYTE **)(v9 + 24), v5); return GameSettingsLayer::didChangeGV(a1, *(_QWORD *)(v9 + 24), v5); } return result; } while ( v9 != result ) { v9 = *(_QWORD *)(v9 + 8); if ( a2 == *(_DWORD *)(v9 + 16) ) goto LABEL_11; } } v9 = 0; goto LABEL_11; } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source