//
// sub_100491D50 from 0x100491d50 to 0x100491ddd (141 bytes)
//
// 1 xrefs:
// > ??> @ 0x100942cb0
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
char __fastcall sub_100491D50(__int64 a1, __int64 a2, __int64 a3, __int64 a4)
{
__int64 v4; // r8
__int64 (__fastcall ***v5)(_QWORD, __int64, __int64, __int64, __int64); // rdi
GJSmartTemplate *v7; // rdi
SetupSmartTemplateLayer *v8; // rax
v4 = a1 - 576;
if ( (_DWORD)a3 != 22 )
{
v5 = *(__int64 (__fastcall ****)(_QWORD, __int64, __int64, __int64, __int64))(a1 + 208);
if ( v5 )
return (**v5)(v5, a2, a3, a4, v4);
return 0;
}
if ( (_DWORD)a4 != 6 )
{
if ( (_DWORD)a4 == 1 )
CustomListView::reloadAll(*(CustomListView **)(*(_QWORD *)(a1 + 32) + 544LL));
return 0;
}
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v4 + 1312LL))(a1 - 576, 0);
v7 = *(GJSmartTemplate **)(a2 + 552);
v7->m_prefabIndex = 0;
v8 = SetupSmartTemplateLayer::create(v7);
((void (__fastcall *)(SetupSmartTemplateLayer *))v8->show)(v8);
return 1;
}