//
// sub_1004D9CDC from 0x1004d9cdc to 0x1004d9d40 (100 bytes)
//
// 0 xrefs:
//
// 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_1004D9CDC(__int64 a1, __int64 a2)
{
__int64 result; // x0
if ( (*(_DWORD *)(a1 + 8) & 0x80000000) != 0 )
return 0;
while ( 1 )
{
result = sub_1004D9B00((__int64 *)a1, a2);
if ( (int)result > 0 )
break;
if ( !(_DWORD)result )
return result;
if ( !*(_DWORD *)(a1 + 20) )
{
*(_DWORD *)(a1 + 20) = 1;
return 0xFFFFFFFFLL;
}
}
return 1;
}