//
// sub_5A0B4C from 0x5a0b4c to 0x5a0c7c (304 bytes)
//
// 2 xrefs:
// > GJBaseGameLayer::updateLayerCapacity @ 0x5a0d0c
// > GJBaseGameLayer::parseRecording @ 0x5b0e08
//
// 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:53:16 +0000
//
int __fastcall sub_5A0B4C(unsigned __int8 *a1, int *a2)
{
int v4; // r6
int v5; // r3
unsigned __int8 *v6; // r4
unsigned __int8 *v7; // r7
unsigned __int8 *first_of; // r0
int v9; // r4
int v10; // r3
unsigned int v11; // r6
int v12; // r3
int *v13; // r0
int v14; // r7
unsigned int v15; // r7
unsigned __int8 *v16; // r4
unsigned __int8 *v17; // r7
unsigned __int8 *v18; // r0
int v20; // [sp+Ch] [bp-20h]
int v21[3]; // [sp+18h] [bp-14h] BYREF
v4 = *a1;
if ( (v4 & 1) == 0 )
{
v5 = v4 >> 1;
if ( !(v4 >> 1) )
{
v9 = -1;
goto LABEL_14;
}
v6 = a1 + 1;
LABEL_6:
v7 = &v6[v5];
first_of = std::__find_first_of_ce(
v6,
&v6[v5],
(int)",",
(int)"",
(int (__fastcall *)(_DWORD, int))std::char_traits::eq);
v4 = *a1;
if ( first_of == v7 )
v9 = -1;
else
v9 = first_of - v6;
if ( (v4 & 1) != 0 )
goto LABEL_12;
LABEL_14:
v10 = v4 >> 1;
goto LABEL_15;
}
v5 = *((_DWORD *)a1 + 1);
v6 = *((unsigned __int8 **)a1 + 2);
if ( v5 )
goto LABEL_6;
v9 = -1;
LABEL_12:
v10 = *((_DWORD *)a1 + 1);
LABEL_15:
v11 = 0;
v20 = v10;
while ( 1 )
{
std::string::basic_string(v21, a1, v11, v9 - v11);
if ( (v21[0] & 1) != 0 )
v12 = v21[1];
else
v12 = (int)LOBYTE(v21[0]) >> 1;
if ( v12 || v11 != v20 )
{
v13 = (int *)a2[1];
if ( v13 == (int *)a2[2] )
{
std::vector::__push_back_slow_path(a2, (int)v21);
}
else
{
if ( v13 )
std::string::basic_string(v13, (int)v21);
a2[1] += 12;
}
}
if ( v9 == -1 )
break;
v14 = *a1;
v11 = v9 + 1;
if ( (v14 & 1) != 0 )
{
v15 = *((_DWORD *)a1 + 1);
v16 = *((unsigned __int8 **)a1 + 2);
}
else
{
v15 = v14 >> 1;
v16 = a1 + 1;
}
if ( v11 >= v15
|| (v17 = &v16[v15],
v18 = std::__find_first_of_ce(
&v16[v11],
v17,
(int)",",
(int)"",
(int (__fastcall *)(_DWORD, int))std::char_traits::eq),
v18 == v17) )
{
v9 = -1;
}
else
{
v9 = v18 - v16;
}
std::string::~string((int)v21);
}
return std::string::~string((int)v21);
}