//
// sub_1005C3500 from 0x1005c3500 to 0x1005c35e0 (224 bytes)
//
// 1 xrefs:
// > ??> @ 0x100839fa8
//
// 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_1005C3500(__int64 a1, __int64 a2, unsigned __int64 *a3, __int64 a4, __int64 a5)
{
__int64 v9; // x8
__int64 v10; // x21
__int64 v11; // x24
unsigned __int64 v12; // x25
__int64 result; // x0
unsigned __int64 v14; // x8
__int64 v15; // x0
__int64 v16; // x0
unsigned int v17; // [xsp+Ch] [xbp-44h] BYREF
v9 = *(_QWORD *)(a1 + 16);
v10 = *(_QWORD *)(v9 + 32);
if ( !a2 )
{
v14 = (int)sub_1005D1150(*(_QWORD *)(v9 + 32));
LABEL_10:
*a3 = v14;
return 1;
}
v11 = *(_QWORD *)(a1 + 40);
v12 = *a3;
if ( v12 < (int)sub_1005D1150(*(_QWORD *)(v9 + 32)) )
{
sub_1005E0E48(16, 218, 100, "ec_pmeth.c", 171);
return 0;
}
v15 = *(_QWORD *)(v11 + 8);
if ( v15 )
v16 = sub_1005EB2A0(v15);
else
v16 = 64;
result = sub_1005D1FEC(v16, a4, a5, a2, &v17, v10);
if ( (int)result >= 1 )
{
v14 = v17;
goto LABEL_10;
}
return result;
}