//
// CharacterColorPage::createColorMenu from 0x10073d1d0 to 0x10073d589 (953 bytes)
//
// 1 xrefs:
// > CharacterColorPage::init @ 0x10073cb69
//
// 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:36:27 +0000
//
void __fastcall CharacterColorPage::createColorMenu(__int64 a1)
{
__int64 v2; // rax
double v3; // xmm0_8
__int64 v4; // rax
char *v5; // rbx
char *v6; // rbx
char *v7; // rbx
float *v8; // rax
float *v9; // rdi
unsigned int v10; // r15d
int v11; // r13d
int v12; // eax
unsigned int v13; // ebx
float *v14; // r12
__int64 v15; // rdi
char *v16; // r14
void *v17; // r14
__int64 v18; // rbx
__int64 v19; // rax
int v20; // eax
unsigned __int64 v21; // [rsp+8h] [rbp-88h] BYREF
double v22; // [rsp+10h] [rbp-80h] BYREF
unsigned __int64 v23; // [rsp+18h] [rbp-78h] BYREF
void *v24[3]; // [rsp+20h] [rbp-70h] BYREF
__int64 v25; // [rsp+3Ch] [rbp-54h] BYREF
double v26; // [rsp+44h] [rbp-4Ch] BYREF
int v27; // [rsp+4Ch] [rbp-44h]
__int64 v28; // [rsp+50h] [rbp-40h]
unsigned __int64 v29; // [rsp+5Ch] [rbp-34h] BYREF
unsigned int v30; // [rsp+64h] [rbp-2Ch]
v2 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(&v25, v2);
*(_QWORD *)&v3 = (unsigned int)v25;
*(float *)&v3 = *(float *)&v25 * 0.5;
sub_100278250((float *)&v21, *(float *)&v25 * 0.5, (float)(*((float *)&v25 + 1) * 0.5) + -59.0);
v4 = sub_1007FE900(&v21);
*(_QWORD *)(a1 + 696) = v4;
cocos2d::CCObject::retain(v4);
v5 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"GJ_select_001.png", v3);
(*(void (__fastcall **)(char *, float))(*(_QWORD *)v5 + 160LL))(v5, 0.69999999);
(*(void (__fastcall **)(_QWORD, char *, __int64))(**(_QWORD **)(a1 + 584) + 464LL))(*(_QWORD *)(a1 + 584), v5, 11);
sub_1007FEBF0(*(_QWORD *)(a1 + 696), v5);
v6 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"GJ_select_001.png", COERCE_DOUBLE(1060320051));
(*(void (__fastcall **)(char *, float))(*(_QWORD *)v6 + 160LL))(v6, 0.69999999);
(*(void (__fastcall **)(_QWORD, char *, __int64))(**(_QWORD **)(a1 + 584) + 464LL))(*(_QWORD *)(a1 + 584), v6, 11);
sub_1007FEBF0(*(_QWORD *)(a1 + 696), v6);
v7 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"GJ_select_001.png", COERCE_DOUBLE(1060320051));
(*(void (__fastcall **)(char *, float))(*(_QWORD *)v7 + 160LL))(v7, 0.69999999);
(*(void (__fastcall **)(_QWORD, char *, __int64))(**(_QWORD **)(a1 + 584) + 464LL))(*(_QWORD *)(a1 + 584), v7, 11);
sub_1007FEBF0(*(_QWORD *)(a1 + 696), v7);
v8 = (float *)cocos2d::CCDictionary::create();
v28 = a1;
*(_QWORD *)(a1 + 688) = v8;
v9 = v8;
cocos2d::CCObject::retain((__int64)v8);
v10 = 0;
v11 = -204;
do
{
v12 = CharacterColorPage::colorForIndex(v9, v10);
if ( v12 >= 0 )
{
v13 = v12;
v14 = (float *)ColorChannelSprite::create();
v15 = *(_QWORD *)(v28 + 688);
v30 = v13;
cocos2d::CCDictionary::setObject_1(v15, (__int64)v14, v13);
(*(void (__fastcall **)(float *, float))(*(_QWORD *)v14 + 160LL))(v14, 0.64999998);
strcpy((char *)v24, "&GJ_lockGray_001.png");
v16 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)v24 + 1, 1.137670412774566e36);
(*(void (__fastcall **)(char *, float))(*(_QWORD *)v16 + 160LL))(v16, 0.80000001);
(*(void (__fastcall **)(char *, __int64))(*(_QWORD *)v16 + 72LL))(v16, 100);
(*(void (__fastcall **)(float *, char *))(*(_QWORD *)v14 + 456LL))(v14, v16);
sub_100278250((float *)&v26, v14[108] * 0.5, v14[109] * 0.5);
(*(void (__fastcall **)(char *, double *))(*(_QWORD *)v16 + 184LL))(v16, &v26);
v17 = CCMenuItemSpriteExtra::create((__int64)v14, 0, v28, (__int64)CharacterColorPage::onPlayerColor, 0);
(*(void (__fastcall **)(void *, _QWORD))(*(_QWORD *)v17 + 72LL))(v17, v30);
(*(void (__fastcall **)(_QWORD, void *))(**(_QWORD **)(v28 + 552) + 456LL))(*(_QWORD *)(v28 + 552), v17);
CharacterColorPage::offsetForIndex(&v29, v17, v10);
sub_1002783B0(&v26, &v29, (__m128)0x41400000u);
v27 = v11;
v18 = *(_QWORD *)(v28 + 552);
sub_100278250(
(float *)&v23,
(float)((float)(int)(v11 - 432 * (v10 / 0x12)) + *(float *)&v26) + 6.0,
(float)((float)((float)((unsigned __int8)v10 / 0x12u) * -24.0) + 96.0) + *((float *)&v26 + 1));
sub_100278350(&v22, &v21, &v23);
cocos2d::CCNode::convertToNodeSpace((double *)&v29, v18, (unsigned int *)&v22);
(*(void (__fastcall **)(void *, unsigned __int64 *))(*(_QWORD *)v17 + 184LL))(v17, &v29);
v19 = GameManager::sharedState();
v20 = GameManager::colorForIdx(v19, v30);
LOWORD(v29) = v20;
BYTE2(v29) = BYTE2(v20);
v9 = v14;
(*(void (__fastcall **)(float *, unsigned __int64 *))(*(_QWORD *)v14 + 960LL))(v14, &v29);
if ( ((__int64)v24[0] & 1) != 0 )
{
v9 = (float *)v24[2];
operator delete(v24[2]);
}
v11 = v27;
}
++v10;
v11 += 24;
}
while ( v10 != 144 );
}