//
// sub_1000D2C40 from 0x1000d2c40 to 0x1000d2c87 (71 bytes)
//
// 0 xrefs:
//
// 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 12:20:53 +0000
//
__int64 __fastcall sub_1000D2C40(__int64 a1)
{
__int64 v1; // rax
__int64 result; // rax
if ( byte_100BE7AC0 != 1 )
return *(_QWORD *)(a1 + 14824);
v1 = *(_QWORD *)(a1 + 14248);
if ( !v1 )
return *(_QWORD *)(a1 + 14824);
result = *(_QWORD *)(v1 + 1496);
if ( !result )
return *(_QWORD *)(a1 + 14824);
if ( *(_DWORD *)(result + 1248) != 1 && *(__int16 *)(result + 1168) <= 0 )
return 0;
return result;
}