//
// sub_1005BF868 from 0x1005bf868 to 0x1005bf904 (156 bytes)
//
// 5 xrefs:
// > sub_10051EB5C @ 0x10051f478
// > sub_100527B50 @ 0x100527c88
// > sub_100540AD8 @ 0x100540be0
// > sub_1005C3264 @ 0x1005c32e4
// > sub_1005C37CC @ 0x1005c3a04
//
// 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_1005BF868(__int64 a1)
{
_BYTE *v2; // x0
__int64 v3; // x19
v2 = sub_100588710(56, (__int64)"ec_key.c", 75);
v3 = (__int64)v2;
if ( !v2 )
{
sub_1005E0E48(16, 182, 65, "ec_key.c", 77);
return 0;
}
*((_DWORD *)v2 + 11) = 0;
*((_DWORD *)v2 + 8) = 0;
*((_QWORD *)v2 + 3) = 0;
*(_DWORD *)v2 = 1;
*((_QWORD *)v2 + 1) = 0;
*((_QWORD *)v2 + 2) = 0;
*((_DWORD *)v2 + 9) = 4;
*((_DWORD *)v2 + 10) = 1;
*((_QWORD *)v2 + 6) = 0;
if ( !sub_1005BF710((__int64)v2, a1) )
{
sub_1005BF684(v3);
return 0;
}
return v3;
}