//
// sub_7EB5F4 from 0x7eb5f4 to 0x7eb660 (108 bytes)
//
// 0 xrefs:
//
// 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:00:59 +0000
//
int __fastcall sub_7EB5F4(_DWORD *a1, char *a2, int a3)
{
__int64 v3; // r8
int v6; // r4
bool v7; // cf
int v8; // r2
size_t v9; // r5
char *v10; // r0
v3 = a3;
v6 = 0;
while ( 1 )
{
if ( !v3 )
return v6;
v7 = HIDWORD(v3) == 0;
v8 = a1[2];
if ( !HIDWORD(v3) )
v7 = (unsigned int)v3 <= 0x7FFFFFFF;
v9 = v7 ? v3 : 0x80000000;
if ( (signed int)(v9 + v8) > a1[1] )
break;
v6 += v9;
v10 = (char *)memcpy(a2, (const void *)(*a1 + v8), v9);
v3 -= v9;
a1[2] += v9;
a2 = &v10[v9];
}
return 0;
}