//
// sub_100556F00 from 0x100556f00 to 0x10055702c (300 bytes)
//
// 1 xrefs:
// > sub_100554D5C @ 0x100555ecc
//
// 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
//
__int64 __fastcall sub_100556F00(__int64 a1)
{
__int64 v2; // x9
const char *v3; // x8
int v4; // w11
int v5; // w10
int v6; // w14
int v7; // w8
__int64 v8; // x0
__int64 result; // x0
__int64 v10; // x20
v2 = *(_QWORD *)(*(_QWORD *)a1 + 536LL);
if ( *(_BYTE *)(*(_QWORD *)a1 + 1311LL)
&& (v3 = *(const char **)(a1 + 1472)) != nullptr
&& ((v4 = *(unsigned __int8 *)(*(_QWORD *)a1 + 1299LL),
v5 = *(char *)(a1 + 1496),
!*(_BYTE *)(*(_QWORD *)a1 + 1299LL))
? (v6 = 73)
: (v6 = 65),
v5 != v6) )
{
*(_DWORD *)(v2 + 24) = 1;
if ( v4 )
v10 = 65;
else
v10 = 73;
v8 = a1 + 1336;
if ( v5 == (_DWORD)v10 )
{
*(_DWORD *)(a1 + 1512) = 19;
LABEL_20:
result = sub_10057A8EC(v8, "SIZE %s", v3);
if ( !(_DWORD)result )
{
*(_DWORD *)(a1 + 1512) = 23;
return 0;
}
return result;
}
result = sub_10057A8EC(v8, "TYPE %c", v10);
if ( !(_DWORD)result )
{
*(_DWORD *)(a1 + 1512) = 19;
*(_BYTE *)(a1 + 1496) = v10;
return 0;
}
}
else
{
v7 = *(_DWORD *)(v2 + 24);
if ( !v7 )
return sub_10055702C(a1);
if ( v7 == 1 )
{
v3 = *(const char **)(a1 + 1472);
if ( v3 )
{
v8 = a1 + 1336;
goto LABEL_20;
}
}
if ( !*(_QWORD *)(a1 + 1472) )
return sub_10055702C(a1);
result = sub_10057A8EC(a1 + 1336, "REST %d", 0);
if ( !(_DWORD)result )
{
*(_DWORD *)(a1 + 1512) = 26;
return 0;
}
}
return result;
}