//
// CRYPTO_128_unwrap from 0x819e10 to 0x819e94 (132 bytes)
//
// 3 xrefs:
// > sub_7FD8A8 @ 0x7fd9b4
// > AES_unwrap_key @ 0x8c4810
// > ??> @ 0x62cac
//
// 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
//
unsigned int __fastcall CRYPTO_128_unwrap(
int a1,
unsigned __int8 *a2,
char *a3,
char *a4,
int a5,
void (__fastcall *a6)(_BYTE *, _BYTE *, int))
{
unsigned int v8; // r4
unsigned __int8 v10[12]; // [sp+8h] [bp-Ch] BYREF
v8 = sub_819B4C(a1, v10, a3, a4, a5, a6);
if ( v8 )
{
if ( !a2 )
a2 = (unsigned __int8 *)&unk_A1289C;
if ( !CRYPTO_memcmp(v10, a2, 8) )
return v8;
OPENSSL_cleanse(a3, v8);
}
return 0;
}