//
// sub_87DD48 from 0x87dd48 to 0x87ddaa (98 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 12:03:08 +0000
//
int __fastcall sub_87DD48(_DWORD *a1)
{
int v1; // r3
_BYTE *v3; // r2
int v4; // r2
int v5; // r3
_BYTE *v6; // r2
int result; // r0
int v8; // r2
v1 = a1[6];
v3 = (_BYTE *)(*(_DWORD *)v1)++;
*v3 = -1;
v4 = *(_DWORD *)(v1 + 4) - 1;
*(_DWORD *)(v1 + 4) = v4;
if ( !v4 && !(*(int (**)(void))(v1 + 12))() )
{
*(_DWORD *)(*a1 + 20) = 25;
(*(void (__fastcall **)(_DWORD *))*a1)(a1);
}
v5 = a1[6];
v6 = *(_BYTE **)v5;
result = *(_DWORD *)v5 + 1;
*(_DWORD *)v5 = result;
*v6 = -39;
v8 = *(_DWORD *)(v5 + 4) - 1;
*(_DWORD *)(v5 + 4) = v8;
if ( !v8 )
{
result = (*(int (__fastcall **)(_DWORD *))(v5 + 12))(a1);
if ( !result )
{
*(_DWORD *)(*a1 + 20) = 25;
return (*(int (__fastcall **)(_DWORD *))*a1)(a1);
}
}
return result;
}