//
// sub_CCB4A4 from 0xccb4a4 to 0xccb5f8 (340 bytes)
//
// 2 xrefs:
// > sub_CCB5F8 @ 0xccb640
// > sub_CCB5F8 @ 0xccb66c
//
// 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
//
__int64 __fastcall sub_CCB4A4(_DWORD *a1, char *a2, int a3)
{
char *v4; // x19
char *v5; // x26
unsigned __int8 *v6; // x24
unsigned __int8 *v7; // x0
int v8; // w2
unsigned int v9; // w1
int v10; // w2
int v12; // [xsp+50h] [xbp+50h] BYREF
int v13; // [xsp+54h] [xbp+54h] BYREF
v4 = &a2[a3];
v5 = a2;
if ( a2 < v4 && *a2 != 10 )
{
do
{
v6 = (unsigned __int8 *)memchr(v5, 44, v4 - v5);
if ( !v6 )
v6 = (unsigned __int8 *)v4;
v7 = sub_CCB43C((unsigned __int8 *)v5, v6, (unsigned int *)&v12);
if ( !v7 )
return _stack_chk_guard;
v8 = v12;
v13 = v12;
if ( v6 <= v7 )
{
v9 = v12;
}
else
{
v9 = v12;
if ( *v7 == 45 )
{
if ( !sub_CCB43C(v7 + 1, v6, (unsigned int *)&v13) )
return _stack_chk_guard;
v9 = v12;
v8 = v13;
if ( v12 > v13 )
{
if ( v6 >= (unsigned __int8 *)v4 )
return _stack_chk_guard;
goto LABEL_17;
}
}
}
v10 = v8 + 1;
do
{
if ( v9 <= 0x1F )
*a1 |= 1 << v9;
++v9;
}
while ( v9 != v10 );
if ( v6 >= (unsigned __int8 *)v4 )
return _stack_chk_guard;
LABEL_17:
v5 = (char *)(v6 + 1);
}
while ( v4 > (char *)v6 + 1 && v6[1] != 10 );
}
return _stack_chk_guard;
}