//
// sub_ACA65C from 0xaca65c to 0xaca700 (164 bytes)
//
// 1 xrefs:
// > ??> @ 0xc8167c
//
// 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:09:20 +0000
//
int __fastcall sub_ACA65C(int a1, int a2, int a3)
{
int data; // r7
int v7; // r0
bool v8; // zf
int v10; // r5
int init; // r0
bool v12; // cc
if ( !a2 )
return 0;
data = BIO_get_data(a1);
v7 = BIO_next(a1);
v8 = data == 0;
if ( data )
v8 = v7 == 0;
if ( v8 )
return 0;
v10 = BIO_read(v7, a2, a3);
init = BIO_get_init(a1);
v12 = init <= 0;
if ( init )
v12 = v10 <= 0;
if ( !v12 && EVP_DigestUpdate(data) <= 0 )
return -1;
BIO_clear_flags(a1, 15);
BIO_copy_next_retry(a1);
return v10;
}