//
// sub_100571370 from 0x100571370 to 0x100571490 (288 bytes)
//
// 1 xrefs:
// > ??> @ 0x10082e480
//
// 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_100571370(__int64 a1, _BYTE *a2)
{
_DWORD *v4; // x22
__int64 v5; // x19
bool v6; // zf
int v7; // w8
*a2 = 0;
v4 = *(_DWORD **)(a1 + 1336);
if ( !v4 )
{
v5 = sub_100571590(a1, a2);
if ( (_DWORD)v5 )
return v5;
v4 = *(_DWORD **)(a1 + 1336);
if ( !v4 )
return 44;
}
*a2 = 0;
v5 = sub_10057213C(v4, 0);
if ( (_DWORD)v5 )
v6 = 1;
else
v6 = *v4 == 3;
if ( !v6 )
sub_10057171C(a1, a2);
if ( !(_DWORD)v5 )
{
v7 = v4[2];
if ( v7 < 0 )
{
switch ( v7 )
{
case -100:
return 0;
case -99:
return 28;
case -98:
return 7;
default:
return 42;
}
}
else
{
v5 = 68;
switch ( v7 )
{
case 0:
case 4:
v5 = 71;
break;
case 1:
return v5;
case 2:
v5 = 69;
break;
case 3:
v5 = 70;
break;
case 5:
v5 = 72;
break;
case 6:
v5 = 73;
break;
case 7:
v5 = 74;
break;
default:
return 42;
}
}
}
return v5;
}