//
// sub_74891C from 0x74891c to 0x748998 (124 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
int *__fastcall sub_74891C(int *a1)
{
int v1; // r3
_DWORD *v3; // r2
unsigned int v4; // r3
int v5; // r0
_DWORD *v7; // r0
_BYTE v8[4]; // [sp+4h] [bp-4h] BYREF
v1 = *a1;
a1[1] = 0;
sub_744C5C((int *)((char *)a1 + *(_DWORD *)(v1 - 12)), *(int *)((char *)a1 + *(_DWORD *)(v1 - 12) + 20) & 0xFFFFFFFD);
sub_747D3C(v8, a1, 1);
if ( !v8[0] )
return a1;
v3 = *(_DWORD **)((char *)a1 + *(_DWORD *)(*a1 - 12) + 124);
if ( v3 )
{
v4 = v3[2];
if ( v3[1] >= v4 )
{
v5 = (*(int (__fastcall **)(_DWORD *, int))(*v3 + 44))(v3, -1);
}
else
{
v5 = *(_DWORD *)(v4 - 4);
v3[2] = v4 - 4;
}
if ( v5 != -1 )
return a1;
v7 = (int *)((char *)a1 + *(_DWORD *)(*a1 - 12));
}
else
{
v7 = (int *)((char *)a1 + *(_DWORD *)(*a1 - 12));
}
sub_744C5C(v7, v7[5] | 1);
return a1;
}