//
// CRYPTO_ocb128_copy_ctx from 0xa2cb24 to 0xa2cba8 (132 bytes)
//
// 2 xrefs:
// > sub_A1268C @ 0xa12778
// > ??> @ 0x7c75c
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 12:08:02 +0000
//
void *__fastcall CRYPTO_ocb128_copy_ctx(_DWORD *a1, int a2, int a3, int a4)
{
int v8; // r3
void *result; // r0
memcpy(a1, (const void *)a2, 0xA8u);
v8 = *(_DWORD *)(a2 + 64);
if ( a3 )
a1[2] = a3;
if ( a4 )
a1[3] = a4;
if ( !v8 )
return &dword_0 + 1;
result = CRYPTO_malloc((void *)(16 * *(_DWORD *)(a2 + 24)), (int)"crypto/modes/ocb128.c", 213);
a1[16] = result;
if ( result )
{
memcpy(result, *(const void **)(a2 + 64), 16 * (*(_DWORD *)(a2 + 20) + 1));
return &dword_0 + 1;
}
return result;
}