//
// BrowseSmartKeyLayer::onBack from 0x1405f2190 to 0x1405f223b (171 bytes)
//
// 2 xrefs:
// > ??> @ 0x140805508
// > ??> @ 0x14092f30c
//
// 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
//
// Hidden C++ exception states: #wind=1
__int64 __fastcall BrowseSmartKeyLayer::onBack(struct cocos2d::CCObject *a1)
{
__int64 v2; // rax
cocos2d::CCTouchDispatcher *v3; // rax
__int64 v4; // rdx
cocos2d::CCObject *v5; // rdi
__int64 v6; // rax
cocos2d::CCObject *v7; // rbx
void *v9; // [rsp+30h] [rbp+8h]
v2 = cocos2d::CCDirector::sharedDirector(a1);
v3 = (cocos2d::CCTouchDispatcher *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v2 + 144LL))(v2);
cocos2d::CCTouchDispatcher::unregisterForcePrio(v3, a1);
(*(void (__fastcall **)(struct cocos2d::CCObject *, _QWORD))(*(_QWORD *)a1 + 992LL))(a1, 0);
LOBYTE(v4) = 1;
(*(void (__fastcall **)(struct cocos2d::CCObject *, __int64))(*(_QWORD *)a1 + 520LL))(a1, v4);
v5 = *((cocos2d::CCObject **)a1 + 83);
v9 = operator new(0x2C8u);
v6 = BrowseSmartTemplateLayer::BrowseSmartTemplateLayer((__int64)v9);
v7 = (cocos2d::CCObject *)v6;
if ( v6 )
{
if ( BrowseSmartTemplateLayer::init(v6, v5) )
{
cocos2d::CCObject::autorelease(v7);
}
else
{
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v7 + 8LL))(v7, 1);
v7 = nullptr;
}
}
return (*(__int64 (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)v7 + 1064LL))(v7);
}