//
// sub_746A34 from 0x746a34 to 0x746ab6 (130 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_746A34(int *a1, int a2, int a3)
{
_DWORD *v6; // r0
int v7; // r2
int v8; // r0
int result; // r0
_BYTE v10[4]; // [sp+4h] [bp-4h] BYREF
a1[1] = 0;
sub_745FB8(v10, a1, 1);
if ( !v10[0] )
return a1[1];
v6 = *(_DWORD **)((char *)a1 + *(_DWORD *)(*a1 - 12) + 120);
v7 = v6[3] - v6[2];
if ( !v7 )
{
v7 = (*(int (__fastcall **)(_DWORD *))(*v6 + 28))(v6);
if ( v7 > 0 )
goto LABEL_4;
goto LABEL_7;
}
if ( v7 <= 0 )
{
LABEL_7:
if ( v7 == -1 )
{
sub_7446A4((int *)((char *)a1 + *(_DWORD *)(*a1 - 12)), *(int *)((char *)a1 + *(_DWORD *)(*a1 - 12) + 20) | 2);
return a1[1];
}
return a1[1];
}
LABEL_4:
if ( v7 >= a3 )
v7 = a3;
v8 = *(int *)((char *)a1 + *(_DWORD *)(*a1 - 12) + 120);
result = (*(int (__fastcall **)(int, int, int))(*(_DWORD *)v8 + 32))(v8, a2, v7);
a1[1] = result;
return result;
}