//
// sub_100661524 from 0x100661524 to 0x100661584 (96 bytes)
//
// 2 xrefs:
// > sub_10065DE8C @ 0x10065e348
// > sub_10065EBB0 @ 0x10065f0d4
//
// 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:10:58 +0000
//
__int64 __fastcall sub_100661524(__int64 result, char a2)
{
__int64 v2; // x8
_QWORD *v3; // x8
__int64 v4; // t1
__int64 v5; // x9
__int64 v6; // x9
v2 = *(_QWORD *)(result + 128);
if ( (a2 & 1) != 0 )
{
v3 = (_QWORD *)(v2 + 12);
v5 = *(_QWORD *)(result + 136);
++*(_WORD *)(v5 + 520);
*(_OWORD *)(v5 + 528) = *(_OWORD *)(v5 + 544);
v6 = *(_QWORD *)(result + 136);
*(_QWORD *)(v6 + 552) = 0;
*(_QWORD *)(v6 + 544) = 0;
}
else
{
v4 = *(_QWORD *)(v2 + 88);
v3 = (_QWORD *)(v2 + 88);
*(_QWORD *)(*(_QWORD *)(result + 136) + 566LL) = v4;
++*(_WORD *)(*(_QWORD *)(result + 136) + 522LL);
}
*v3 = 0;
return result;
}