//
// BrowseSmartTemplateLayer::onClick from 0x1004e4ec0 to 0x1004e4f03 (67 bytes)
//
// 2 xrefs:
// > BrowseSmartTemplateLayer::baseSetup @ 0x1004e4343
// > BrowseSmartTemplateLayer::baseSetup @ 0x1004e43f3
//
// 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 12:31:19 +0000
//
__int64 __fastcall BrowseSmartTemplateLayer::onClick(__int64 a1, __int64 a2)
{
__int64 result; // rax
int v3; // esi
result = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2);
if ( (_DWORD)result == 1 )
{
v3 = -1;
}
else
{
if ( (_DWORD)result != 2 )
return result;
v3 = 1;
}
return BrowseSmartTemplateLayer::goToPage(a1, *(_DWORD *)(a1 + 680) + v3);
}