//
// sub_C0ECD4 from 0xc0ecd4 to 0xc0ed80 (172 bytes)
//
// 1 xrefs:
// > sub_C0F178 @ 0xc0f20c
//
// 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
//
__int64 __fastcall sub_C0ECD4(__int64 a1, __int64 a2, __int64 a3, unsigned int a4)
{
__int64 v4; // x4
__int64 v5; // x5
__int64 v6; // x19
__int64 v8; // x6
__int64 v9; // x21
__int64 result; // x0
__int64 v11; // x3
__int64 v12; // x0
unsigned int v13; // w20
__int64 v14; // [xsp+38h] [xbp+38h]
v4 = a2;
v5 = a3;
v6 = *(_QWORD *)(a1 + 584);
v8 = a4;
v9 = v6 + 16;
if ( !*(_DWORD *)(v6 + 96) )
{
v9 = v6 + 16;
v14 = a4;
result = (*(__int64 (**)(void))(*(_QWORD *)(a1 + 592) + 24LL))();
if ( !(_DWORD)result )
return result;
v8 = v14;
v5 = a3;
v4 = a2;
*(_DWORD *)(v6 + 96) = 1;
}
v11 = *(_QWORD *)(a1 + 600);
v12 = a1;
v13 = *(_DWORD *)(a1 + 428);
(*(void (__fastcall **)(__int64, __int64, __int64, _QWORD, __int64, __int64, __int64))(v11 + 8))(
v12,
v9,
v6 + 100,
v13,
v4,
v5,
v8);
result = *(unsigned int *)(v6 + 100);
if ( v13 <= (unsigned int)result )
{
*(_DWORD *)(v6 + 96) = 0;
*(_DWORD *)(v6 + 100) = 0;
}
return result;
}