//
// sub_1000608E0 from 0x1000608e0 to 0x100060a18 (312 bytes)
//
// 13 xrefs:
// > sub_100060DA0 @ 0x100060dc6
// > sub_100060DE0 @ 0x100060e3f
// > sub_100060E80 @ 0x100060edf
// > sub_100060F20 @ 0x100060f7f
// > sub_100060FC0 @ 0x10006101d
// > sub_100061140 @ 0x1000611d0
// > sub_1000611E0 @ 0x10006124b
// > sub_100061270 @ 0x1000612db
// > sub_100061300 @ 0x10006136b
// > sub_100061390 @ 0x1000613fd
// > sub_100061430 @ 0x100061499
// > sub_100061650 @ 0x1000616c4
// > sub_100061700 @ 0x10006178c
//
// 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:19:41 +0000
//
char __fastcall sub_1000608E0(__int64 a1, const char *a2, int a3)
{
const char *v3; // r14
unsigned __int8 v4; // al
__int64 v5; // r13
const char *v6; // r15
char result; // al
char **v8; // rax
__int64 v9; // kr08_8
v3 = a2;
if ( *(_BYTE *)(a1 + 32) != 1 )
{
v6 = a2;
return sub_1000606D0(a1, "%s", v6);
}
v4 = *a2;
if ( *a2 )
{
v5 = a1 + (unsigned int)(a3 << 6) + 34;
v6 = a2;
do
{
if ( v4 <= 0x3Fu && *(_BYTE *)(v5 + v4) == 1 )
{
if ( v6 < v3 )
{
do
sub_1000606D0(a1, "%c", (unsigned int)*v6++);
while ( v6 < v3 );
v4 = *v3;
}
v9 = (unsigned int)v4 - 34;
v8 = &off_100AB7970;
switch ( v9 )
{
case 0LL:
goto LABEL_7;
case 4LL:
v8 = &off_100AB7980;
goto LABEL_7;
case 5LL:
v8 = &off_100AB7990;
goto LABEL_7;
case 26LL:
v8 = &off_100AB79A0;
goto LABEL_7;
case 28LL:
v8 = &off_100AB79B0;
LABEL_7:
sub_1000606D0(a1, "&%s;", *v8);
break;
default:
break;
}
++v6;
}
v4 = *++v3;
}
while ( v4 );
result = *(_BYTE *)(a1 + 32);
if ( (result & 1) == 0 )
return sub_1000606D0(a1, "%s", v6);
}
else
{
result = 1;
v6 = a2;
}
if ( v3 - v6 > 0 )
return sub_1000606D0(a1, "%s", v6);
return result;
}