//
// BLAKE2s_Final from 0x110574c to 0x1105834 (232 bytes)
//
// 2 xrefs:
// > sub_10F2860 @ 0x10f2884
// > ??> @ 0xc23c8
//
// 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 13:18:28 +0000
//
__int64 __fastcall BLAKE2s_Final(_DWORD *a1, unsigned __int64 a2)
{
__int64 v4; // x2
_OWORD *v5; // x1
v4 = *(_QWORD *)(a2 + 112);
*(_DWORD *)(a2 + 40) = -1;
memset((void *)(a2 + v4 + 48), 0, 64 - v4);
sub_1102870((int *)a2, (int *)(a2 + 48), *(_QWORD *)(a2 + 112));
v5 = a1 + 4;
if ( (unsigned __int64)a1 < a2 + 16 && a2 < (unsigned __int64)v5 )
{
*a1 = *(_DWORD *)a2;
a1[1] = *(_DWORD *)(a2 + 4);
a1[2] = *(_DWORD *)(a2 + 8);
a1[3] = *(_DWORD *)(a2 + 12);
a1[4] = *(_DWORD *)(a2 + 16);
a1[5] = *(_DWORD *)(a2 + 20);
a1[6] = *(_DWORD *)(a2 + 24);
a1[7] = *(_DWORD *)(a2 + 28);
OPENSSL_cleanse((_BYTE *)a2, 0x78u);
return 1;
}
else
{
*(_OWORD *)a1 = *(_OWORD *)a2;
*v5 = *(_OWORD *)(a2 + 16);
OPENSSL_cleanse((_BYTE *)a2, 0x78u);
return 1;
}
}