//
// sub_1005C3CD4 from 0x1005c3cd4 to 0x1005c3da8 (212 bytes)
//
// 2 xrefs:
// > sub_1005C364C @ 0x1005c36a0
// > sub_1005C364C @ 0x1005c371c
//
// 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_1005C3CD4(_QWORD *a1, __int64 a2, _QWORD *a3)
{
__int64 v5; // x9
__int64 v6; // x8
__int64 v7; // x21
__int64 v8; // x0
int v9; // w0
__int64 v10; // x8
__int64 v12; // x0
int v13; // w0
int v14; // w8
v5 = a1[2];
if ( !v5 || (v6 = a1[3]) == 0 )
{
sub_1005E0E48(16, 217, 140, "ec_pmeth.c", 216);
return 0;
}
v7 = *(_QWORD *)(a1[5] + 16LL);
if ( !v7 )
v7 = *(_QWORD *)(v5 + 32);
if ( !a2 )
{
v12 = sub_1005BFADC(v7);
v13 = sub_1005B7E48(v12);
v14 = v13 + 7;
if ( v13 + 7 < 0 )
v14 = v13 + 14;
v10 = v14 >> 3;
goto LABEL_12;
}
v8 = sub_1005BFB6C(*(_QWORD *)(v6 + 32));
v9 = sub_1005D5AFC(a2, *a3, v8, v7, 0);
if ( v9 >= 1 )
{
v10 = v9;
LABEL_12:
*a3 = v10;
return 1;
}
return 0;
}