//
// sub_10036D278 from 0x10036d278 to 0x10036d38c (276 bytes)
//
// 2 xrefs:
// > sub_100369218 @ 0x10036a6bc
// > sub_100369218 @ 0x10036a790
//
// This function is hookable on this platform (idp: arm, 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:03:21 +0000
//
__int64 __fastcall sub_10036D278(__int64 result, int a2)
{
__int64 v2; // x19
__int64 (*v3)(void); // x8
v2 = result;
if ( a2 == 2 )
{
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)(result + 712) + 1384LL))(*(_QWORD *)(result + 712));
v3 = *(__int64 (**)(void))(**(_QWORD **)(v2 + 952) + 960LL);
}
else
{
if ( a2 != 1 )
return result;
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)(result + 712) + 1352LL))(*(_QWORD *)(result + 712));
v3 = *(__int64 (**)(void))(**(_QWORD **)(v2 + 944) + 960LL);
}
return v3();
}