//
// sub_10029D5D4 from 0x10029d5d4 to 0x10029d6cc (248 bytes)
//
// 1 xrefs:
// > GJBaseGameLayer::processCommands @ 0x10029b764
//
// 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:02:11 +0000
//
__int64 __fastcall sub_10029D5D4(__int64 result)
{
_BYTE *v1; // x22
__int64 v2; // x19
unsigned int *v3; // x8
unsigned int *v4; // x20
signed int v5; // w9
__int64 v6; // x2
unsigned int *v7; // x9
signed __int64 v8; // x21
v1 = (_BYTE *)(result + 12238);
if ( *(_BYTE *)(result + 12448) == 1 )
{
v2 = result;
v3 = *(unsigned int **)(result + 12928);
v4 = *(unsigned int **)(result + 12920);
if ( v3 != v4 )
{
while ( 1 )
{
if ( (*v1 & 1) != 0 )
{
v5 = *(_DWORD *)(v2 + 956);
if ( *v4 == 99 )
{
if ( v5 > (int)v4[2] )
v1[412] = 1;
return result;
}
}
else
{
v5 = *(_DWORD *)(v2 + 956);
}
if ( v4[2] == v5 )
{
v6 = *v4;
if ( (v6 & 0xFFFFFFFE) != 0x62 )
{
result = GJBaseGameLayer::handleButton(v2, *((unsigned __int8 *)v4 + 4), v6, (*((_BYTE *)v4 + 5) & 1) == 0);
v4 = *(unsigned int **)(v2 + 12920);
v3 = *(unsigned int **)(v2 + 12928);
}
v7 = v4;
v8 = (char *)v3 - (char *)(v4 + 4);
if ( v3 != v4 + 4 )
{
result = (__int64)memmove(v4, v4 + 4, (char *)v3 - (char *)(v4 + 4));
v7 = *(unsigned int **)(v2 + 12920);
}
v3 = (unsigned int *)((char *)v4 + v8);
*(_QWORD *)(v2 + 12928) = (char *)v4 + v8;
v4 = v7;
if ( v3 != v7 )
continue;
}
return result;
}
}
}
return result;
}