//
// LevelSettingsLayer::selectSettingClosed from 0x100258a30 to 0x100258b5a (298 bytes)
//
// 2 xrefs:
// > sub_100258BE0 @ 0x100258bec
// > ??> @ 0x100af2480
//
// 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:27:27 +0000
//
__int64 __fastcall LevelSettingsLayer::selectSettingClosed(_QWORD *a1, __int64 a2, double a3)
{
__int64 v3; // r13
__int64 result; // rax
int v5; // eax
int v6; // r13d
__int64 v7; // r14
__int64 v8; // r12
_BYTE *v9; // rsi
__int64 v10; // r14
__int64 v11; // r12
_BYTE *v12; // rsi
__int64 v13; // rax
__int64 v14; // rax
char v15; // [rsp+0h] [rbp-40h] BYREF
_BYTE v16[15]; // [rsp+1h] [rbp-3Fh] BYREF
void *__p; // [rsp+10h] [rbp-30h]
v3 = *(unsigned int *)(a2 + 672);
result = *(unsigned int *)(a2 + 676);
if ( (_DWORD)result == 2 )
{
v5 = 0;
if ( (unsigned int)v3 < 5 )
v5 = dword_100A06AF0[v3];
v6 = v5;
v7 = a1[100];
v8 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(a3);
SelectSettingLayer::frameForItem(&v15, *(unsigned int *)(a2 + 676), *(unsigned int *)(a2 + 672));
if ( (v15 & 1) != 0 )
v9 = __p;
else
v9 = v16;
v13 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v8, v9);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v7 + 1160LL))(v7, v13);
if ( (v15 & 1) != 0 )
operator delete(__p);
result = a1[102];
*(_DWORD *)(result + 332) = v6;
}
else if ( (unsigned int)result < 2 )
{
v10 = a1[101];
v11 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(a3);
SelectSettingLayer::frameForItem(&v15, *(unsigned int *)(a2 + 676), *(unsigned int *)(a2 + 672));
if ( (v15 & 1) != 0 )
v12 = __p;
else
v12 = v16;
v14 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v11, v12);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v10 + 1160LL))(v10, v14);
if ( (v15 & 1) != 0 )
operator delete(__p);
result = a1[102];
*(_DWORD *)(result + 328) = v3;
}
return result;
}