//
// sub_10065AE1C from 0x10065ae1c to 0x10065afac (400 bytes)
//
// 1 xrefs:
// > sub_10065AD98 @ 0x10065adbc
//
// 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:10:55 +0000
//
__int64 __fastcall sub_10065AE1C(__int64 a1, int a2, unsigned __int64 *a3)
{
__int64 result; // x0
__int64 v6; // x20
char *v7; // x20
char *v8; // x20
int v9; // t1
int v10; // w22
int v11; // w0
unsigned __int64 v12; // x9
_QWORD *v13; // x8
char *v14; // x11
unsigned __int64 v15; // x9
char __s[20]; // [xsp+4h] [xbp-3Ch] BYREF
result = 0;
if ( a1 )
{
if ( a2 <= 19 && *a3 != 56 )
{
v6 = a2;
__memcpy_chk(__s, a1, a2, 20);
__s[v6] = 0;
v7 = strchr(__s, 43);
result = 0;
if ( v7 )
{
result = 0;
*v7 = 0;
v9 = (unsigned __int8)v7[1];
v8 = v7 + 1;
if ( v9 )
{
if ( !strcmp(__s, "RSA") )
{
v10 = 6;
}
else if ( !strcmp(__s, "DSA") )
{
v10 = 116;
}
else
{
if ( strcmp(__s, "ECDSA") )
return 0;
v10 = 408;
}
v11 = sub_1006B13D0(v8);
if ( v11 || (v11 = sub_1006B14D4(v8)) != 0 )
{
v12 = 0;
v13 = a3 + 1;
if ( *a3 )
{
while ( 1 )
{
v14 = (char *)a3 + 4 * v12;
if ( *((_DWORD *)v14 + 2) == v10 && *((_DWORD *)v14 + 3) == v11 )
return 0;
v12 += 2LL;
if ( v12 >= *a3 )
{
v12 = *a3;
goto LABEL_20;
}
}
}
else
{
LABEL_20:
*a3 = v12 + 1;
*((_DWORD *)v13 + v12) = v11;
v15 = (*a3)++;
*((_DWORD *)v13 + v15) = v10;
return 1;
}
}
else
{
return 0;
}
}
}
}
}
return result;
}