//
// sub_8240A from 0x8240a to 0x82442 (56 bytes)
//
// 3 xrefs:
// > sub_81DBC @ 0x81eb0
// > sub_81F68 @ 0x82060
// > sub_820AC @ 0x821a8
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
int __fastcall sub_8240A(int a1, int a2, int a3, _DWORD *a4)
{
char v4; // r4
int v5; // r0
int v6; // r4
int v7; // r1
int v8; // r5
v4 = 0;
v5 = 0;
do
{
if ( v5 < 512 )
v4 = *(_BYTE *)(a2 + v5++);
}
while ( v4 != 34 );
v6 = a2 + v5;
v7 = 0;
do
{
v8 = *(unsigned __int8 *)(v6 + v7);
if ( v8 == 34 )
break;
*(_BYTE *)(a3 + v7++) = v8;
}
while ( v5 + v7 <= 510 );
*(_BYTE *)(a3 + v7) = 0;
*a4 = v7;
return 0;
}