// // CharacterColorPage::onPlayerColor from 0x1400a2680 to 0x1400a2983 (771 bytes) // // 2 xrefs: // > CharacterColorPage::createColorMenu @ 0x1400a1a1e // > @ 0x1409130e8 // // 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:26:07 +0000 // // Hidden C++ exception states: #wind=6 __int64 __fastcall CharacterColorPage::onPlayerColor(__int64 a1, __int64 a2) { unsigned int v4; // edi unsigned int v5; // ebx __int64 v6; // rcx __int64 result; // rax __int64 v8; // rcx __int64 v9; // rcx __int64 v10; // rcx int v11; // edx int v12; // edx _DWORD *v13; // rdi float v14; // xmm0_4 _DWORD *v15; // rdi float v16; // xmm0_4 _DWORD *v17; // rdi float v18; // xmm0_4 struct cocos2d::CCObject *v19; // r14 __int64 v20; // rsi __int64 v21; // rbx __int64 v22; // rdi __int64 v23; // rax __int64 v24; // rax __int64 v25; // rax char v26; // [rsp+50h] [rbp+8h] BYREF void *v27; // [rsp+58h] [rbp+10h] BYREF char v28; // [rsp+60h] [rbp+18h] BYREF v4 = (*(_DWORD *)(a1 + 664) != 0) + 2; v5 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 56LL))(a2); v6 = qword_14090BFD0; if ( !qword_14090BFD0 ) { v27 = operator new(0x6E8u); qword_14090BFD0 = GameManager::GameManager(v27); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0); v6 = qword_14090BFD0; } result = GameManager::isColorUnlocked(v6, v5, v4); if ( (_BYTE)result && (result = CharacterColorPage::activeColorForMode(v8, *(_DWORD *)(a1 + 664)), (_DWORD)result != v5) ) { v10 = qword_14090BFD0; if ( !qword_14090BFD0 ) { v27 = operator new(0x6E8u); qword_14090BFD0 = GameManager::GameManager(v27); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0); v10 = qword_14090BFD0; } *(_BYTE *)(v10 + 688) = 0; GameManager::colorForIdx(v10, &v26, v5); v11 = *(_DWORD *)(a1 + 664); if ( v11 ) { v12 = v11 - 1; if ( v12 ) { if ( v12 == 1 ) { v13 = (_DWORD *)qword_14090BFD0; if ( !qword_14090BFD0 ) { v27 = operator new(0x6E8u); qword_14090BFD0 = GameManager::GameManager(v27); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0); v13 = (_DWORD *)qword_14090BFD0; } v13[219] = v5; v14 = (float)((float)rand() / 32767.0) * 1000.0; v13[218] = (int)v14; v13[217] = v5 + (int)v14; } } else { v15 = (_DWORD *)qword_14090BFD0; if ( !qword_14090BFD0 ) { v27 = operator new(0x6E8u); qword_14090BFD0 = GameManager::GameManager(v27); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0); v15 = (_DWORD *)qword_14090BFD0; } v15[216] = v5; v16 = (float)((float)rand() / 32767.0) * 1000.0; v15[215] = (int)v16; v15[214] = v5 + (int)v16; } } else { v17 = (_DWORD *)qword_14090BFD0; if ( !qword_14090BFD0 ) { v27 = operator new(0x6E8u); qword_14090BFD0 = GameManager::GameManager(v27); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0); v17 = (_DWORD *)qword_14090BFD0; } v17[213] = v5; v18 = (float)((float)rand() / 32767.0) * 1000.0; v17[212] = (int)v18; v17[211] = v5 + (int)v18; } v19 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 704), *(_DWORD *)(a1 + 664)); v20 = *(_QWORD *)v19; v21 = *(_QWORD *)(a1 + 552); v22 = *(_QWORD *)(a1 + 584); v23 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 200LL))(a2); cocos2d::CCNode::convertToWorldSpace(v21, &v27, v23); cocos2d::CCNode::convertToNodeSpace(v22, &v28, v24); (*(void (__fastcall **)(struct cocos2d::CCObject *, __int64))(v20 + 184))(v19, v25); return CharacterColorPage::updateIconColors(a1); } else { v9 = *(_QWORD *)(a1 + 712); if ( v9 ) return (*(__int64 (__fastcall **)(__int64, _QWORD, _QWORD))(*(_QWORD *)v9 + 8LL))(v9, v5, v4); } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source