//
// sub_74883C from 0x74883c to 0x7488c0 (132 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_74883C(int *a1, int a2)
{
int v2; // r3
_DWORD *v5; // r0
unsigned int v6; // r3
_DWORD *v8; // r0
_BYTE v9[8]; // [sp+4h] [bp-8h] BYREF
v2 = *a1;
a1[1] = 0;
sub_744C5C((int *)((char *)a1 + *(_DWORD *)(v2 - 12)), *(int *)((char *)a1 + *(_DWORD *)(v2 - 12) + 20) & 0xFFFFFFFD);
sub_747D3C(v9, a1, 1);
if ( !v9[0] )
return a1;
v5 = *(_DWORD **)((char *)a1 + *(_DWORD *)(*a1 - 12) + 124);
if ( !v5 )
{
v8 = (int *)((char *)a1 + *(_DWORD *)(*a1 - 12));
goto LABEL_9;
}
v6 = v5[2];
if ( v5[1] < v6 && a2 == *(_DWORD *)(v6 - 4) )
{
v5[2] = v6 - 4;
if ( a2 == -1 )
goto LABEL_8;
return a1;
}
if ( (*(int (__fastcall **)(_DWORD *, int))(*v5 + 44))(v5, a2) != -1 )
return a1;
LABEL_8:
v8 = (int *)((char *)a1 + *(_DWORD *)(*a1 - 12));
LABEL_9:
sub_744C5C(v8, v8[5] | 1);
return a1;
}