//
// UI_process from 0xa4fc88 to 0xa4fdd0 (328 bytes)
//
// 2 xrefs:
// > EVP_read_pw_string_min @ 0xacc4a0
// > ??> @ 0x803cc
//
// 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:22 +0000
//
int __fastcall UI_process(int *a1)
{
int (*v1)(void); // r3
signed int v3; // r4
int v4; // r0
unsigned int v5; // r1
int v6; // r3
bool v7; // cc
int (__fastcall *v8)(int *, int); // r6
int v9; // r0
int v10; // r4
int (__fastcall *v11)(int *); // r3
int (__fastcall *v13)(int *, unsigned int); // r3
int v14; // r0
signed int v15; // r4
int v16; // r0
unsigned int v17; // r1
int (__fastcall *v18)(int *, int); // r6
int v19; // r0
int v20; // r0
v1 = *(int (**)(void))(*a1 + 4);
if ( v1 && !v1() )
return -1;
if ( (a1[4] & 0x100) != 0 )
ERR_print_errors_cb(sub_A4E4B4, a1);
v3 = 0;
while ( 1 )
{
v4 = OPENSSL_sk_num(a1[1]);
v5 = v3;
v6 = *a1;
v7 = v3++ < v4;
if ( !v7 )
break;
v8 = *(int (__fastcall **)(int *, int))(v6 + 8);
if ( v8 )
{
v9 = OPENSSL_sk_value((_DWORD *)a1[1], v5);
if ( !v8(a1, v9) )
goto LABEL_10;
}
}
v13 = *(int (__fastcall **)(int *, unsigned int))(v6 + 12);
if ( v13 )
{
v14 = v13(a1, v5);
if ( v14 == -1 )
{
LABEL_24:
v10 = -2;
goto LABEL_11;
}
if ( !v14 )
{
LABEL_10:
v10 = -1;
goto LABEL_11;
}
}
v15 = 0;
while ( 1 )
{
v16 = OPENSSL_sk_num(a1[1]);
v17 = v15;
v7 = v15++ < v16;
if ( !v7 )
break;
v18 = *(int (__fastcall **)(int *, int))(*a1 + 16);
if ( v18 )
{
v19 = OPENSSL_sk_value((_DWORD *)a1[1], v17);
v20 = v18(a1, v19);
if ( v20 == -1 )
goto LABEL_24;
if ( !v20 )
goto LABEL_10;
}
}
v10 = 0;
LABEL_11:
v11 = *(int (__fastcall **)(int *))(*a1 + 20);
if ( !v11 || v11(a1) )
return v10;
return -1;
}