//
// sub_180082AB0 from 0x180082ab0 to 0x180082b4f (159 bytes)
//
// 1 xrefs:
// > sub_180083740 @ 0x18008380c
//
// 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
//
unsigned __int8 *__fastcall sub_180082AB0(unsigned __int8 *a1)
{
unsigned __int8 *v1; // r9
__int64 i; // rax
_BYTE *v3; // rdx
unsigned __int8 *v4; // r8
_BYTE *v6; // rdx
unsigned __int8 *v7; // r8
v1 = a1;
while ( 1 )
{
for ( i = *a1; (byte_180101290[i] & 1) == 0; ++a1 )
i = a1[1];
if ( (_BYTE)i == 60 )
break;
if ( !(_BYTE)i )
{
v3 = a1;
if ( a1 > v1 )
{
do
{
v4 = v3 - 1;
if ( (byte_180101290[(unsigned __int8)*(v3 - 1)] & 8) == 0 )
break;
--v3;
}
while ( v4 > v1 );
}
*v3 = 0;
return a1;
}
++a1;
}
v6 = a1;
if ( a1 > v1 )
{
do
{
v7 = v6 - 1;
if ( (byte_180101290[(unsigned __int8)*(v6 - 1)] & 8) == 0 )
break;
--v6;
}
while ( v7 > v1 );
}
*v6 = 0;
return a1 + 1;
}