//
// sub_100647B54 from 0x100647b54 to 0x100647c3c (232 bytes)
//
// 2 xrefs:
// > sub_1006430D0 @ 0x100643638
// > sub_10065DE8C @ 0x10065e3f0
//
// 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:45 +0000
//
__int64 __fastcall sub_100647B54(__int64 a1)
{
_BYTE *v2; // x8
if ( *(_DWORD *)(a1 + 72) != 8704 )
return sub_10065246C(a1, 22);
if ( (unsigned int)sub_1006FFFA8(*(_QWORD *)(a1 + 80), *(int *)(a1 + 528) + 8LL) )
{
v2 = *(_BYTE **)(*(_QWORD *)(a1 + 80) + 8LL);
*v2 = 22;
v2[1] = (unsigned int)(*(_DWORD *)(a1 + 528) + 4) >> 16;
v2[2] = (unsigned __int16)(*(_WORD *)(a1 + 528) + 4) >> 8;
v2[3] = *(_DWORD *)(a1 + 528) + 4;
v2[4] = *(_DWORD *)(a1 + 492);
v2[5] = *(_WORD *)(a1 + 530);
v2[6] = BYTE1(*(_DWORD *)(a1 + 528));
v2[7] = *(_DWORD *)(a1 + 528);
memcpy(v2 + 8, *(const void **)(a1 + 520), *(int *)(a1 + 528));
*(_DWORD *)(a1 + 96) = *(_DWORD *)(a1 + 528) + 8;
*(_DWORD *)(a1 + 72) = 8705;
*(_DWORD *)(a1 + 100) = 0;
return sub_10065246C(a1, 22);
}
*(_DWORD *)(a1 + 72) = 5;
return 0xFFFFFFFFLL;
}