//
// sub_8522D4 from 0x8522d4 to 0x852304 (48 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:02:32 +0000
//
int __fastcall sub_8522D4(void *a1, int a2, int a3, char *a4)
{
size_t v8; // r0
int v9; // r4
if ( a3 )
return 0;
v8 = strlen(a4);
v9 = sub_84B860(v8);
if ( a2 <= v9 )
return 0;
memcpy(a1, a4, v9 + 1);
return v9;
}