//
// sub_1006401B0 from 0x1006401b0 to 0x1006402a2 (242 bytes)
//
// 0 xrefs:
//
// 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
//
char __fastcall sub_1006401B0(__int64 *a1, __int64 a2)
{
__int64 v2; // r14
__int64 v3; // rcx
__int64 v4; // rdx
char v6[136]; // [rsp+0h] [rbp-B0h] BYREF
v2 = *a1;
if ( !*a1 )
return 0;
v3 = *(_QWORD *)v2 & 6LL;
if ( v3 != 2 )
{
v4 = *(_QWORD *)(v2 + 32);
if ( v4 )
{
while ( (*(_DWORD *)v4 & 6) != 2 )
{
v4 = *(_QWORD *)(v4 + 48);
if ( !v4 )
goto LABEL_6;
}
v2 = v4;
goto LABEL_10;
}
LABEL_6:
if ( v3 )
return 0;
v2 = sub_10063C200(*a1, *(__int64 **)(*(_QWORD *)v2 & 0xFFFFFFFFFFFFFFE0LL), 3);
if ( !v2 )
return 0;
}
LABEL_10:
sprintf(v6, "%lld", a2);
return sub_10063B180((const char **)(v2 + 24), (__int64 *)v2, 8, v6);
}