//
// sub_10070A42C from 0x10070a42c to 0x10070a51c (240 bytes)
//
// 2 xrefs:
// > sub_10070E8B0 @ 0x10070e9b8
// > sub_10073FC80 @ 0x10073fd64
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:12:53 +0000
//
__int64 __fastcall sub_10070A42C(_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_100706FB0(6, v6, v7, (__int64)"evp_enc.c", v8);
return 0;
}