//
// BrowseSmartTemplateLayer::onClick from 0x1405f0eb0 to 0x1405f0efc (76 bytes)
//
// 3 xrefs:
// > BrowseSmartTemplateLayer::baseSetup @ 0x1405f05c9
// > BrowseSmartTemplateLayer::baseSetup @ 0x1405f0675
// > ??> @ 0x14092f270
//
// 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:05 +0000
//
unsigned int __fastcall BrowseSmartTemplateLayer::onClick(__int64 a1, __int64 a2)
{
unsigned int result; // eax
result = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 56LL))(a2) - 1;
if ( !result )
return BrowseSmartTemplateLayer::goToPage(a1, *(_DWORD *)(a1 + 680) - 1);
if ( result == 1 )
return BrowseSmartTemplateLayer::goToPage(a1, *(_DWORD *)(a1 + 680) + 1);
return result;
}