//
// aes_v8_set_decrypt_key from 0xe063c0 to 0xe06428 (104 bytes)
//
// 4 xrefs:
// > sub_DA200C @ 0xda21d4
// > sub_DA2740 @ 0xda27c4
// > sub_DA42CC @ 0xda4474
// > ??> @ 0x59a30
//
// 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 aes_v8_set_decrypt_key(
int8x16_t *a1,
int a2,
int8x16_t *a3,
double a4,
double a5,
double a6,
double a7,
int8x16_t a8)
{
__int64 result; // x0
__int64 v9; // x2
__int64 v10; // x12
_OWORD *v11; // x2
__int128 *v12; // x0
__int128 v13; // q1
uint8x16_t *v14; // x0
uint8x16_t *v15; // x2
uint8x16_t v16; // q1
result = aes_v8_set_encrypt_key(a1, a2, a3, a4, a5, a6, a7, a8);
if ( !result )
{
v11 = (_OWORD *)(v9 - 240);
v12 = &v11[v10];
v13 = *v12;
*v12 = *v11;
v14 = (uint8x16_t *)(v12 - 1);
*v11 = v13;
v15 = (uint8x16_t *)(v11 + 1);
do
{
v16 = vaesimcq_u8(*v14);
*v14-- = vaesimcq_u8(*v15);
*v15++ = v16;
}
while ( v14 > v15 );
*v14 = vaesimcq_u8(*v15);
return 0;
}
return result;
}