//
// sub_825EA from 0x825ea to 0x82652 (104 bytes)
//
// 1 xrefs:
// > sub_82290 @ 0x822d4
//
// 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 11:41:18 +0000
//
int __fastcall sub_825EA(int a1, int a2, int a3, _DWORD *a4)
{
int result; // r0
int v9; // r4
int v10; // r2
int v11; // r3
int v12; // r1
bool v13; // zf
unsigned __int8 v14; // [sp+7h] [bp-19h] BYREF
result = sub_819EC(a1, nullptr);
if ( !result )
{
v9 = 0;
while ( 1 )
{
result = sub_BBA38(*(_DWORD *)(a1 + 220), &v14);
if ( result )
break;
v12 = v14;
v13 = v14 == 10;
if ( v14 != 10 )
v13 = v14 == 13;
if ( !v13 && v9 < a3 - 1 )
*(_BYTE *)(a2 + v9++) = v14;
if ( sub_82442(a1, v12, v10, v11) )
{
result = 0;
if ( a4 )
*a4 = v9;
*(_BYTE *)(a2 + v9) = 0;
return result;
}
}
}
return result;
}