//
// CRYPTO_ocb128_copy_ctx from 0xdbe224 to 0xdbe2d4 (176 bytes)
//
// 2 xrefs:
// > sub_DA3E34 @ 0xda3f08
// > ??> @ 0x3cd20
//
// 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
//
void *__fastcall CRYPTO_ocb128_copy_ctx(_QWORD *a1, __int64 a2, __int64 a3, __int64 a4)
{
void *result; // x0
memcpy(a1, (const void *)a2, 0xC0u);
if ( a3 )
a1[2] = a3;
if ( a4 )
a1[3] = a4;
if ( !*(_QWORD *)(a2 + 88) )
return dword_0 + 1;
result = CRYPTO_malloc((void *)(16LL * *(_QWORD *)(a2 + 48)), (__int64)"crypto/modes/ocb128.c", 213);
a1[11] = result;
if ( result )
{
memcpy(result, *(const void **)(a2 + 88), 16 * (*(_QWORD *)(a2 + 40) + 1LL));
return dword_0 + 1;
}
return result;
}