//
// sub_1005C6C20 from 0x1005c6c20 to 0x1005c6c7a (90 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// 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:32:47 +0000
//
char __fastcall sub_1005C6C20(__int64 *a1, _BYTE *a2)
{
_BYTE *v2; // rax
__int64 v3; // rcx
__int64 v4; // rax
v2 = (_BYTE *)*((int *)a1 + 6);
v3 = *a1;
if ( (int)v2 < (int)(-1431655765 * ((unsigned __int64)(a1[1] - *a1) >> 3)) )
{
*((_DWORD *)a1 + 6) = (_DWORD)v2 + 1;
v4 = v3 + 24LL * (_QWORD)v2;
if ( (*(_BYTE *)v4 & 1) != 0 )
{
if ( *(_QWORD *)(v4 + 8) == 1 )
{
v2 = *(_BYTE **)(v4 + 16);
goto LABEL_7;
}
}
else if ( *(_BYTE *)v4 == 2 )
{
v2 = (_BYTE *)(v4 + 1);
LABEL_7:
LOBYTE(v2) = *v2 == 49;
LABEL_9:
*a2 = (_BYTE)v2;
return (char)v2;
}
LOBYTE(v2) = 0;
goto LABEL_9;
}
return (char)v2;
}