//
// sub_C50E0 from 0xc50e0 to 0xc5124 (68 bytes)
//
// 1 xrefs:
// > sub_C8F5C @ 0xc8fd0
//
// 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:51 +0000
//
int __fastcall sub_C50E0(int a1, unsigned int a2)
{
size_t v4; // r6
void *v5; // r0
void *v6; // r0
if ( *(_DWORD *)(a1 + 8) >= a2 )
return 1;
v4 = 4 << a2;
v5 = realloc(*(void **)a1, 4 << a2);
*(_DWORD *)a1 = v5;
if ( v5 )
{
v6 = realloc(*(void **)(a1 + 4), v4);
*(_DWORD *)(a1 + 4) = v6;
if ( v6 )
{
memset(v6, 0, v4);
*(_DWORD *)(a1 + 8) = a2;
return 1;
}
}
return 0;
}