//
// sub_1004314B4 from 0x1004314b4 to 0x100431500 (76 bytes)
//
// 1 xrefs:
// > sub_10026B0E0 @ 0x10026b14c
//
// 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:05:06 +0000
//
__int64 __fastcall sub_1004314B4(__int64 result, unsigned int a2, int a3)
{
__int64 v3; // x9
__int64 v4; // x8
__int64 v6; // x8
int v7; // w9
if ( (a2 & 0x80000000) == 0 )
{
v3 = *(_QWORD *)(result + 1848);
v4 = *(_QWORD *)(result + 1840);
if ( v3 != v4 && ((v3 - v4) >> 4) - 1 >= (unsigned __int64)a2 )
{
v6 = v4 + 16LL * a2;
v7 = *(_DWORD *)(v6 + 8) + a3;
if ( v7 <= 1 )
v7 = 1;
*(_DWORD *)(v6 + 8) = v7;
*(_DWORD *)(result + 1960) = -1;
}
}
return result;
}