//
// sub_100596EA4 from 0x100596ea4 to 0x100596f54 (176 bytes)
//
// 6 xrefs:
// > sub_10059550C @ 0x10059550c
// > sub_1005955B8 @ 0x1005955fc
// > sub_1005955B8 @ 0x100595608
// > sub_100595974 @ 0x100595ff8
// > sub_1005966D0 @ 0x100596714
// > sub_1005966D0 @ 0x100596720
//
// 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:08:47 +0000
//
__int64 __fastcall sub_100596EA4(__int64 a1)
{
__int64 v1; // x8
__int64 v3; // x9
__int64 v4; // x20
unsigned __int64 v5; // x22
__int64 v6; // x9
v1 = *(_QWORD *)(a1 + 376);
if ( v1 )
{
v3 = *(unsigned int *)(a1 + 456);
if ( (int)v3 >= 1 )
{
v4 = 0;
v5 = 18640 * ((unsigned __int64)(v3 + 1) >> 1);
do
{
bzero((void *)(v1 + v4), 0x48D0u);
v1 = *(_QWORD *)(a1 + 376);
v6 = v1 + v4;
*(_DWORD *)(v6 + 18632) = -1;
*(_DWORD *)(v6 + 18596) = 1;
*(_QWORD *)(v6 + 9280) = (v1 + v4 + 4623) & 0xFFFFFFFFFFFFFFF0LL;
v4 += 18640;
}
while ( v5 != v4 );
}
}
return 0;
}