//
// sub_14045F690 from 0x14045f690 to 0x14045f704 (116 bytes)
//
// 5 xrefs:
// > StartPosLayer::addModeButtons @ 0x14045f94d
// > StartPosLayer::onSelectMode @ 0x14045f9dd
// > StartPosLayer::addSpeedButtons @ 0x14045fc54
// > StartPosLayer::onSelectSpeed @ 0x14045fd13
// > ??> @ 0x140927dd0
//
// 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:32:32 +0000
//
unsigned int __fastcall sub_14045F690(cocos2d::CCArray *a1, int a2)
{
unsigned int v4; // ebx
unsigned int result; // eax
char *v6; // rcx
void (__fastcall **v7)(char *, _BYTE *); // rax
_BYTE *v8; // rdx
_BYTE v9[3]; // [rsp+40h] [rbp+18h] BYREF
v4 = 0;
result = cocos2d::CCArray::count(a1);
if ( result )
{
do
{
v6 = (char *)cocos2d::CCArray::objectAtIndex(a1, v4) + 320;
v7 = *(void (__fastcall ***)(char *, _BYTE *))v6;
if ( a2 == v4 )
{
v8 = &unk_1407044BC;
}
else
{
memset(v9, 125, sizeof(v9));
v8 = v9;
}
(*v7)(v6, v8);
++v4;
result = cocos2d::CCArray::count(a1);
}
while ( v4 < result );
}
return result;
}