//
// HMAC_CTX_copy from 0x102e418 to 0x102e4c8 (176 bytes)
//
// 4 xrefs:
// > sub_102DCC0 @ 0x102dd40
// > PKCS5_PBKDF2_HMAC @ 0x10e043c
// > PKCS5_PBKDF2_HMAC @ 0x10e0974
// > ??> @ 0xe7f40
//
// 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:16:18 +0000
//
__int64 __fastcall HMAC_CTX_copy(__int64 a1, __int64 a2)
{
int v5; // w2
if ( (unsigned int)HMAC_CTX_reset(a1)
&& (unsigned int)EVP_MD_CTX_copy_ex(*(__int64 **)(a1 + 16), *(__int64 **)(a2 + 16))
&& (unsigned int)EVP_MD_CTX_copy_ex(*(__int64 **)(a1 + 24), *(__int64 **)(a2 + 24))
&& (unsigned int)EVP_MD_CTX_copy_ex(*(__int64 **)(a1 + 8), *(__int64 **)(a2 + 8)) )
{
memcpy((void *)(a1 + 36), (const void *)(a2 + 36), 0x80u);
v5 = *(_DWORD *)(a2 + 32);
*(_QWORD *)a1 = *(_QWORD *)a2;
*(_DWORD *)(a1 + 32) = v5;
return 1;
}
else
{
EVP_MD_CTX_reset(*(__int64 **)(a1 + 16));
EVP_MD_CTX_reset(*(__int64 **)(a1 + 24));
EVP_MD_CTX_reset(*(__int64 **)(a1 + 8));
*(_QWORD *)a1 = 0;
*(_DWORD *)(a1 + 32) = 0;
OPENSSL_cleanse((_BYTE *)(a1 + 36), 0x80u);
return 0;
}
}