//
// sub_1005E42C4 from 0x1005e42c4 to 0x1005e43b4 (240 bytes)
//
// 2 xrefs:
// > sub_1005E8748 @ 0x1005e8850
// > sub_100619B18 @ 0x100619bfc
//
// 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_1005E42C4(_DWORD *a1, int a2)
{
__int64 v2; // x10
__int64 v3; // x9
__int64 result; // x0
__int64 (*v5)(void); // x9
int v6; // w1
__int16 v7; // w2
int v8; // w4
v2 = *(_QWORD *)a1;
v3 = *(_QWORD *)(*(_QWORD *)a1 + 16LL);
if ( (v3 & 0x80) != 0 )
{
if ( v2 )
{
v5 = *(__int64 (**)(void))(v2 + 72);
if ( v5 )
{
result = v5();
if ( (_DWORD)result != -1 )
return result;
v6 = 124;
v7 = 133;
v8 = 622;
}
else
{
v6 = 124;
v7 = 132;
v8 = 615;
}
}
else
{
v6 = 124;
v7 = 131;
v8 = 610;
}
}
else
{
if ( a1[26] == a2 )
return 1;
if ( a2 >= 1 && (v3 & 8) != 0 )
{
a1[26] = a2;
return 1;
}
v6 = 122;
v7 = 130;
v8 = 593;
}
sub_1005E0E48(6, v6, v7, (__int64)"evp_enc.c", v8);
return 0;
}