//
// sub_100580490 from 0x100580490 to 0x100580532 (162 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
//
_BYTE *__fastcall sub_100580490(_BYTE *a1, int a2, int a3)
{
_BYTE *result; // rax
_BYTE *v4; // rcx
_WORD *v5; // rcx
result = a1;
if ( !a3 )
{
v5 = a1 + 1;
if ( a2 == 2 )
{
*a1 = 6;
a1[3] = 103;
*v5 = 25966;
}
else
{
if ( a2 != 1 )
{
if ( a2 )
{
*(_WORD *)a1 = 16130;
a1[2] = 0;
}
else
{
*a1 = 4;
strcpy(a1 + 1, "na");
}
return result;
}
*a1 = 6;
a1[3] = 115;
*v5 = 25185;
}
a1[4] = 0;
return result;
}
*a1 = 2;
v4 = a1 + 2;
if ( a2 == 2 )
{
a1[1] = 110;
*v4 = 0;
}
else if ( a2 == 1 )
{
a1[1] = 97;
*v4 = 0;
}
else
{
if ( a2 )
a1[1] = 63;
else
a1[1] = 32;
*v4 = 0;
}
return result;
}