//
// sub_180049840 from 0x180049840 to 0x180049873 (51 bytes)
//
// 5 xrefs:
// > sub_18004B0F0 @ 0x18004b224
// > sub_18004B0F0 @ 0x18004b2ae
// > sub_18004F360 @ 0x18004f476
// > sub_18004F5A0 @ 0x18004f6f8
// > ??> @ 0x1801f8448
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 10:53:14 +0000
//
__int64 __fastcall sub_180049840(__int64 a1)
{
int v2; // eax
if ( *(int *)(a1 + 8) <= 0 )
return 0xFFFFFFFFLL;
v2 = sub_18004A6B0();
if ( v2 < 0 )
return 0xFFFFFFFFLL;
else
return *(unsigned int *)(*(_QWORD *)(a1 + 40) + 4LL * v2);
}