// // CharacterColorPage::updateColorMode from 0x100153798 to 0x100153ab8 (800 bytes) // // 2 xrefs: // > CharacterColorPage::init @ 0x100152fd4 // > CharacterColorPage::onMode @ 0x1001531a0 // // This function is hookable on this platform (idp: arm, 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 10:59:40 +0000 // __int64 __fastcall CharacterColorPage::updateColorMode(__int64 a1, int a2) { __int64 v3; // x0 int v4; // w20 int v5; // w21 __int64 v6; // x0 int v7; // w22 int v8; // w23 __int64 v9; // x0 __int64 v10; // x8 __int64 v11; // x24 int v12; // w25 int v13; // w26 int v14; // w27 __int64 v15; // x21 __int64 v16; // x0 __int64 v17; // x20 __int64 v18; // x22 __int64 v19; // x23 __int64 v20; // x0 __int64 v21; // x0 __n128 v22; // q0 _QWORD *v23; // x0 __int64 v24; // x0 __int64 v25; // x0 __int64 v26; // x0 __int64 v27; // x0 __int64 v28; // x2 int isColorUnlocked; // w22 __int64 v30; // x21 __int64 v31; // x0 __int64 v32; // x0 __int64 v33; // x2 __int16 v34; // w8 __int64 v35; // x20 __int64 v36; // x21 __int64 v37; // x22 __int64 v38; // x23 const char *v39; // x24 __int64 v40; // x0 _BOOL8 v41; // x20 __int64 v43; // [xsp+0h] [xbp-60h] BYREF __int64 v44; // [xsp+8h] [xbp-58h] BYREF *(_DWORD *)(a1 + 660) = a2; v3 = GameManager::sharedState(a1); v4 = *(_DWORD *)(v3 + 812); v5 = *(_DWORD *)(v3 + 816); v6 = GameManager::sharedState(v3); v7 = *(_DWORD *)(v6 + 824); v8 = *(_DWORD *)(v6 + 828); v9 = GameManager::sharedState(v6); v10 = *(_QWORD *)(a1 + 688); if ( v10 ) { v11 = *(_QWORD *)(v10 + 56); if ( v11 ) { v12 = v4 - v5; v13 = v7 - v8; v14 = *(_DWORD *)(v9 + 836) - *(_DWORD *)(v9 + 840); do { v15 = *(_QWORD *)(v11 + 264); v11 = *(_QWORD *)(v11 + 288); v16 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v15 + 512LL))(v15); v17 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v16 + 64LL))(v16); v18 = *(_QWORD *)(a1 + 584); v19 = *(_QWORD *)(a1 + 552); v20 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v15 + 512LL))(v15); v21 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v20 + 192LL))(v20); cocos2d::CCNode::convertToWorldSpace(&v43, v19, v21); v23 = cocos2d::CCNode::convertToNodeSpace(&v44, v18, &v43, v22); if ( (_DWORD)v17 == v12 ) { v24 = sub_1002E75A0(*(_QWORD *)(a1 + 696), 0); v23 = (_QWORD *)(*(__int64 (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v24 + 184LL))(v24, &v44); } if ( (_DWORD)v17 == v13 ) { v25 = sub_1002E75A0(*(_QWORD *)(a1 + 696), 1); v23 = (_QWORD *)(*(__int64 (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v25 + 184LL))(v25, &v44); } if ( (_DWORD)v17 == v14 ) { v26 = sub_1002E75A0(*(_QWORD *)(a1 + 696), 2); v23 = (_QWORD *)(*(__int64 (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v26 + 184LL))(v26, &v44); } v27 = GameManager::sharedState(v23); if ( *(_DWORD *)(a1 + 660) ) v28 = 3; else v28 = 2; isColorUnlocked = GameManager::isColorUnlocked(v27, v17, v28); v30 = (*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)v15 + 480LL))(v15, 100); v31 = (*(__int64 (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v30 + 344LL))(v30, isColorUnlocked ^ 1u); if ( (isColorUnlocked & 1) != 0 || ((v32 = GameStatsManager::sharedState(v31), !*(_DWORD *)(a1 + 660)) ? (v33 = 2) : (v33 = 3), (unsigned int)GameStatsManager::getItemUnlockState(v32, v17, v33)) ) { BYTE2(v43) = -1; v34 = -1; } else { BYTE2(v43) = 0; v34 = -256; } LOWORD(v43) = v34; (*(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v30 + 960LL))(v30, &v43); } while ( v11 ); } } v35 = 0; do { v36 = sub_1002E75A0(*(_QWORD *)(a1 + 696), v35); v37 = sub_1002E75A0(*(_QWORD *)(a1 + 680), v35); if ( (_DWORD)v35 == *(_DWORD *)(a1 + 660) ) { BYTE2(v44) = -1; LOWORD(v44) = -1; (*(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v36 + 960LL))(v36, &v44); v38 = 11; v39 = "GJ_button_01.png"; } else { memset(&v44, 50, 3); (*(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v36 + 960LL))(v36, &v44); v38 = 1; v39 = "GJ_button_04.png"; } v40 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v36 + 512LL))(v36); (*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)v40 + 592LL))(v40, v36, v38); ButtonSprite::updateBGImage(v37, (__int64)v39); v35 = (unsigned int)(v35 + 1); } while ( (_DWORD)v35 != 3 ); v41 = *(_DWORD *)(a1 + 660) == 2; (*(void (__fastcall **)(_QWORD, _BOOL8))(**(_QWORD **)(a1 + 712) + 1056LL))(*(_QWORD *)(a1 + 712), v41); (*(void (__fastcall **)(_QWORD, _BOOL8))(**(_QWORD **)(a1 + 712) + 344LL))(*(_QWORD *)(a1 + 712), v41); return (*(__int64 (__fastcall **)(_QWORD, _BOOL8))(**(_QWORD **)(a1 + 720) + 344LL))(*(_QWORD *)(a1 + 720), v41); }
GD Web Decomp Icon

GD Web Decomp

Raw Source