//
// BrowseSmartKeyLayer::onPrefabObject from 0x1405f20b0 to 0x1405f218e (222 bytes)
//
// 4 xrefs:
// > BrowseSmartKeyLayer::init @ 0x1405f1428
// > ??> @ 0x1408e33b8
// > ??> @ 0x1408e33c8
// > ??> @ 0x14092f2e8
//
// 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:35:06 +0000
//
__int64 __fastcall BrowseSmartKeyLayer::onPrefabObject(__int64 a1, __int64 a2)
{
__int64 result; // rax
__int64 *v3; // rsi
char v4; // cl
bool v5; // bp
bool v6; // zf
struct cocos2d::CCSprite *v7; // rax
__int64 v8; // rcx
__int64 *v9; // rdi
__int64 v10; // rbx
__int64 v11; // rax
char v12; // [rsp+38h] [rbp+10h] BYREF
result = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 952LL))(a2);
v3 = (__int64 *)result;
v4 = *(_BYTE *)(result + 368);
v5 = v4 == 0;
if ( (v4 == 0) != v4 )
{
v6 = *(_QWORD *)(result + 360) == 0;
*(_BYTE *)(result + 368) = v5;
if ( v6 )
{
v7 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_select_001.png");
v8 = *v3;
v3[45] = (__int64)v7;
(*(void (__fastcall **)(__int64 *, struct cocos2d::CCSprite *))(v8 + 464))(v3, v7);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v3[45] + 160LL))(v3[45]);
v9 = (__int64 *)v3[45];
v10 = *v9;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v12, 45.0, 45.0);
(*(void (__fastcall **)(__int64 *, __int64))(v10 + 184))(v9, v11);
}
return (*(__int64 (__fastcall **)(__int64, bool))(*(_QWORD *)v3[45] + 336LL))(v3[45], v5);
}
return result;
}