//
// LevelSearchLayer::scene from 0x140434300 to 0x14043444f (335 bytes)
//
// 3 xrefs:
// > CreatorLayer::onOnlineLevels @ 0x14013794a
// > LevelSearchLayer::onSearchMode @ 0x140436ae3
// > ??> @ 0x140926db0
//
// 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:16 +0000
//
// Hidden C++ exception states: #wind=1
__int64 __fastcall LevelSearchLayer::scene(__int64 a1, __int64 a2, __int64 a3, __int64 a4)
{
unsigned int v4; // ebx
__int64 v5; // rsi
__int64 v6; // rcx
cocos2d::CCLayer *v7; // rdi
v4 = a1;
v5 = cocos2d::CCScene::create(a1, a2, a3, a4);
*(_QWORD *)(cocos2d::CCApplication::sharedApplication(v6) + 232) = v5;
v7 = (cocos2d::CCLayer *)operator new(0x1F8u);
cocos2d::CCLayer::CCLayer(v7);
*(_QWORD *)v7 = &LevelSearchLayer::`vftable';
*((_QWORD *)v7 + 40) = &LevelSearchLayer::`vftable';
*((_QWORD *)v7 + 41) = &LevelSearchLayer::`vftable';
*((_QWORD *)v7 + 42) = &LevelSearchLayer::`vftable';
*((_QWORD *)v7 + 43) = &LevelSearchLayer::`vftable';
*((_QWORD *)v7 + 44) = &LevelSearchLayer::`vftable';
*((_QWORD *)v7 + 51) = &LevelSearchLayer::`vftable';
*((_QWORD *)v7 + 52) = &LevelSearchLayer::`vftable';
*((_QWORD *)v7 + 53) = &LevelSearchLayer::`vftable';
*((_DWORD *)v7 + 108) = 0;
*((_QWORD *)v7 + 55) = 0;
*((_QWORD *)v7 + 56) = 0;
*((_QWORD *)v7 + 57) = 0;
*((_QWORD *)v7 + 58) = 0;
*((_QWORD *)v7 + 59) = 0;
*((_QWORD *)v7 + 60) = 0;
*((_QWORD *)v7 + 61) = 0;
*((_QWORD *)v7 + 62) = 0;
if ( (unsigned __int8)LevelSearchLayer::init(v7, v4) )
{
cocos2d::CCObject::autorelease(v7);
}
else
{
(*(void (__fastcall **)(cocos2d::CCLayer *, __int64))(*(_QWORD *)v7 + 8LL))(v7, 1);
v7 = nullptr;
}
(*(void (__fastcall **)(__int64, cocos2d::CCLayer *))(*(_QWORD *)v5 + 464LL))(v5, v7);
return v5;
}