//
// sub_100606F78 from 0x100606f78 to 0x1006070c4 (332 bytes)
//
// 5 xrefs:
// > sub_1005F9900 @ 0x1005f9c30
// > sub_100607310 @ 0x10060732c
// > sub_10060A748 @ 0x10060a74c
// > sub_10060A7B4 @ 0x10060a800
// > sub_10060AC34 @ 0x10060aeb8
//
// 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
//
_DWORD *__fastcall sub_100606F78(__int64 a1, unsigned __int8 *a2)
{
unsigned __int8 *v2; // x19
int v3; // w21
_BOOL4 v4; // w20
int v5; // w0
__int16 v6; // w2
int v7; // w4
_DWORD *v8; // x19
void *v10; // [xsp+8h] [xbp-28h] BYREF
v2 = a2;
v10 = nullptr;
if ( !a2 )
{
v6 = 109;
v7 = 182;
goto LABEL_12;
}
v10 = sub_1005AAD34();
v3 = *v2;
v4 = v3 == 45;
if ( v3 == 45 )
++v2;
if ( *v2 == 48 && (v2[1] | 0x20) == 0x78 )
{
v2 += 2;
v5 = sub_1005AD7A8((__int64 *)&v10, v2);
}
else
{
v5 = sub_1005AD9B8((__int64 *)&v10, v2);
}
if ( !v5 || v2[v5] )
{
sub_1005AACD0(v10);
v6 = 100;
v7 = 205;
LABEL_12:
sub_1005E0E48(34, 108, v6, (__int64)"v3_utl.c", v7);
return nullptr;
}
if ( v3 == 45 )
{
if ( !*((_DWORD *)v10 + 2) )
v4 = 0;
}
else
{
v4 = 0;
}
v8 = sub_1005F00A0((__int64)v10, nullptr);
sub_1005AACD0(v10);
if ( !v8 )
{
v6 = 101;
v7 = 216;
goto LABEL_12;
}
if ( v4 )
v8[1] |= 0x100u;
return v8;
}