//
// sub_746814 from 0x746814 to 0x746870 (92 bytes)
//
// 1 xrefs:
// > sub_7792B0 @ 0x7793b4
//
// 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_746814(int *a1)
{
_DWORD *v2; // r0
unsigned int v3; // r3
_BYTE v5[4]; // [sp+4h] [bp-4h] BYREF
a1[1] = 0;
sub_745FB8(v5, a1, 1);
if ( !v5[0] )
return a1;
v2 = *(_DWORD **)((char *)a1 + *(_DWORD *)(*a1 - 12) + 120);
v3 = v2[2];
if ( v3 < v2[3] )
{
v2[2] = v3 + 1;
LABEL_4:
a1[1] = 1;
return a1;
}
if ( (*(int (__fastcall **)(_DWORD *))(*v2 + 40))(v2) != -1 )
goto LABEL_4;
sub_7446A4((int *)((char *)a1 + *(_DWORD *)(*a1 - 12)), *(int *)((char *)a1 + *(_DWORD *)(*a1 - 12) + 20) | 2);
return a1;
}