//
// ColorSelectLiveOverlay::onSelectTab from 0x140126150 to 0x140126292 (322 bytes)
//
// 5 xrefs:
// > ColorSelectLiveOverlay::init @ 0x140125bbf
// > ColorSelectLiveOverlay::init @ 0x140125ca3
// > ??> @ 0x140898248
// > ??> @ 0x140898284
// > ??> @ 0x14091697c
//
// 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:58 +0000
//
__int64 __fastcall ColorSelectLiveOverlay::onSelectTab(__int64 a1, __int64 a2)
{
__int64 result; // rax
__int64 v5; // rcx
__int64 v6; // rdx
unsigned int i; // ebp
struct cocos2d::CCObject *v8; // rdi
int v9; // ebx
int v10; // eax
const char *v11; // rdx
__int64 v12; // rdx
__int16 v13; // [rsp+40h] [rbp+8h] BYREF
char v14; // [rsp+42h] [rbp+Ah]
result = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 56LL))(a2);
if ( *(_BYTE *)(a1 + 856) != ((_DWORD)result != 1) )
{
*(_BYTE *)(a1 + 856) = (_DWORD)result != 1;
v5 = 696;
if ( (_DWORD)result == 1 )
v5 = 688;
v6 = *(_QWORD *)(v5 + a1);
*(_DWORD *)(a1 + 728) = *(_DWORD *)(v6 + 96);
v13 = *(_WORD *)(v6 + 72);
v14 = *(_BYTE *)(v6 + 74);
ColorSelectLiveOverlay::selectColor(a1, &v13);
for ( i = 0; i < cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 680)); ++i )
{
v8 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 680), i);
v9 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 56LL))(a2);
v10 = (*(__int64 (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v8 + 56LL))(v8);
v11 = "GJ_button_04.png";
if ( v9 == v10 )
v11 = "GJ_button_01.png";
ButtonSprite::updateBGImage((__int64)v8, v11);
}
v12 = 707;
if ( !*(_BYTE *)(a1 + 856) )
v12 = 704;
(**(void (__fastcall ***)(__int64, __int64))(*(_QWORD *)(a1 + 792) + 320LL))(
*(_QWORD *)(a1 + 792) + 320LL,
a1 + v12);
return ColorSelectLiveOverlay::updateColorLabel(a1);
}
return result;
}