//
// sub_674DA4 from 0x674da4 to 0x674e5a (182 bytes)
//
// 5 xrefs:
// > sub_674FB4 @ 0x67522c
// > sub_67523C @ 0x67537e
// > sub_67538C @ 0x6753e2
// > sub_6753EC @ 0x67552a
// > sub_675534 @ 0x6756a0
//
// 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_674DA4(_DWORD *a1)
{
_DWORD *v2; // r7
int result; // r0
int v4; // r5
_DWORD *v5; // r8
_DWORD *v6; // r6
int v7; // r9
int v8; // t1
v2 = (_DWORD *)a1[117];
if ( !(*(int (**)(void))(a1[116] + 8))() )
{
*(_DWORD *)(*a1 + 20) = 25;
(*(void (__fastcall **)(_DWORD *))*a1)(a1);
}
result = a1[85];
if ( result > 0 )
{
v4 = 0;
v5 = a1 + 85;
v6 = v2 + 6;
while ( 1 )
{
v8 = v5[1];
++v5;
v7 = v8;
if ( !a1[56] )
break;
if ( a1[103] )
goto LABEL_10;
if ( !a1[105] )
break;
LABEL_12:
++v4;
++v6;
if ( result <= v4 )
goto LABEL_13;
}
memset((void *)v2[*(_DWORD *)(v7 + 20) + 15], 0, 0x40u);
*v6 = 0;
v6[4] = 0;
if ( a1[56] )
{
if ( !a1[103] )
goto LABEL_11;
}
else if ( !a1[109] )
{
LABEL_11:
result = a1[85];
goto LABEL_12;
}
LABEL_10:
memset((void *)v2[*(_DWORD *)(v7 + 24) + 31], 0, 0x100u);
goto LABEL_11;
}
LABEL_13:
v2[3] = 0;
v2[4] = 0;
v2[5] = -16;
v2[14] = a1[70];
return result;
}