//
// sub_746BEC from 0x746bec to 0x746c60 (116 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_746BEC(int *a1)
{
int v1; // r3
_DWORD *v3; // r0
unsigned int v4; // r3
_DWORD *v6; // r0
_BYTE v7[4]; // [sp+4h] [bp-4h] BYREF
v1 = *a1;
a1[1] = 0;
sub_7446A4((int *)((char *)a1 + *(_DWORD *)(v1 - 12)), *(int *)((char *)a1 + *(_DWORD *)(v1 - 12) + 20) & 0xFFFFFFFD);
sub_745FB8(v7, a1, 1);
if ( !v7[0] )
return a1;
v3 = *(_DWORD **)((char *)a1 + *(_DWORD *)(*a1 - 12) + 120);
if ( v3 )
{
v4 = v3[2];
if ( v3[1] < v4 )
{
v3[2] = v4 - 1;
return a1;
}
if ( (*(int (__fastcall **)(_DWORD *, int))(*v3 + 44))(v3, -1) != -1 )
return a1;
v6 = (int *)((char *)a1 + *(_DWORD *)(*a1 - 12));
}
else
{
v6 = (int *)((char *)a1 + *(_DWORD *)(*a1 - 12));
}
sub_7446A4(v6, v6[5] | 1);
return a1;
}