//
// sub_1005BF5E8 from 0x1005bf5e8 to 0x1005bf684 (156 bytes)
//
// 1 xrefs:
// > sub_10051EB5C @ 0x10051f2b8
//
// 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
//
_BYTE *__fastcall sub_1005BF5E8(int a1)
{
_BYTE *v2; // x0
_BYTE *v3; // x19
__int64 v4; // x0
v2 = sub_100588710(56, (__int64)"ec_key.c", 75);
v3 = v2;
if ( !v2 )
{
sub_1005E0E48(16, 182, 65, "ec_key.c", 77);
return nullptr;
}
*((_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;
v4 = sub_1005BCFE8(a1);
*((_QWORD *)v3 + 1) = v4;
if ( !v4 )
{
sub_1005BF684(v3);
return nullptr;
}
return v3;
}