//
// sub_4DE240 from 0x4de240 to 0x4de2d0 (144 bytes)
//
// 4 xrefs:
// > sub_4DE34C @ 0x4de398
// > sub_4DE34C @ 0x4de68c
// > sub_4DE34C @ 0x4de6ac
// > sub_B87DB4 @ 0xb8a1f8
//
// 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_4DE240(__int64 a1, char a2, char a3, __int64 a4)
{
__int64 result; // x0
if ( (*(_DWORD *)(a4 + 120) & 3) == 0 || a3 && a2 )
return 0;
result = (unsigned __int8)sub_B9A9E8(*(_QWORD *)(a1 + 96), 1);
if ( !(_BYTE)result || *(_QWORD *)(a1 + 1080) == 1 || (*(_DWORD *)(a1 + 1072) & 0xFFFFFFFB) != 1 )
{
if ( (unsigned __int8)sub_B9A9E8(*(_QWORD *)(a1 + 96), 2) )
return *(_QWORD *)(a1 + 1080) > 2LL;
return 0;
}
return result;
}