//
// sub_2B4088 from 0x2b4088 to 0x2b4170 (232 bytes)
//
// 2 xrefs:
// > sub_62160C @ 0x622e8e
// > sub_62160C @ 0x622f88
//
// 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
//
unsigned int __fastcall sub_2B4088(unsigned int result)
{
if ( result == 0x2000 )
return 4096;
if ( result > 0x2000 )
{
if ( result != 0x100000 )
{
if ( result <= 0x100000 )
{
if ( result == 0x10000 )
return 0x10000;
if ( result <= 0x10000 )
{
if ( result == 0x4000 || result == 0x8000 )
return 0x4000;
return 0;
}
if ( result == 0x40000 )
return result;
if ( result != 0x80000 )
{
if ( result != 0x20000 )
return 0;
return 0x10000;
}
return 0x80000;
}
if ( result != 0x1000000 )
{
if ( result > 0x1000000 )
{
if ( result == 0x4000000 || result == 0x8000000 )
return 0x4000000;
if ( result == 0x2000000 )
return result;
return 0;
}
if ( result == 0x400000 )
return result;
if ( result != 0x800000 )
{
if ( result == 0x200000 )
return result;
return 0;
}
return 0x80000;
}
}
return 0x100000;
}
if ( result == 64 )
return result;
if ( result > 0x40 )
{
if ( result == 512 )
return result;
if ( result <= 0x200 )
{
if ( result == 128 || result == 256 )
return 128;
return 0;
}
if ( result == 2048 )
return result;
if ( result != 4096 )
{
if ( result == 1024 )
return result;
return 0;
}
return 4096;
}
if ( result == 4 )
return 4;
if ( result > 4 )
{
if ( result == 16 || result == 32 )
return result;
if ( result == 8 )
return 4;
return 0;
}
return result - 1 <= 1;
}