//
// LevelBrowserLayer::onProcessSelected from 0x1403e9560 to 0x1403e96fb (411 bytes)
//
// 2 xrefs:
// > LevelBrowserLayer::init @ 0x1403e2e81
// > ??> @ 0x140925070
//
// 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:31:44 +0000
//
// Hidden C++ exception states: #wind=2
void __fastcall LevelBrowserLayer::onProcessSelected(__int64 a1, __int64 a2)
{
int v4; // edi
__int64 v5; // rbp
cocos2d::CCString *v6; // rax
const char *CString; // rax
size_t v8; // r8
__int64 *v9; // rdi
__int64 v10; // rax
__int64 v11; // rbx
unsigned int v12; // eax
__int128 v13; // [rsp+50h] [rbp-58h] BYREF
__int64 v14; // [rsp+60h] [rbp-48h]
__int64 v15; // [rsp+68h] [rbp-40h]
_BYTE v16[32]; // [rsp+70h] [rbp-38h] BYREF
void *v17; // [rsp+C8h] [rbp+20h]
v4 = LevelBrowserLayer::selectedCount(a1);
if ( v4 > 0 && (*(unsigned int (__fastcall **)(__int64))(*(_QWORD *)a2 + 56LL))(a2) == 5 )
{
v5 = a1 + 552;
if ( !a1 )
v5 = 0;
v6 = cocos2d::CCString::createWithFormat(
"Are you sure you want to delete the %i selected levels?",
v4);
CString = cocos2d::CCString::getCString(v6);
v13 = 0;
v14 = 0;
v15 = 0;
v8 = -1;
do
++v8;
while ( CString[v8] );
sub_14003D230(&v13, CString, v8);
v17 = operator new(0x298u);
v9 = (__int64 *)FLAlertLayer::FLAlertLayer((__int64)v17);
if ( v9 )
{
v10 = sub_14003F4F0((__int64)v16, (__int64)&v13);
if ( FLAlertLayer::init(
(cocos2d::CCLayerColor *)v9,
v5,
"Delete",
v10,
(__int64)"Back",
(__int64)"Delete",
380.0,
0,
0,
1.0) )
{
cocos2d::CCObject::autorelease((cocos2d::CCObject *)v9);
}
else
{
(*(void (__fastcall **)(__int64 *, __int64))(*v9 + 8))(v9, 1);
v9 = nullptr;
}
}
sub_14003D310((__int64)&v13);
if ( v9 )
{
ButtonSprite::updateBGImage(v9[77], "GJ_button_06.png");
v11 = *v9;
v12 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 56LL))(a2);
(*(void (__fastcall **)(__int64 *, _QWORD))(v11 + 64))(v9, v12);
(*(void (__fastcall **)(__int64 *))(*v9 + 1064))(v9);
}
}
}